javax.swing.plaf.basic
Class BasicOptionPaneUI

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI 
      extended by javax.swing.plaf.OptionPaneUI sample code for javax.swing.plaf.OptionPaneUI definition code for javax.swing.plaf.OptionPaneUI 
          extended by javax.swing.plaf.basic.BasicOptionPaneUI

public class BasicOptionPaneUI
extends OptionPaneUI sample code for javax.swing.plaf.OptionPaneUI definition code for javax.swing.plaf.OptionPaneUI

Provides the basic look and feel for a JOptionPane. BasicMessagePaneUI provides a means to place an icon, message and buttons into a Container. Generally, the layout will look like:

        ------------------
        | i | message    |
        | c | message    |
        | o | message    |
        | n | message    |
        ------------------
        |     buttons    |
        |________________|
 
icon is an instance of Icon that is wrapped 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 above layout is used when the option pane's ComponentOrientation property is horizontal, left-to-right. The layout will be adjusted appropriately for other orientations.

The Container, message, icon, and buttons are all determined from abstract methods.


Nested Class Summary
 class BasicOptionPaneUI.ButtonActionListener sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener
          This inner class is marked "public" due to a compiler bug.
static class BasicOptionPaneUI.ButtonAreaLayout sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
          ButtonAreaLayout behaves in a similar manner to FlowLayout.
 class BasicOptionPaneUI.PropertyChangeHandler sample code for javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler definition code for javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler
          This inner class is marked "public" due to a compiler bug.
 
Field Summary
protected  boolean hasCustomComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.hasCustomComponents definition code for javax.swing.plaf.basic.BasicOptionPaneUI.hasCustomComponents
          This is set to true in validateComponent if a Component is contained in either the message or the buttons.
protected  Component sample code for java.awt.Component definition code for java.awt.Component initialFocusComponent sample code for javax.swing.plaf.basic.BasicOptionPaneUI.initialFocusComponent definition code for javax.swing.plaf.basic.BasicOptionPaneUI.initialFocusComponent
          Component to receive focus when messaged with selectInitialValue.
protected  JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent inputComponent sample code for javax.swing.plaf.basic.BasicOptionPaneUI.inputComponent definition code for javax.swing.plaf.basic.BasicOptionPaneUI.inputComponent
          JComponent provide for input if optionPane.getWantsInput() returns true.
static int MinimumHeight sample code for javax.swing.plaf.basic.BasicOptionPaneUI.MinimumHeight definition code for javax.swing.plaf.basic.BasicOptionPaneUI.MinimumHeight
           
protected  Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension minimumSize sample code for javax.swing.plaf.basic.BasicOptionPaneUI.minimumSize definition code for javax.swing.plaf.basic.BasicOptionPaneUI.minimumSize
           
static int MinimumWidth sample code for javax.swing.plaf.basic.BasicOptionPaneUI.MinimumWidth definition code for javax.swing.plaf.basic.BasicOptionPaneUI.MinimumWidth
           
protected  JOptionPane sample code for javax.swing.JOptionPane definition code for javax.swing.JOptionPane optionPane sample code for javax.swing.plaf.basic.BasicOptionPaneUI.optionPane definition code for javax.swing.plaf.basic.BasicOptionPaneUI.optionPane
          JOptionPane that the receiver is providing the look and feel for.
protected  PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener propertyChangeListener sample code for javax.swing.plaf.basic.BasicOptionPaneUI.propertyChangeListener definition code for javax.swing.plaf.basic.BasicOptionPaneUI.propertyChangeListener
           
 
Constructor Summary
BasicOptionPaneUI sample code for javax.swing.plaf.basic.BasicOptionPaneUI.BasicOptionPaneUI() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.BasicOptionPaneUI() ()
           
 
Method Summary
protected  void addButtonComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.addButtonComponents(java.awt.Container, java.lang.Object[], int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.addButtonComponents(java.awt.Container, java.lang.Object[], int) (Container sample code for java.awt.Container definition code for java.awt.Container  container, Object sample code for java.lang.Object definition code for java.lang.Object [] buttons, int initialIndex)
          Creates the appropriate object to represent each of the objects in buttons and adds it to container.
protected  void addIcon sample code for javax.swing.plaf.basic.BasicOptionPaneUI.addIcon(java.awt.Container) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.addIcon(java.awt.Container) (Container sample code for java.awt.Container definition code for java.awt.Container  top)
          Creates and adds a JLabel representing the icon returned from getIcon to top.
protected  void addMessageComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.addMessageComponents(java.awt.Container, java.awt.GridBagConstraints, java.lang.Object, int, boolean) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.addMessageComponents(java.awt.Container, java.awt.GridBagConstraints, java.lang.Object, int, boolean) (Container sample code for java.awt.Container definition code for java.awt.Container  container, GridBagConstraints sample code for java.awt.GridBagConstraints definition code for java.awt.GridBagConstraints  cons, Object sample code for java.lang.Object definition code for java.lang.Object  msg, int maxll, boolean internallyCreated)
          Creates the appropriate object to represent msg and places it into container.
protected  void burstStringInto sample code for javax.swing.plaf.basic.BasicOptionPaneUI.burstStringInto(java.awt.Container, java.lang.String, int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.burstStringInto(java.awt.Container, java.lang.String, int) (Container sample code for java.awt.Container definition code for java.awt.Container  c, String sample code for java.lang.String definition code for java.lang.String  d, int maxll)
          Recursively creates new JLabel instances to represent d.
 boolean containsCustomComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.containsCustomComponents(javax.swing.JOptionPane) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.containsCustomComponents(javax.swing.JOptionPane) (JOptionPane sample code for javax.swing.JOptionPane definition code for javax.swing.JOptionPane  op)
          Returns true if in the last call to validateComponent the message or buttons contained a subclass of Component.
protected  ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener createButtonActionListener sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createButtonActionListener(int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createButtonActionListener(int) (int buttonIndex)
           
protected  Container sample code for java.awt.Container definition code for java.awt.Container createButtonArea sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createButtonArea() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createButtonArea() ()
          Creates and returns a Container containing the buttons.
protected  LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager createLayoutManager sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createLayoutManager() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createLayoutManager() ()
           
protected  Container sample code for java.awt.Container definition code for java.awt.Container createMessageArea sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createMessageArea() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createMessageArea() ()
          Messaged from installComponents to create a Container containing the body of the message.
protected  PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener createPropertyChangeListener sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createPropertyChangeListener() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createPropertyChangeListener() ()
           
protected  Container sample code for java.awt.Container definition code for java.awt.Container createSeparator sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createSeparator() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createSeparator() ()
           
static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI createUI sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  x)
          Creates a new BasicOptionPaneUI instance.
protected  Object sample code for java.lang.Object definition code for java.lang.Object [] getButtons sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getButtons() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getButtons() ()
          Returns the buttons to display from the JOptionPane the receiver is providing the look and feel for.
protected  Icon sample code for javax.swing.Icon definition code for javax.swing.Icon getIcon sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getIcon() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.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 sample code for javax.swing.Icon definition code for javax.swing.Icon getIconForType sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(int) (int messageType)
          Returns the icon to use for the passed in type.
protected  int getInitialValueIndex sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getInitialValueIndex() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getInitialValueIndex() ()
          Returns the initial index into the buttons to select.
protected  int getMaxCharactersPerLineCount sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getMaxCharactersPerLineCount() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getMaxCharactersPerLineCount() ()
          Returns the maximum number of characters to place on a line.
protected  Object sample code for java.lang.Object definition code for java.lang.Object getMessage sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getMessage() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getMessage() ()
          Returns the message to display from the JOptionPane the receiver is providing the look and feel for.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumOptionPaneSize sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getMinimumOptionPaneSize() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getMinimumOptionPaneSize() ()
          Returns the minimum size the option pane should be.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getPreferredSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          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 sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getSizeButtonsToSameWidth() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getSizeButtonsToSameWidth() ()
          Returns true, basic L&F wants all the buttons to have the same width.
protected  void installComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.installComponents() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.installComponents() ()
           
protected  void installDefaults sample code for javax.swing.plaf.basic.BasicOptionPaneUI.installDefaults() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.installDefaults() ()
           
protected  void installKeyboardActions sample code for javax.swing.plaf.basic.BasicOptionPaneUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.installKeyboardActions() ()
           
protected  void installListeners sample code for javax.swing.plaf.basic.BasicOptionPaneUI.installListeners() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.installListeners() ()
           
 void installUI sample code for javax.swing.plaf.basic.BasicOptionPaneUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.installUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Installs the receiver as the L&F for the passed in JOptionPane.
protected  void resetInputValue sample code for javax.swing.plaf.basic.BasicOptionPaneUI.resetInputValue() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.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.
 void selectInitialValue sample code for javax.swing.plaf.basic.BasicOptionPaneUI.selectInitialValue(javax.swing.JOptionPane) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.selectInitialValue(javax.swing.JOptionPane) (JOptionPane sample code for javax.swing.JOptionPane definition code for javax.swing.JOptionPane  op)
          If inputComponent is non-null, the focus is requested on that, otherwise request focus on the default value
protected  void uninstallComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallComponents() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallComponents() ()
           
protected  void uninstallDefaults sample code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallDefaults() ()
           
protected  void uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallKeyboardActions() ()
           
protected  void uninstallListeners sample code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallListeners() ()
           
 void uninstallUI sample code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Removes the receiver from the L&F controller of the passed in split pane.
 
Methods inherited from class javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
contains sample code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) definition code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) , getAccessibleChild sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) , getAccessibleChildrenCount sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) , getMaximumSize sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) , getMinimumSize sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) , paint sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) , update sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

MinimumWidth sample code for javax.swing.plaf.basic.BasicOptionPaneUI.MinimumWidth

public static final int MinimumWidth
See Also:
Constant Field Values

MinimumHeight sample code for javax.swing.plaf.basic.BasicOptionPaneUI.MinimumHeight

public static final int MinimumHeight
See Also:
Constant Field Values

optionPane sample code for javax.swing.plaf.basic.BasicOptionPaneUI.optionPane

protected JOptionPane sample code for javax.swing.JOptionPane definition code for javax.swing.JOptionPane  optionPane
JOptionPane that the receiver is providing the look and feel for.


minimumSize sample code for javax.swing.plaf.basic.BasicOptionPaneUI.minimumSize

protected Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  minimumSize

inputComponent sample code for javax.swing.plaf.basic.BasicOptionPaneUI.inputComponent

protected JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  inputComponent
JComponent provide for input if optionPane.getWantsInput() returns true.


initialFocusComponent sample code for javax.swing.plaf.basic.BasicOptionPaneUI.initialFocusComponent

protected Component sample code for java.awt.Component definition code for java.awt.Component  initialFocusComponent
Component to receive focus when messaged with selectInitialValue.


hasCustomComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.hasCustomComponents

protected boolean hasCustomComponents
This is set to true in validateComponent if a Component is contained in either the message or the buttons.


propertyChangeListener sample code for javax.swing.plaf.basic.BasicOptionPaneUI.propertyChangeListener

protected PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  propertyChangeListener
Constructor Detail

BasicOptionPaneUI sample code for javax.swing.plaf.basic.BasicOptionPaneUI() definition code for javax.swing.plaf.basic.BasicOptionPaneUI()

public BasicOptionPaneUI()
Method Detail

createUI sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createUI(javax.swing.JComponent)

public static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI  createUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  x)
Creates a new BasicOptionPaneUI instance.


installUI sample code for javax.swing.plaf.basic.BasicOptionPaneUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.installUI(javax.swing.JComponent)

public void installUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Installs the receiver as the L&F for the passed in JOptionPane.

Overrides:
installUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component where this UI delegate is being installed
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) , JComponent.setUI(javax.swing.plaf.ComponentUI) sample code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) definition code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

