com.jgoodies.forms.util
Class WindowsLayoutStyle

java.lang.Object
  extended by com.jgoodies.forms.util.LayoutStyle
      extended by com.jgoodies.forms.util.WindowsLayoutStyle

final class WindowsLayoutStyle
extends LayoutStyle

A LayoutStyle that aims to provide layout constants as defined by Microsoft's Design Specifications and Guidelines - Visual Design.

Version:
$Revision: 47513 $
Author:
Karsten Lentzsch

Field Summary
private static ConstantSize BUTTON_BAR_PAD
           
private static Size BUTTON_HEIGHT
           
private static Size BUTTON_WIDTH
           
private static ConstantSize DIALOG_MARGIN_X
           
private static ConstantSize DIALOG_MARGIN_Y
           
(package private) static WindowsLayoutStyle INSTANCE
           
private static ConstantSize LABEL_COMPONENT_PADX
           
private static ConstantSize LINE_PAD
           
private static ConstantSize NARROW_LINE_PAD
           
private static ConstantSize PARAGRAPH_PAD
           
private static ConstantSize RELATED_COMPONENTS_PADX
           
private static ConstantSize RELATED_COMPONENTS_PADY
           
private static ConstantSize TABBED_DIALOG_MARGIN_X
           
private static ConstantSize TABBED_DIALOG_MARGIN_Y
           
private static ConstantSize UNRELATED_COMPONENTS_PADX
           
private static ConstantSize UNRELATED_COMPONENTS_PADY
           
 
Constructor Summary
private WindowsLayoutStyle()
           
 
Method Summary
 ConstantSize getButtonBarPad()
          Returns a pad used to separate a button bar from a component.
 Size getDefaultButtonHeight()
          Returns this style's default button height.
 Size getDefaultButtonWidth()
          Returns this style's default button width.
 ConstantSize getDialogMarginX()
          Returns this style's horizontal margin for general dialogs.
 ConstantSize getDialogMarginY()
          Returns this style's vertical margin for general dialogs.
 ConstantSize getLabelComponentPadX()
          Returns a gap used to separate a label and associated control.
 ConstantSize getLinePad()
          Returns a narrow vertical pad used to separate lines.
 ConstantSize getNarrowLinePad()
          Returns a narrow vertical pad used to separate lines.
 ConstantSize getParagraphPad()
          Returns a pad used to separate paragraphs.
 ConstantSize getRelatedComponentsPadX()
          Returns a horizontal gap used to separate related controls.
 ConstantSize getRelatedComponentsPadY()
          Returns a vertical gap used to separate related controls.
 ConstantSize getTabbedDialogMarginX()
          Returns this style's horizontal margin for dialogs that consist of a tabbed pane.
 ConstantSize getTabbedDialogMarginY()
          Returns this style's vertical margin for dialogs that consist of a tabbed pane.
 ConstantSize getUnrelatedComponentsPadX()
          Returns a horizontal gap used to separate unrelated controls.
 ConstantSize getUnrelatedComponentsPadY()
          Returns a vertical gap used to separate unrelated controls.
 boolean isLeftToRightButtonOrder()
          Checks and answers whether buttons are typically ordered from left to right or from right to left.
 
Methods inherited from class com.jgoodies.forms.util.LayoutStyle
getCurrent, setCurrent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

static final WindowsLayoutStyle INSTANCE

BUTTON_WIDTH

private static final Size BUTTON_WIDTH

BUTTON_HEIGHT

private static final Size BUTTON_HEIGHT

DIALOG_MARGIN_X

private static final ConstantSize DIALOG_MARGIN_X

DIALOG_MARGIN_Y

private static final ConstantSize DIALOG_MARGIN_Y

TABBED_DIALOG_MARGIN_X

private static final ConstantSize TABBED_DIALOG_MARGIN_X

TABBED_DIALOG_MARGIN_Y

private static final ConstantSize TABBED_DIALOG_MARGIN_Y

LABEL_COMPONENT_PADX

private static final ConstantSize LABEL_COMPONENT_PADX

RELATED_COMPONENTS_PADX

private static final ConstantSize RELATED_COMPONENTS_PADX

UNRELATED_COMPONENTS_PADX

private static final ConstantSize UNRELATED_COMPONENTS_PADX

RELATED_COMPONENTS_PADY

private static final ConstantSize RELATED_COMPONENTS_PADY

UNRELATED_COMPONENTS_PADY

private static final ConstantSize UNRELATED_COMPONENTS_PADY

NARROW_LINE_PAD

private static final ConstantSize NARROW_LINE_PAD

LINE_PAD

private static final ConstantSize LINE_PAD

PARAGRAPH_PAD

