|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maryanovsky.gwtutils.client.ui.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.
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 |
---|
public GwtUiDefaults()
Method Detail |
---|
public static void makeDialogPanel(Widget widget)
public static void makePallettePanel(Widget widget)
public static int getHorizontalVisualMargin(GwtUiDefaults.WidgetElementType elementType)
public static int getHorizontalVisualMargin(Widget widget)
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.
public static GwtUiDefaults.WidgetElementType 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 |