com.jgoodies.forms.util
Class LayoutStyle
java.lang.Object
com.jgoodies.forms.util.LayoutStyle
public abstract class LayoutStyle
extends java.lang.Object
An abstract class that describes a layout and design style guide.
It provides constants used to lay out panels consistently.
This class is work in progress and the API may change without notice.
Therefore it is recommended to not write custom subclasses
for production code.
A future version of this class will likely collaborate with a class
LogicalSize
or
StyledSize
.
com.jgoodies.forms.util.MacLayoutStyle
, com.jgoodies.forms.util.WindowsLayoutStyle
, FormFactory
, Borders
getButtonBarPad
public abstract ConstantSize getButtonBarPad()
Returns a pad used to separate a button bar from a component.
- a vertical pad used to separate paragraphs
getCurrent
public static LayoutStyle getCurrent()
Returns the current LayoutStyle
.
getDefaultButtonHeight
public abstract Size getDefaultButtonHeight()
Returns this style's default button height.
- the default button height
getDefaultButtonWidth
public abstract Size getDefaultButtonWidth()
Returns this style's default button width.
getDialogMarginX
public abstract ConstantSize getDialogMarginX()
Returns this style's horizontal margin for general dialogs.
- the horizontal margin for general dialogs
getDialogMarginY
public abstract ConstantSize getDialogMarginY()
Returns this style's vertical margin for general dialogs.
- the vertical margin for general dialogs
getLabelComponentPadX
public abstract ConstantSize getLabelComponentPadX()
Returns a gap used to separate a label and associated control.
- a gap between label and associated control
getLinePad
public abstract ConstantSize getLinePad()
Returns a narrow vertical pad used to separate lines.
- a vertical pad used to separate lines
getNarrowLinePad
public abstract ConstantSize getNarrowLinePad()
Returns a narrow vertical pad used to separate lines.
- a narrow vertical pad used to separate lines
getParagraphPad
public abstract ConstantSize getParagraphPad()
Returns a pad used to separate paragraphs.
- a vertical pad used to separate paragraphs
getRelatedComponentsPadX
public abstract ConstantSize getRelatedComponentsPadX()
Returns a horizontal gap used to separate related controls.
- a horizontal gap between related controls
getRelatedComponentsPadY
public abstract ConstantSize getRelatedComponentsPadY()
Returns a vertical gap used to separate related controls.
- a vertical gap between related controls
getTabbedDialogMarginX
public abstract ConstantSize getTabbedDialogMarginX()
Returns this style's horizontal margin for dialogs that consist of
a tabbed pane.
- the horizontal margin for dialogs that consist of a tabbed pane
getTabbedDialogMarginY
public abstract ConstantSize getTabbedDialogMarginY()
Returns this style's vertical margin for dialogs that consist of
a tabbed pane.
- the vertical margin for dialogs that consist of a tabbed pane
getUnrelatedComponentsPadX
public abstract ConstantSize getUnrelatedComponentsPadX()
Returns a horizontal gap used to separate unrelated controls.
- a horizontal gap between unrelated controls
getUnrelatedComponentsPadY
public abstract ConstantSize getUnrelatedComponentsPadY()
Returns a vertical gap used to separate unrelated controls.
- a vertical gap between unrelated controls
isLeftToRightButtonOrder
public abstract boolean isLeftToRightButtonOrder()
Checks and answers whether buttons are typically ordered from
left to right or from right to left. Useful for building button bars
that shall comply with the platform's layout style guide.
For example the Windows style guide recommends to layout out
OK, Cancel, Apply from left to right, where the
Mac Aqua style guide recommends to layout out these buttons
from right to left.
Although most button sequences shall honor this order
some buttons require a left to right order. For example
Back, Next or
Move Left, Move Right.
- true if buttons are typically ordered from left to right
setCurrent
public static void setCurrent(LayoutStyle newLayoutStyle)
Set a new LayoutStyle
.
newLayoutStyle
- the style to be set
Copyright © 2002-2006 JGoodies Karsten Lentzsch. All Rights Reserved.