|
||||||||||
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.PanelUI
org.jdesktop.swingx.plaf.HeaderUI
org.jdesktop.swingx.plaf.basic.BasicHeaderUI
public class BasicHeaderUI
Base implementation of Header
UI.
PENDING JW: This implementation is unusual in that it does not keep a reference to the component it controls. Typically, such is only the case if the ui is shared between instances. Historical? A consequence is that the un/install methods need to carry the header as parameter. Which looks funny when at the same time the children of the header are instance fields in this. Should think about cleanup: either get rid off the instance fields here, or reference the header and remove the param (would break subclasses).
PENDING JW: keys for uidefaults are inconsistent - most have prefix "JXHeader." while defaultIcon has prefix "Header."
Nested Class Summary | |
---|---|
protected class |
BasicHeaderUI.DescriptionPane
|
Field Summary | |
---|---|
protected BasicHeaderUI.DescriptionPane |
descriptionPane
|
protected javax.swing.JLabel |
imagePanel
|
protected javax.swing.JLabel |
titleLabel
|
Constructor Summary | |
---|---|
BasicHeaderUI()
Creates a new instance of BasicHeaderUI |
Method Summary | |
---|---|
protected Painter |
createBackgroundPainter()
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
Returns an instance of the UI delegate for the specified component. |
protected void |
installComponentDefaults(JXHeader h)
Configures the component default properties from the given header. |
protected void |
installComponents(JXHeader h)
Creates, configures, adds contained components. |
protected void |
installDefaults(JXHeader h)
Installs default header properties. |
protected void |
installListeners(JXHeader header)
|
void |
installUI(javax.swing.JComponent c)
Configures the specified component appropriate for the look and feel. |
protected void |
onPropertyChange(JXHeader h,
java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
protected void |
uninstallComponentDefaults(JXHeader h)
Uninstalls component defaults. |
protected void |
uninstallComponents(JXHeader h)
Unconfigures, removes and nulls contained components. |
protected void |
uninstallDefaults(JXHeader h)
Uninstalls the given header's default properties. |
protected void |
uninstallListeners(JXHeader h)
|
void |
uninstallUI(javax.swing.JComponent c)
Reverses configuration which was done on the specified component during installUI . |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.swing.JLabel titleLabel
protected BasicHeaderUI.DescriptionPane descriptionPane
protected javax.swing.JLabel imagePanel
Constructor Detail |
---|
public BasicHeaderUI()
Method Detail |
---|
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
createUI
method that returns an instance of that UI delegate subclass.
If the UI delegate subclass is stateless, it may return an instance
that is shared by multiple components. If the UI delegate is
stateful, then it should return a new instance per component.
The default implementation of this method throws an error, as it
should never be invoked.
public void installUI(javax.swing.JComponent c)
ComponentUI
instance is being installed
as the UI delegate on the specified component. This method should
completely configure the component for the look and feel,
including the following:
LayoutManager
on the component if necessary.
PropertyChangeListener
on the component in order
to detect and respond to component property changes appropriately.
installUI
in class javax.swing.plaf.ComponentUI
c
- the component where this UI delegate is being installeduninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(javax.swing.JComponent c)
installUI
. This method is invoked when this
UIComponent
instance is being removed as the UI delegate
for the specified component. This method should undo the
configuration performed in installUI
, being careful to
leave the JComponent
instance in a clean state (no
extraneous listeners, look-and-feel-specific property objects, etc.).
This should include the following:
uninstallUI
in class javax.swing.plaf.ComponentUI
c
- 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 componentsinstallUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void installDefaults(JXHeader h)
NOTE: this method is called before the children are created, so must not try to access any of those!.
the
- header to install.protected void uninstallDefaults(JXHeader h)
h
- the header to ininstall the properties from.protected void installComponents(JXHeader h)
the
- header to install the components into.protected void uninstallComponents(JXHeader h)
the
- header to install the components into.protected void installComponentDefaults(JXHeader h)
the
- header to install the components into.protected void uninstallComponentDefaults(JXHeader h)
the
- header to uninstall from.protected void installListeners(JXHeader header)
protected void uninstallListeners(JXHeader h)
protected void onPropertyChange(JXHeader h, java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
protected Painter createBackgroundPainter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |