Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.maryanovsky.gwtutils.client.ui
Class GWTUiDefaults

    java.lang.Object
      com.maryanovsky.gwtutils.client.ui.GWTUiDefaults

    public class GWTUiDefaults

extends Object

Defines various usefil UI related values, such as preferred spacing between elements, difference in element sizes which allows aligning them etc. Currently, the implementation is tailored to Internet Explorer. To better support other browsers, it should detect the browser we're running in and use an appropriate delegate. Also, the implementation is not complete.

Author:
  Maryanovsky Alexander

Nested Class Summary
`static class` | `GWTUiDefaults.WidgetElementType` The enumeration of types of widgets for which we offer special treatment.

Constructor Summary
`GWTUiDefaults()`

Method Summary
`static GWTUiDefaults.WidgetElementType` | `getElementType(Widget widget)` Returns the element type of the specified standard GWT widget, if supported.
`static int` | `getFormFieldsButtonsGap()` Returns the vertical distance between a form's fields and its buttons.
`static int` | `getFormTitleFieldsGap()` Returns the vertical distance between a form's title and its fields.
`static int` | `getHorizontalVisualMargin(GWTUiDefaults.WidgetElementType elementType)` UI elements have a visual edge at which they should be aligned.
`static int` | `getHorizontalVisualMargin(Widget widget)` Similar to `getHorizontalVisualMargin(WidgetElementType)`, but the element type is guessed from the widget using `getElementType(Widget)`.
`static int` | `getIconLabelGap()` Returns the gap between an icon image and its label.
`static int` | `getIndentSize()` Returns the indent size.
`static int` | `getRelatedHorizontalDistance()` Returns the preferred horizontal distance between related elements.
`static int` | `getRelatedVerticalDistance()` Returns the preferred vertical distance between related elements.
`static int` | `getUnrelatedHorizontalDistance()` Returns the preferred horizontal distance between unrelated elements.
`static int` | `getUnrelatedVerticalDistance()` Returns the preferred vertical distance between unrelated elements.
`static void` | `makeDialogPanel(Widget widget)` Makes a "dialog" panel from the specified widget.
`static void` | `makePallettePanel(Widget widget)` Makes a "pallette" panel from the specified widget.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GWTUiDefaults

    public GWTUiDefaults()

Method Detail

### makeDialogPanel

    public static void makeDialogPanel(Widget widget)

  Makes a "dialog" panel from the specified widget.

### makePallettePanel

    public static void makePallettePanel(Widget widget)

  Makes a "pallette" panel from the specified widget.

### getHorizontalVisualMargin

    public static int getHorizontalVisualMargin(GWTUiDefaults.WidgetElementType elementType)

  UI elements have a visual edge at which they should be aligned. This returns the horizontal margin between their visual edge and their actual boundary.

### getHorizontalVisualMargin

    public static int getHorizontalVisualMargin(Widget widget)

  Similar to `getHorizontalVisualMargin(WidgetElementType)`, but the element type is guessed from the widget using `getElementType(Widget)`. Due to this, the method, only works for the standard GWT widgets, while the version that takes an element type can work for custom widgets as well.

### getElementType

    public static GWTUiDefaults.WidgetElementType getElementType(Widget widget)

  Returns the element type of the specified standard GWT widget, if supported. Throws an exception if the widget is not a standard GWT widget or is an unsupported widget.

### getRelatedHorizontalDistance

    public static int getRelatedHorizontalDistance()

  Returns the preferred horizontal distance between related elements.

### getUnrelatedHorizontalDistance

    public static int getUnrelatedHorizontalDistance()

  Returns the preferred horizontal distance between unrelated elements.

### getRelatedVerticalDistance

    public static int getRelatedVerticalDistance()

  Returns the preferred vertical distance between related elements.

### getUnrelatedVerticalDistance

    public static int getUnrelatedVerticalDistance()

  Returns the preferred vertical distance between unrelated elements.

### getIconLabelGap

    public static int getIconLabelGap()

  Returns the gap between an icon image and its label.

### getIndentSize

    public static int getIndentSize()

  Returns the indent size. This is used when related UI is placed on the next line. This is the number of pixels by which it is indented.

### getFormTitleFieldsGap

    public static int getFormTitleFieldsGap()

  Returns the vertical distance between a form's title and its fields.

### getFormFieldsButtonsGap

    public static int getFormFieldsButtonsGap()

  Returns the vertical distance between a form's fields and its buttons.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD