| java.lang.Object javax.swing.LayoutStyle sun.swing.DefaultLayoutStyle
DefaultLayoutStyle | public class DefaultLayoutStyle extends LayoutStyle (Code) | | An implementation of LayoutStyle that returns 6 for related
components, otherwise 12. This class also provides helper methods for
subclasses.
version: 1.8, 05/05/07 |
Method Summary | |
protected int | flipDirection(int position) | protected int | getButtonGap(JComponent source, JComponent target, int position, int offset) For some look and feels check boxs and radio buttons typically
don't paint the border, yet they have padding for a border. | protected int | getButtonGap(JComponent source, int position, int offset) For some look and feels check boxs and radio buttons typically
don't paint the border, yet they have padding for a border. | public int | getButtonGap(JComponent c, int position) If c is a check box or radio button, and the border is
not painted this returns the inset along the specified axis. | public int | getContainerGap(JComponent component, int position, Container parent) | protected int | getIndent(JComponent c, int position) Returns the amount to indent the specified component if it's
a JCheckBox or JRadioButton. | public static LayoutStyle | getInstance() | public int | getPreferredGap(JComponent component1, JComponent component2, ComponentPlacement type, int position, Container parent) | protected boolean | isLabelAndNonlabel(JComponent c1, JComponent c2, int position) Returns true if the classes identify a JLabel and a non-JLabel
along the horizontal axis. |
flipDirection | protected int flipDirection(int position)(Code) | | |
getButtonGap | protected int getButtonGap(JComponent source, JComponent target, int position, int offset)(Code) | | For some look and feels check boxs and radio buttons typically
don't paint the border, yet they have padding for a border. Look
and feel guidelines generally don't include this space. Use
this method to subtract this space from the specified
components.
Parameters: source - First component Parameters: target - Second component Parameters: position - Position doing layout along. Parameters: offset - Ideal offset, not including border/margin offset - border/margin around the component. |
getButtonGap | protected int getButtonGap(JComponent source, int position, int offset)(Code) | | For some look and feels check boxs and radio buttons typically
don't paint the border, yet they have padding for a border. Look
and feel guidelines generally don't include this space. Use
this method to subtract this space from the specified
components.
Parameters: source - Component Parameters: position - Position doing layout along. Parameters: offset - Ideal offset, not including border/margin offset - border/margin around the component. |
getButtonGap | public int getButtonGap(JComponent c, int position)(Code) | | If c is a check box or radio button, and the border is
not painted this returns the inset along the specified axis.
|
getIndent | protected int getIndent(JComponent c, int position)(Code) | | Returns the amount to indent the specified component if it's
a JCheckBox or JRadioButton. If the component is not a JCheckBox or
JRadioButton, 0 will be returned.
|
isLabelAndNonlabel | protected boolean isLabelAndNonlabel(JComponent c1, JComponent c2, int position)(Code) | | Returns true if the classes identify a JLabel and a non-JLabel
along the horizontal axis.
|
|
|