com.jgoodies.forms.util
Class LayoutStyle

java.lang.Object
  extended by 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 layout 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.

Version:
$Revision: 1.1 $
Author:
Karsten Lentzsch

Constructor Summary
LayoutStyle()
           
 
Method Summary
static LayoutStyle getCurrent()
          Returns the current LayoutStyle.
abstract  Size getDefaultButtonHeight()
          Answers the style's default button height.
abstract  Size getDefaultButtonWidth()
          Answers the style's default button width.
abstract  ConstantSize getDialogMarginX()
          Answers the style's horizontal dialog margin.
abstract  ConstantSize getDialogMarginY()
          Answers the style's vertical dialog margin.
abstract  ConstantSize getLabelComponentPadX()
          Answers a gap used to separate a label and associated control.
abstract  ConstantSize getLinePad()
          Answers a narrow vertical pad used to separate lines.
abstract  ConstantSize getNarrowLinePad()
          Answers a narrow vertical pad used to separate lines.
abstract  ConstantSize getParagraphPad()
          Answers a pad used to paragraphs.
abstract  ConstantSize getRelatedComponentsPadX()
          Answers a horizontal gap used to separate related controls.
abstract  ConstantSize getRelatedComponentsPadY()
          Answers a vertical gap used to separate related controls.
abstract  ConstantSize getUnrelatedComponentsPadX()
          Answers a horizontal gap used to separate unrelated controls.
abstract  ConstantSize getUnrelatedComponentsPadY()
          Answers a vertical gap used to separate unrelated controls.
static void setCurrent(LayoutStyle newLayoutStyle)
          Set a new LayoutStyle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutStyle

public LayoutStyle()
Method Detail

getCurrent

public static LayoutStyle getCurrent()
Returns the current LayoutStyle.

Returns:
the current LayoutStyle

setCurrent

public static void setCurrent(LayoutStyle newLayoutStyle)
Set a new LayoutStyle


getDefaultButtonWidth

public abstract Size getDefaultButtonWidth()
Answers the style's default button width.

Returns:
the default button width

getDefaultButtonHeight

public abstract Size getDefaultButtonHeight()
Answers the style's default button height.

Returns:
the default button height

getDialogMarginX

public abstract ConstantSize getDialogMarginX()
Answers the style's horizontal dialog margin.

Returns:
the horizontal dialog margin

getDialogMarginY

public abstract ConstantSize getDialogMarginY()
Answers the style's vertical dialog margin.

Returns:
the vertical dialog margin

getLabelComponentPadX

public abstract ConstantSize getLabelComponentPadX()
Answers a gap used to separate a label and associated control.

Returns:
a gap between label and associated control

getRelatedComponentsPadX

public abstract ConstantSize getRelatedComponentsPadX()
Answers a horizontal gap used to separate related controls.

Returns:
a horizontal gap between related controls

getRelatedComponentsPadY

public abstract ConstantSize getRelatedComponentsPadY()
Answers a vertical gap used to separate related controls.

Returns:
a vertical gap between related controls

getUnrelatedComponentsPadX

public abstract ConstantSize getUnrelatedComponentsPadX()
Answers a horizontal gap used to separate unrelated controls.

Returns:
a horizontal gap between unrelated controls

getUnrelatedComponentsPadY

public abstract ConstantSize getUnrelatedComponentsPadY()
Answers a vertical gap used to separate unrelated controls.

Returns:
a vertical gap between unrelated controls

getLinePad

public abstract ConstantSize getLinePad()
Answers a narrow vertical pad used to separate lines.

Returns:
a vertical pad used to separate lines

getNarrowLinePad

public abstract ConstantSize getNarrowLinePad()
Answers a narrow vertical pad used to separate lines.

Returns:
a narrow vertical pad used to separate lines

getParagraphPad

public abstract ConstantSize getParagraphPad()
Answers a pad used to paragraphs.

Returns:
a vertical pad used to separate paragraphs