API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.plaf.basic. BasicOptionPaneUI View Source
Author(s)
James Gosling
Scott Violet
Amy Fowler
Since
Version
1.61 04/04/06
Serial
Hierarchy
 Object
      ComponentUI
          OptionPaneUI
              BasicOptionPaneUI
Implements
Subclasses
Description
public class BasicOptionPaneUI
  Provides the basic look and feel for a JOptionPane.
See also:   
Constructors
public BasicOptionPaneUI ()
Methods
Hide/Show inherited methods
protected void addButtonComponents (Container container, Object buttons, int initialIndex)
  Creates the appropriate object to represent each of the objects in buttons and adds it to container.
protected void addIcon (Container top)
  Creates and adds a JLabel representing the icon returned from getIcon to top.
protected void addMessageComponents (Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated)
  Creates the appropriate object to represent msg and places it into container.
protected void burstStringInto (Container c, String d, int maxll)
  Recursively creates new JLabel instances to represent d.
public boolean contains (JComponent c, int x, int y) [Inherited From ComponentUI]
  Returns true if the specified x,y location is contained within the look and feel's defined shape of the specified component.
public boolean containsCustomComponents (JOptionPane op) [Specified in OptionPaneUI]
Returns true if in the last call to validateComponent the message or buttons contained a subclass of Component.
protected ActionListener createButtonActionListener (int buttonIndex)
protected Container createButtonArea ()
  Creates and returns a Container containing the buttons.
protected LayoutManager createLayoutManager ()
protected Container createMessageArea ()
  Messaged from installComponents to create a Container containing the body of the message.
protected PropertyChangeListener createPropertyChangeListener ()
protected Container createSeparator ()
publicstatic ComponentUI createUI (JComponent x) [Overrides ComponentUI]
Creates a new BasicOptionPaneUI instance.
public Accessible getAccessibleChild (JComponent c, int i) [Inherited From ComponentUI]
  Returns the ith Accessible child of the object.
public int getAccessibleChildrenCount (JComponent c) [Inherited From ComponentUI]
  Returns the number of accessible children in the object.
public int getBaseline (JComponent c, int width, int height) [Inherited From ComponentUI]
  Returns the baseline.
public BaselineResizeBehavior getBaselineResizeBehavior (JComponent c) [Inherited From ComponentUI]
  Returns an enum indicating how the baseline of he component changes as the size changes.
protected Object getButtons ()
  Returns the buttons to display from the JOptionPane the receiver is providing the look and feel for.
protected Icon getIcon ()
Returns the icon from the JOptionPane the receiver is providing the look and feel for, or the default icon as returned from getDefaultIcon.
protected Icon getIconForType (int messageType)
Returns the icon to use for the passed in type.
protected int getInitialValueIndex ()
  Returns the initial index into the buttons to select.
pack-private InputMap getInputMap (int condition)
protected int getMaxCharactersPerLineCount ()
Returns the maximum number of characters to place on a line.
public Dimension getMaximumSize (JComponent c) [Inherited From ComponentUI]
  Returns the specified component's maximum size appropriate for the look and feel.
protected Object getMessage ()
Returns the message to display from the JOptionPane the receiver is providing the look and feel for.
public Dimension getMinimumOptionPaneSize ()
  Returns the minimum size the option pane should be.
public Dimension getMinimumSize (JComponent c) [Inherited From ComponentUI]
  Returns the specified component's minimum size appropriate for the look and feel.
public Dimension getPreferredSize (JComponent c) [Overrides ComponentUI]
If c is the JOptionPane the receiver is contained in, the preferred size that is returned is the maximum of the preferred size of the LayoutManager for the JOptionPane, and getMinimumOptionPaneSize.
protected boolean getSizeButtonsToSameWidth ()
Returns true, basic L&F wants all the buttons to have the same width.
protected void installComponents ()
protected void installDefaults ()
protected void installKeyboardActions ()
protected void installListeners ()
public void installUI (JComponent c) [Overrides ComponentUI]
Installs the receiver as the L&F for the passed in JOptionPane.
pack-privatestatic void loadActionMap (LazyActionMap map)
public void paint (Graphics g, JComponent c) [Inherited From ComponentUI]
  Paints the specified component appropriate for the look and feel.
protected void resetInputValue ()
Sets the input value in the option pane the receiver is providing the look and feel for based on the value in the inputComponent.
public void selectInitialValue (JOptionPane op) [Specified in OptionPaneUI]
If inputComponent is non-null, the focus is requested on that, otherwise request focus on the default value
protected void uninstallComponents ()
protected void uninstallDefaults ()
protected void uninstallKeyboardActions ()
protected void uninstallListeners ()
public void uninstallUI (JComponent c) [Overrides ComponentUI]
Removes the receiver from the L&F controller of the passed in split pane.
public void update (Graphics g, JComponent c) [Inherited From ComponentUI]
  Notifies this UI delegate that it's time to paint the specified component.
Fields
Hide/Show inherited fields
protected boolean hasCustomComponents
This is set to true in validateComponent if a Component is contained in either the message or the buttons.
protected Component initialFocusComponent
Component to receive focus when messaged with selectInitialValue.
protected JComponent inputComponent
JComponent provide for input if optionPane.getWantsInput() returns true.
publicfinalstatic int MinimumHeight = "90"
protected Dimension minimumSize
publicfinalstatic int MinimumWidth = "262"
protected JOptionPane optionPane
JOptionPane that the receiver is providing the look and feel for.
protected PropertyChangeListener propertyChangeListener
Nested Classes
  BasicOptionPaneUI.ButtonAreaLayout
ButtonAreaLayout behaves in a similar manner to FlowLayout.
  BasicOptionPaneUI.PropertyChangeHandler
This inner class is marked "public" due to a compiler bug.
  BasicOptionPaneUI.ButtonActionListener
This inner class is marked "public" due to a compiler bug.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar