javax.swing.plaf.basic
Class BasicOptionPaneUI.ButtonAreaLayout

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
All Implemented Interfaces:
LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager
Enclosing class:
BasicOptionPaneUI sample code for javax.swing.plaf.basic.BasicOptionPaneUI definition code for javax.swing.plaf.basic.BasicOptionPaneUI

public static class BasicOptionPaneUI.ButtonAreaLayout
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager

ButtonAreaLayout behaves in a similar manner to FlowLayout. It lays out all components from left to right. If syncAllWidths is true, the widths of each component will be set to the largest preferred size width. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicOptionPaneUI.


Field Summary
protected  boolean centersChildren sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.centersChildren definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.centersChildren
          If true, children are lumped together in parent.
protected  int padding sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.padding definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.padding
           
protected  boolean syncAllWidths sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.syncAllWidths definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.syncAllWidths
           
 
Constructor Summary
BasicOptionPaneUI.ButtonAreaLayout sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.BasicOptionPaneUI.ButtonAreaLayout(boolean, int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.BasicOptionPaneUI.ButtonAreaLayout(boolean, int) (boolean syncAllWidths, int padding)
           
 
Method Summary
 void addLayoutComponent sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.addLayoutComponent(java.lang.String, java.awt.Component) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.addLayoutComponent(java.lang.String, java.awt.Component) (String sample code for java.lang.String definition code for java.lang.String  string, Component sample code for java.awt.Component definition code for java.awt.Component  comp)
          If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.
 boolean getCentersChildren sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.getCentersChildren() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.getCentersChildren() ()
           
 int getPadding sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.getPadding() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.getPadding() ()
           
 boolean getSyncAllWidths sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.getSyncAllWidths() definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.getSyncAllWidths() ()
           
 void layoutContainer sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.layoutContainer(java.awt.Container) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.layoutContainer(java.awt.Container) (Container sample code for java.awt.Container definition code for java.awt.Container  container)
          Lays out the specified container.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension minimumLayoutSize sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.minimumLayoutSize(java.awt.Container) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.minimumLayoutSize(java.awt.Container) (Container sample code for java.awt.Container definition code for java.awt.Container  c)
          Calculates the minimum size dimensions for the specified container, given the components it contains.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension preferredLayoutSize sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.preferredLayoutSize(java.awt.Container) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.preferredLayoutSize(java.awt.Container) (Container sample code for java.awt.Container definition code for java.awt.Container  c)
          Calculates the preferred size dimensions for the specified container, given the components it contains.
 void removeLayoutComponent sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.removeLayoutComponent(java.awt.Component) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.removeLayoutComponent(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Removes the specified component from the layout.
 void setCentersChildren sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.setCentersChildren(boolean) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.setCentersChildren(boolean) (boolean newValue)
           
 void setPadding sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.setPadding(int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.setPadding(int) (int newPadding)
           
 void setSyncAllWidths sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.setSyncAllWidths(boolean) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.setSyncAllWidths(boolean) (boolean newValue)
           
 
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

syncAllWidths sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.syncAllWidths

protected boolean syncAllWidths

padding sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.padding

protected int padding

centersChildren sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.centersChildren

protected boolean centersChildren
If true, children are lumped together in parent.

Constructor Detail

BasicOptionPaneUI.ButtonAreaLayout sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout(boolean, int) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout(boolean, int)

public BasicOptionPaneUI.ButtonAreaLayout(boolean syncAllWidths,
                                          int padding)
Method Detail

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

public void setSyncAllWidths(boolean newValue)

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

public boolean getSyncAllWidths()

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

public void setPadding(int newPadding)

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

public int getPadding()

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

public void setCentersChildren(boolean newValue)

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

public boolean getCentersChildren()

addLayoutComponent sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.addLayoutComponent(java.lang.String, java.awt.Component) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.addLayoutComponent(java.lang.String, java.awt.Component)

public void addLayoutComponent(String sample code for java.lang.String definition code for java.lang.String  string,
                               Component sample code for java.awt.Component definition code for java.awt.Component  comp)
Description copied from interface: LayoutManager sample code for java.awt.LayoutManager.addLayoutComponent(java.lang.String, java.awt.Component) definition code for java.awt.LayoutManager.addLayoutComponent(java.lang.String, java.awt.Component)
If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.

Specified by:
addLayoutComponent sample code for java.awt.LayoutManager.addLayoutComponent(java.lang.String, java.awt.Component) definition code for java.awt.LayoutManager.addLayoutComponent(java.lang.String, java.awt.Component) in interface LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager
Parameters:
string - the string to be associated with the component
comp - the component to be added

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

public void layoutContainer(Container sample code for java.awt.Container definition code for java.awt.Container  container)
Description copied from interface: LayoutManager sample code for java.awt.LayoutManager.layoutContainer(java.awt.Container) definition code for java.awt.LayoutManager.layoutContainer(java.awt.Container)
Lays out the specified container.

Specified by:
layoutContainer sample code for java.awt.LayoutManager.layoutContainer(java.awt.Container) definition code for java.awt.LayoutManager.layoutContainer(java.awt.Container) in interface LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager
Parameters:
container - the container to be laid out

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

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  minimumLayoutSize(Container sample code for java.awt.Container definition code for java.awt.Container  c)
Description copied from interface: LayoutManager sample code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container)
Calculates the minimum size dimensions for the specified container, given the components it contains.

Specified by:
minimumLayoutSize sample code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) in interface LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager
Parameters:
c - the component to be laid out
See Also:
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)

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

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  preferredLayoutSize(Container sample code for java.awt.Container definition code for java.awt.Container  c)
Description copied from interface: LayoutManager sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container)
Calculates the preferred size dimensions for the specified container, given the components it contains.

Specified by:
preferredLayoutSize sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) in interface LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager
Parameters:
c - the container to be laid out
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container)

removeLayoutComponent sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.removeLayoutComponent(java.awt.Component) definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.removeLayoutComponent(java.awt.Component)

public void removeLayoutComponent(Component sample code for java.awt.Component definition code for java.awt.Component  c)
Description copied from interface: LayoutManager sample code for java.awt.LayoutManager.removeLayoutComponent(java.awt.Component) definition code for java.awt.LayoutManager.removeLayoutComponent(java.awt.Component)
Removes the specified component from the layout.

Specified by:
removeLayoutComponent sample code for java.awt.LayoutManager.removeLayoutComponent(java.awt.Component) definition code for java.awt.LayoutManager.removeLayoutComponent(java.awt.Component) in interface LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager
Parameters:
c - the component to be removed