Class LayoutStyle
java.lang.Object
com.jgoodies.forms.util.LayoutStyle
- Direct Known Subclasses:
MacLayoutStyle, WindowsLayoutStyle
An abstract class that describes a layout and design style guide.
It provides constants used to lay out panels consistently.
Note: 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 may collaborate with a class
LogicalSize or StyledSize.
- Version:
- $Revision: 1.15 $
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ConstantSizeReturns a pad used to separate a button bar from a component.static LayoutStyleReturns the currentLayoutStyle.abstract SizeReturns this style's default button height.abstract SizeReturns this style's default button width.abstract ConstantSizeReturns this style's horizontal margin for general dialogs.abstract ConstantSizeReturns this style's vertical margin for general dialogs.abstract ConstantSizeReturns a gap used to separate a label and associated control.abstract ConstantSizeReturns a gap used to separate a label and associated control.abstract ConstantSizeReturns a narrow vertical pad used to separate lines.abstract ConstantSizeReturns a narrow vertical pad used to separate lines.abstract ConstantSizeReturns a pad used to separate paragraphs.abstract ConstantSizeReturns a horizontal gap used to separate related controls.abstract ConstantSizeReturns a vertical gap used to separate related controls.abstract ConstantSizeReturns this style's horizontal margin for dialogs that consist of a tabbed pane.abstract ConstantSizeReturns this style's vertical margin for dialogs that consist of a tabbed pane.abstract ConstantSizeReturns a horizontal gap used to separate unrelated controls.abstract ConstantSizeReturns a vertical gap used to separate unrelated controls.private static LayoutStyleComputes and returns the initialLayoutStyle.static voidsetCurrent(LayoutStyle newLayoutStyle) Set a newLayoutStyle.
-
Field Details
-
current
Holds the current layout style.
-
-
Constructor Details
-
LayoutStyle
public LayoutStyle()
-
-
Method Details
-
initialLayoutStyle
Computes and returns the initialLayoutStyle. Checks the OS name and returnsMacLayoutStyleon Mac OS X andWindowLayoutStyleon all other platforms.- Returns:
- MacLayoutStyle on Mac, WindowsLayoutStyle on all other platforms
-
getCurrent
Returns the currentLayoutStyle.- Returns:
- the current
LayoutStyle
-
setCurrent
Set a newLayoutStyle.- Parameters:
newLayoutStyle- the style to be set
-
getDefaultButtonWidth
Returns this style's default button width.- Returns:
- the default button width
- See Also:
-
getDefaultButtonHeight
Returns this style's default button height.- Returns:
- the default button height
- See Also:
-
getDialogMarginX
Returns this style's horizontal margin for general dialogs.- Returns:
- the horizontal margin for general dialogs
- See Also:
-
getDialogMarginY
Returns this style's vertical margin for general dialogs.- Returns:
- the vertical margin for general dialogs
- See Also:
-
getTabbedDialogMarginX
Returns this style's horizontal margin for dialogs that consist of a tabbed pane.- Returns:
- the horizontal margin for dialogs that consist of a tabbed pane
- Since:
- 1.0.3
- See Also:
-
getTabbedDialogMarginY
Returns this style's vertical margin for dialogs that consist of a tabbed pane.- Returns:
- the vertical margin for dialogs that consist of a tabbed pane
- Since:
- 1.0.3
- See Also:
-
getLabelComponentPadX
Returns a gap used to separate a label and associated control.- Returns:
- a gap between label and associated control
- See Also:
-
getLabelComponentPadY
Returns a gap used to separate a label and associated control.- Returns:
- a gap between label and associated control
- Since:
- 1.4
- See Also:
-
getRelatedComponentsPadX
Returns a horizontal gap used to separate related controls.- Returns:
- a horizontal gap between related controls
- See Also:
-
getRelatedComponentsPadY
Returns a vertical gap used to separate related controls.- Returns:
- a vertical gap between related controls
- See Also:
-
getNarrowLinePad
Returns a narrow vertical pad used to separate lines.- Returns:
- a narrow vertical pad used to separate lines
- See Also:
-
getLinePad
Returns a narrow vertical pad used to separate lines.- Returns:
- a vertical pad used to separate lines
- See Also:
-
getParagraphPad
Returns a pad used to separate paragraphs.- Returns:
- a vertical pad used to separate paragraphs
- See Also:
-
getButtonBarPad
Returns a pad used to separate a button bar from a component.- Returns:
- a vertical pad used to separate paragraphs
- Since:
- 1.0.3
- See Also:
-