public class SearchFieldUI extends BuddyTextFieldUI
JXSearchField
UI delegate.PromptTextUI.PainterHighlighter
Modifier and Type | Field and Description |
---|---|
static Insets |
NO_INSETS |
protected JXSearchField |
searchField
The search field that we're a UI delegate for.
|
layoutAndBorder
delegate, promptComponent
Constructor and Description |
---|
SearchFieldUI(TextUI delegate) |
Modifier and Type | Method and Description |
---|---|
protected JButton |
clearButton()
Convienence method.
|
protected BuddyLayoutAndBorder |
createBuddyLayoutAndBorder() |
protected Icon |
getNewIcon(Icon icon,
String resKey)
Convience method for only replacing icons if they have not been
customized by the user.
|
protected int |
getPopupOffset()
Returns the number of pixels between the popup button and the clear (or
search) button as specified in the default table by
'SearchField.popupOffset'.
|
protected void |
installDefaults()
Initialize the search fields various properties based on the
corresponding "SearchField.*" properties from defaults table.
|
void |
installUI(JComponent c)
Calls
installDefaults() , adds the search, clear and popup button
to the search field and registers a PropertyChangeListener ad
DocumentListener and an ActionListener on the popup
button. |
protected JButton |
popupButton()
Convienence method.
|
protected JButton |
searchButton()
Convienence method.
|
protected boolean |
shouldReplaceResource(Object o)
|
void |
uninstallUI(JComponent c)
Removes all installed listeners, the layout and resets the search field
original border and removes all children.
|
protected void |
updateButtons()
Sets the visibility of the search, clear and popup buttons depending on
the search mode, layout stye, search text, search popup menu and the use
of a seperate popup button.
|
boolean |
usingSeperatePopupButton()
Returns
true if
JXSearchField.isUseSeperatePopupButton() is true and
a search popup menu has been set. |
getPreferredSize, paint
createPromptComponent, getPromptComponent
contains, damageRange, damageRange, equals, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getEditorKit, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getRootView, getToolTipText, hashCode, modelToView, modelToView, paintPromptComponent, shouldPaintPrompt, toString, update, viewToModel, viewToModel
createUI, getBaselineResizeBehavior
protected JXSearchField searchField
installUI
method, and reset to null by
uninstallUI
.public static final Insets NO_INSETS
public SearchFieldUI(TextUI delegate)
public void installUI(JComponent c)
installDefaults()
, adds the search, clear and popup button
to the search field and registers a PropertyChangeListener
ad
DocumentListener
and an ActionListener
on the popup
button.installUI
in class BuddyTextFieldUI
protected BuddyLayoutAndBorder createBuddyLayoutAndBorder()
createBuddyLayoutAndBorder
in class BuddyTextFieldUI
protected void installDefaults()
JXSearchField
s layout is set to the value returned by
createLayout
. Also calls #replaceBorderIfNecessary()
and updateButtons()
. This method is called by
installUI(JComponent)
.installUI(javax.swing.JComponent)
,
#createLayout
,
JXSearchField.customSetUIProperty(String, Object)
public void uninstallUI(JComponent c)
uninstallUI
in class BuddyTextFieldUI
protected boolean shouldReplaceResource(Object o)
o
- an objecto
is null
or of instance
UIResource
protected Icon getNewIcon(Icon icon, String resKey)
resKey
, if
shouldReplaceResource(Object)
with the icon
as a
parameter returns true
. Otherwise returns icon
.icon
- the current iconresKey
- the resource key identifying the default iconprotected final JButton clearButton()
JXSearchField.getCancelButton()
protected final JButton searchButton()
JXSearchField.getFindButton()
protected final JButton popupButton()
JXSearchField.getPopupButton()
public boolean usingSeperatePopupButton()
true
if
JXSearchField.isUseSeperatePopupButton()
is true
and
a search popup menu has been set.protected int getPopupOffset()
usingSeperatePopupButton()
returns false
protected void updateButtons()
Copyright © 2016. All rights reserved.