|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maryanovsky.gwtutils.client.GWTUiDefaults
public class GWTUiDefaults
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.
| Field Summary | |
|---|---|
static Object |
BUTTON
The constant representing a button. |
static Object |
LIST_BOX
The constant representing a list box. |
static Object |
TEXT_AREA
The constant representing a text area. |
static Object |
TEXT_BOX
The constant representing a text box. |
| Constructor Summary | |
|---|---|
GWTUiDefaults()
|
|
| Method Summary | |
|---|---|
static Object |
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(Object elementType)
UI elements have a visual edge at which they should be aligned. |
static int |
getHorizontalVisualMargin(Widget widget)
Similar to getHorizontalVisualMargin(Object), 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 |
| Field Detail |
|---|
public static final Object TEXT_BOX
public static final Object TEXT_AREA
public static final Object LIST_BOX
public static final Object BUTTON
| Constructor Detail |
|---|
public GWTUiDefaults()
| Method Detail |
|---|
public static void makeDialogPanel(Widget widget)
public static void makePallettePanel(Widget widget)
public static int getHorizontalVisualMargin(Object elementType)
public static int getHorizontalVisualMargin(Widget widget)
getHorizontalVisualMargin(Object), 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.
public static Object getElementType(Widget widget)
public static int getRelatedHorizontalDistance()
public static int getUnrelatedHorizontalDistance()
public static int getRelatedVerticalDistance()
public static int getUnrelatedVerticalDistance()
public static int getIconLabelGap()
public static int getIndentSize()
public static int getFormTitleFieldsGap()
public static int getFormFieldsButtonsGap()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||