private static final ConstantSize PARAGRAPH_PAD

BUTTON_BAR_PAD

private static final ConstantSize BUTTON_BAR_PAD
Constructor Detail

WindowsLayoutStyle

private WindowsLayoutStyle()
Method Detail

getDefaultButtonWidth

public Size getDefaultButtonWidth()
Returns this style's default button width.

Specified by:
getDefaultButtonWidth in class LayoutStyle
Returns:
the default button width
See Also:
getDefaultButtonHeight()

getDefaultButtonHeight

public Size getDefaultButtonHeight()
Returns this style's default button height.

Specified by:
getDefaultButtonHeight in class LayoutStyle
Returns:
the default button height
See Also:
getDefaultButtonWidth()

getDialogMarginX

public ConstantSize getDialogMarginX()
Returns this style's horizontal margin for general dialogs.

Specified by:
getDialogMarginX in class LayoutStyle
Returns:
the horizontal margin for general dialogs
See Also:
getDialogMarginY(), getTabbedDialogMarginX()

getDialogMarginY

public ConstantSize getDialogMarginY()
Returns this style's vertical margin for general dialogs.

Specified by:
getDialogMarginY in class LayoutStyle
Returns:
the vertical margin for general dialogs
See Also:
getDialogMarginX(), getTabbedDialogMarginY()

getTabbedDialogMarginX

public ConstantSize getTabbedDialogMarginX()
Returns this style's horizontal margin for dialogs that consist of a tabbed pane.

Specified by:
getTabbedDialogMarginX in class LayoutStyle
Returns:
the horizontal margin for dialogs that consist of a tabbed pane
Since:
1.0.3
See Also:
getTabbedDialogMarginY(), getDialogMarginX()

getTabbedDialogMarginY

public ConstantSize getTabbedDialogMarginY()
Returns this style's vertical margin for dialogs that consist of a tabbed pane.

Specified by:
getTabbedDialogMarginY in class LayoutStyle
Returns:
the vertical margin for dialogs that consist of a tabbed pane
Since:
1.0.3
See Also:
getTabbedDialogMarginX(), getDialogMarginY()

getLabelComponentPadX

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

Specified by:
getLabelComponentPadX in class LayoutStyle
Returns:
a gap between label and associated control
See Also:
getRelatedComponentsPadX(), getUnrelatedComponentsPadX()

getRelatedComponentsPadX

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

Specified by:
getRelatedComponentsPadX in class LayoutStyle
Returns:
a horizontal gap between related controls
See Also:
getLabelComponentPadX(), getRelatedComponentsPadY(), getUnrelatedComponentsPadX()

getRelatedComponentsPadY

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

Specified by:
getRelatedComponentsPadY in class LayoutStyle
Returns:
a vertical gap between related controls
See Also:
getRelatedComponentsPadX(), getUnrelatedComponentsPadY()

getUnrelatedComponentsPadX

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

Specified by:
getUnrelatedComponentsPadX in class LayoutStyle
Returns:
a horizontal gap between unrelated controls
See Also:
getLabelComponentPadX(), getUnrelatedComponentsPadY(), getRelatedComponentsPadX()

getUnrelatedComponentsPadY

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

Specified by:
getUnrelatedComponentsPadY in class LayoutStyle
Returns:
a vertical gap between unrelated controls
See Also:
getUnrelatedComponentsPadX(), getRelatedComponentsPadY()

getNarrowLinePad

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

Specified by:
getNarrowLinePad in class LayoutStyle
Returns:
a narrow vertical pad used to separate lines
See Also:
getLinePad(), getParagraphPad()

getLinePad

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

Specified by:
getLinePad in class LayoutStyle
Returns:
a vertical pad used to separate lines
See Also:
getNarrowLinePad(), getParagraphPad()

getParagraphPad

public ConstantSize getParagraphPad()
Returns a pad used to separate paragraphs.

Specified by:
getParagraphPad in class LayoutStyle
Returns:
a vertical pad used to separate paragraphs
See Also:
getNarrowLinePad(), getLinePad()

getButtonBarPad

public ConstantSize getButtonBarPad()
Returns a pad used to separate a button bar from a component.

Specified by:
getButtonBarPad in class LayoutStyle
Returns:
a vertical pad used to separate paragraphs
Since:
1.0.3
See Also:
getRelatedComponentsPadY(), getUnrelatedComponentsPadY()

isLeftToRightButtonOrder

public 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.

Specified by:
isLeftToRightButtonOrder in class LayoutStyle
Returns:
true if buttons are typically ordered from left to right
Since:
1.0.3
See Also:
ButtonBarBuilder, ButtonBarFactory