All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----com.sun.java.swing.plaf.ComponentUI
|
+----com.sun.java.swing.plaf.OptionPaneUI
|
+----com.sun.java.swing.basic.AbstractOptionPaneUI
------------------
| i | message |
| c | message |
| o | message |
| n | message |
------------------
| buttons |
|________________|
icon is an instance of Icon that is wraped inside a JLabel.
The message is an opaque object and is tested for the following:
if the message is a Component it is added to the Container, if
it is an Icon it is wrapped inside a JLabel and added to the
Container otherwise it is wrapped inside a JLabel.
The Container, message, icon, and buttons are all determined from abstract methods.
buttons and adds it to container.
d and
places it into container.
d.
appendButtons
has been pressed.
validateComponent to remove all the
components from container.
protected Component initialFocusComponent
protected boolean hasCustomComponents
public AbstractOptionPaneUI()
public abstract Icon getIcon()
public abstract Object getMessage()
public abstract Object[] getButtons()
public abstract Container getContainer()
public abstract int getInitialIndex()
public boolean getSizeButtonsToSameWidth()
public boolean containsCustomComponents()
public int getMaxCharactersPerLineCount()
public void selectInitialValue()
protected void burstStringInto(Container c,
String d,
int maxll)
d.
Each JLabel instance is added to c.
protected void appendDescription(Container container,
GridBagConstraints cons,
Object d,
int maxll,
boolean internallyCreated)
d and
places it into container. If d is an
instance of Component, it is added directly, if it is an Icon,
a JLabel is created to represent it, otherwise a JLabel is
created for the string, if d is an Object[], this
method will be recursively invoked for the children.
internallyCreated is true if Objc is an instance
of Component and was created internally by this method (this is
used to correctly set hasCustomComponents only if !internallyCreated).
protected void appendButtons(Container container,
Object buttons[],
int initialIndex)
buttons and adds it to container. This
differs from appendDescription in that it will recurse on
buttons and that if button is not a Component
it will create an instance of JButton, that when pressed will
invoke createdButtonFired with the appropriate
index.
protected void createdButtonFired(int buttonIndex)
appendButtons
has been pressed. buttonIndex identifies the index
of the button from the buttonsarray that was passed
into appendButtons.
protected void emptyContainer(Container container)
validateComponent to remove all the
components from container. This invokes removeAll
on container, but is provided should subclasses wish
to not remove everything.
protected void validateComponent()
All Packages Class Hierarchy This Package Previous Next Index