|
||||||||||
| 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 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(TextUI delegate)
|
|
| Method Summary | |
|---|---|
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)
Returns true if o is null or of instance
UIResource. |
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. |
| 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 Insets NO_INSETS
| Constructor Detail |
|---|
public SearchFieldUI(TextUI delegate)
| Method Detail |
|---|
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 BuddyTextFieldUIc - the component where this UI delegate is being installedComponentUI.uninstallUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()protected BuddyLayoutAndBorder createBuddyLayoutAndBorder()
createBuddyLayoutAndBorder in class BuddyTextFieldUIprotected void installDefaults()
JXSearchFields 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 BuddyTextFieldUIc - the component from which this UI delegate is being removed;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsComponentUI.installUI(javax.swing.JComponent),
JComponent.updateUI()protected boolean shouldReplaceResource(Object o)
o is null or of instance
UIResource.
o - an object
o 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 icon
protected 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||