uninstallUI sample code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallUI(javax.swing.JComponent)

public void uninstallUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Removes the receiver from the L&F controller of the passed in split pane.

Overrides:
uninstallUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
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 components
See Also:
ComponentUI.installUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

installDefaults sample code for javax.swing.plaf.basic.BasicOptionPaneUI.installDefaults() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.installDefaults()

protected void installDefaults()

uninstallDefaults sample code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallDefaults()

protected void uninstallDefaults()

installComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.installComponents() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.installComponents()

protected void installComponents()

uninstallComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallComponents() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallComponents()

protected void uninstallComponents()

createLayoutManager sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createLayoutManager() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createLayoutManager()

protected LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager  createLayoutManager()

installListeners sample code for javax.swing.plaf.basic.BasicOptionPaneUI.installListeners() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.installListeners()

protected void installListeners()

uninstallListeners sample code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallListeners()

protected void uninstallListeners()

createPropertyChangeListener sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createPropertyChangeListener() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createPropertyChangeListener()

protected PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  createPropertyChangeListener()

installKeyboardActions sample code for javax.swing.plaf.basic.BasicOptionPaneUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.installKeyboardActions()

protected void installKeyboardActions()

uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.uninstallKeyboardActions()

protected void uninstallKeyboardActions()

getMinimumOptionPaneSize sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getMinimumOptionPaneSize() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getMinimumOptionPaneSize()

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumOptionPaneSize()
Returns the minimum size the option pane should be. Primarily provided for subclassers wishing to offer a different minimum size.


getPreferredSize sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getPreferredSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
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.

Overrides:
getPreferredSize sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
JComponent.getPreferredSize() sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , LayoutManager.preferredLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container)

createMessageArea sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createMessageArea() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createMessageArea()

protected Container sample code for java.awt.Container definition code for java.awt.Container  createMessageArea()
Messaged from installComponents to create a Container containing the body of the message. The icon is the created by calling addIcon.


addMessageComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.addMessageComponents(java.awt.Container, java.awt.GridBagConstraints, java.lang.Object, int, boolean) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.addMessageComponents(java.awt.Container, java.awt.GridBagConstraints, java.lang.Object, int, boolean)

protected void addMessageComponents(Container sample code for java.awt.Container definition code for java.awt.Container  container,
                                    GridBagConstraints sample code for java.awt.GridBagConstraints definition code for java.awt.GridBagConstraints  cons,
                                    Object sample code for java.lang.Object definition code for java.lang.Object  msg,
                                    int maxll,
                                    boolean internallyCreated)
Creates the appropriate object to represent msg and places it into container. If msg 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).


getMessage sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getMessage() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getMessage()

protected Object sample code for java.lang.Object definition code for java.lang.Object  getMessage()
Returns the message to display from the JOptionPane the receiver is providing the look and feel for.


addIcon sample code for javax.swing.plaf.basic.BasicOptionPaneUI.addIcon(java.awt.Container) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.addIcon(java.awt.Container)

protected void addIcon(Container sample code for java.awt.Container definition code for java.awt.Container  top)
Creates and adds a JLabel representing the icon returned from getIcon to top. This is messaged from createMessageArea


getIcon sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getIcon() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getIcon()

protected Icon sample code for javax.swing.Icon definition code for javax.swing.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.


getIconForType sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(int)

protected Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  getIconForType(int messageType)
Returns the icon to use for the passed in type.


getMaxCharactersPerLineCount sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getMaxCharactersPerLineCount() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getMaxCharactersPerLineCount()

protected int getMaxCharactersPerLineCount()
Returns the maximum number of characters to place on a line.


burstStringInto sample code for javax.swing.plaf.basic.BasicOptionPaneUI.burstStringInto(java.awt.Container, java.lang.String, int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.burstStringInto(java.awt.Container, java.lang.String, int)

protected void burstStringInto(Container sample code for java.awt.Container definition code for java.awt.Container  c,
                               String sample code for java.lang.String definition code for java.lang.String  d,
                               int maxll)
Recursively creates new JLabel instances to represent d. Each JLabel instance is added to c.


createSeparator sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createSeparator() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createSeparator()

protected Container sample code for java.awt.Container definition code for java.awt.Container  createSeparator()

createButtonArea sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createButtonArea() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createButtonArea()

protected Container sample code for java.awt.Container definition code for java.awt.Container  createButtonArea()
Creates and returns a Container containing the buttons. The buttons are created by calling getButtons.


addButtonComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.addButtonComponents(java.awt.Container, java.lang.Object[], int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.addButtonComponents(java.awt.Container, java.lang.Object[], int)

protected void addButtonComponents(Container sample code for java.awt.Container definition code for java.awt.Container  container,
                                   Object sample code for java.lang.Object definition code for java.lang.Object [] buttons,
                                   int initialIndex)
Creates the appropriate object to represent each of the objects in buttons and adds it to container. This differs from addMessageComponents in that it will recurse on buttons and that if button is not a Component it will create an instance of JButton.


createButtonActionListener sample code for javax.swing.plaf.basic.BasicOptionPaneUI.createButtonActionListener(int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.createButtonActionListener(int)

protected ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener  createButtonActionListener(int buttonIndex)

getButtons sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getButtons() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getButtons()

protected Object sample code for java.lang.Object definition code for java.lang.Object [] getButtons()
Returns the buttons to display from the JOptionPane the receiver is providing the look and feel for. If the JOptionPane has options set, they will be provided, otherwise if the optionType is YES_NO_OPTION, yesNoOptions is returned, if the type is YES_NO_CANCEL_OPTION yesNoCancelOptions is returned, otherwise defaultButtons are returned.


getSizeButtonsToSameWidth sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getSizeButtonsToSameWidth() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getSizeButtonsToSameWidth()

protected boolean getSizeButtonsToSameWidth()
Returns true, basic L&F wants all the buttons to have the same width.


getInitialValueIndex sample code for javax.swing.plaf.basic.BasicOptionPaneUI.getInitialValueIndex() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.getInitialValueIndex()

protected int getInitialValueIndex()
Returns the initial index into the buttons to select. The index is calculated from the initial value from the JOptionPane and options of the JOptionPane or 0.


resetInputValue sample code for javax.swing.plaf.basic.BasicOptionPaneUI.resetInputValue() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.resetInputValue()

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.


selectInitialValue sample code for javax.swing.plaf.basic.BasicOptionPaneUI.selectInitialValue(javax.swing.JOptionPane) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.selectInitialValue(javax.swing.JOptionPane)

public void selectInitialValue(JOptionPane sample code for javax.swing.JOptionPane definition code for javax.swing.JOptionPane  op)
If inputComponent is non-null, the focus is requested on that, otherwise request focus on the default value

Specified by:
selectInitialValue sample code for javax.swing.plaf.OptionPaneUI.selectInitialValue(javax.swing.JOptionPane) definition code for javax.swing.plaf.OptionPaneUI.selectInitialValue(javax.swing.JOptionPane) in class OptionPaneUI sample code for javax.swing.plaf.OptionPaneUI definition code for javax.swing.plaf.OptionPaneUI

containsCustomComponents sample code for javax.swing.plaf.basic.BasicOptionPaneUI.containsCustomComponents(javax.swing.JOptionPane) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.containsCustomComponents(javax.swing.JOptionPane)

public boolean containsCustomComponents(JOptionPane sample code for javax.swing.JOptionPane definition code for javax.swing.JOptionPane  op)
Returns true if in the last call to validateComponent the message or buttons contained a subclass of Component.

Specified by:
containsCustomComponents sample code for javax.swing.plaf.OptionPaneUI.containsCustomComponents(javax.swing.JOptionPane) definition code for javax.swing.plaf.OptionPaneUI.containsCustomComponents(javax.swing.JOptionPane) in class OptionPaneUI sample code for javax.swing.plaf.OptionPaneUI definition code for javax.swing.plaf.OptionPaneUI