|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TextUI
org.jdesktop.swingx.plaf.PromptTextUI
org.jdesktop.swingx.plaf.PromptTextFieldUI
org.jdesktop.swingx.plaf.BuddyTextFieldUI
org.jdesktop.swingx.plaf.SearchFieldUI
public class SearchFieldUI
The default JXSearchField
UI delegate.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jdesktop.swingx.plaf.PromptTextUI |
---|
PromptTextUI.PainterHighlighter |
Field Summary | |
---|---|
static java.awt.Insets |
NO_INSETS
|
protected JXSearchField |
searchField
The search field that we're a UI delegate for. |
Fields inherited from class org.jdesktop.swingx.plaf.BuddyTextFieldUI |
---|
layoutAndBorder |
Fields inherited from class org.jdesktop.swingx.plaf.PromptTextUI |
---|
delegate, promptComponent |
Constructor Summary | |
---|---|
SearchFieldUI(javax.swing.plaf.TextUI delegate)
|
Method Summary | |
---|---|
protected javax.swing.JButton |
clearButton()
Convienence method. |
protected BuddyLayoutAndBorder |
createBuddyLayoutAndBorder()
|
protected javax.swing.Icon |
getNewIcon(javax.swing.Icon icon,
java.lang.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(javax.swing.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 javax.swing.JButton |
popupButton()
Convienence method. |
protected javax.swing.JButton |
searchButton()
Convienence method. |
protected boolean |
shouldReplaceResource(java.lang.Object o)
Returns true if o is null or of instance
UIResource . |
void |
uninstallUI(javax.swing.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. |
Methods inherited from class org.jdesktop.swingx.plaf.BuddyTextFieldUI |
---|
getPreferredSize, paint |
Methods inherited from class org.jdesktop.swingx.plaf.PromptTextFieldUI |
---|
createPromptComponent, getPromptComponent |
Methods inherited from class org.jdesktop.swingx.plaf.PromptTextUI |
---|
contains, damageRange, damageRange, equals, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getEditorKit, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getRootView, getToolTipText, hashCode, modelToView, modelToView, paintPromptComponent, shouldPaintPrompt, toString, update, viewToModel, viewToModel |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
createUI, getBaselineResizeBehavior |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JXSearchField searchField
installUI
method, and reset to null by
uninstallUI
.
installUI(javax.swing.JComponent)
,
uninstallUI(javax.swing.JComponent)
public static final java.awt.Insets NO_INSETS
Constructor Detail |
---|
public SearchFieldUI(javax.swing.plaf.TextUI delegate)
Method Detail |
---|
public void installUI(javax.swing.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(javax.swing.JComponent c)
uninstallUI
in class BuddyTextFieldUI
protected boolean shouldReplaceResource(java.lang.Object o)
o
is null
or of instance
UIResource
.
o
- an object
o
is null
or of instance
UIResource
protected javax.swing.Icon getNewIcon(javax.swing.Icon icon, java.lang.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 icon
protected final javax.swing.JButton clearButton()
JXSearchField.getCancelButton()
protected final javax.swing.JButton searchButton()
JXSearchField.getFindButton()
protected final javax.swing.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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |