|
||||||||||
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 JLabel |
imagePanel
|
protected JLabel |
titleLabel
|
Constructor Summary | |
---|---|
BasicHeaderUI()
Creates a new instance of BasicHeaderUI |
Method Summary | |
---|---|
protected Painter |
createBackgroundPainter()
|
static ComponentUI |
createUI(JComponent c)
Returns an instance of the UI delegate for the specified component. |
protected void |
installComponentDefaults(JXHeader header)
Configures the component default properties from the given header. |
protected void |
installComponents(JXHeader header)
Creates, configures, adds contained components. |
protected void |
installDefaults(JXHeader header)
Installs default header properties. |
protected void |
installListeners(JXHeader header)
|
void |
installUI(JComponent c)
Configures the specified component appropriate for the look and feel. |
protected void |
onPropertyChange(JXHeader h,
String propertyName,
Object oldValue,
Object newValue)
|
protected void |
uninstallComponentDefaults(JXHeader header)
Uninstalls component defaults. |
protected void |
uninstallComponents(JXHeader header)
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(JComponent c)
Reverses configuration which was done on the specified component during installUI . |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, 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 JLabel titleLabel
protected BasicHeaderUI.DescriptionPane descriptionPane
protected JLabel imagePanel
Constructor Detail |
---|
public BasicHeaderUI()
Method Detail |
---|
public static ComponentUI createUI(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(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 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(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 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 header)
NOTE: this method is called before the children are created, so must not try to access any of those!.
header
- the header to install.protected void uninstallDefaults(JXHeader h)
h
- the header to ininstall the properties from.protected void installComponents(JXHeader header)
header
- the header to install the components into.protected void uninstallComponents(JXHeader header)
header
- the header to install the components into.protected void installComponentDefaults(JXHeader header)
header
- the header to install the components into.protected void uninstallComponentDefaults(JXHeader header)
header
- the header to uninstall from.protected void installListeners(JXHeader header)
protected void uninstallListeners(JXHeader h)
protected void onPropertyChange(JXHeader h, String propertyName, Object oldValue, Object newValue)
protected Painter createBackgroundPainter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |