public class Hints extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Hints.Size
Queries/sets width/height of a Vaadin component.
|
Modifier and Type | Field and Description |
---|---|
static String |
ADDITIONAL_FORMATS
Applies to
UIDateTextBox - adds additional formats accepted by the date text box. |
static String |
ALIGN
Constant for the 'align' hint.
|
static String |
BREADCRUMBS
Constant for the 'breadcrumbs' hint.
|
static String |
CONFIG
Constant for the 'config' hint used for advanced chart configuration.
|
static String |
DISABLE_COLLAPSING
Constant for the 'disable-collapsing' hint.
|
static String |
EXPAND
Constant for the 'expand' hint.
|
static String |
FILE_UPLOAD_MIME
Constant for the 'file-upload-mime' hint.
|
static String |
HEADER_ALIGN
Applies to
UITableColumn and UIGridColumn - sets the column header alignment. |
static String |
HEIGHT
Constant for the 'height' hint.
|
static String |
HIDDEN
Constant for the 'hidden' hint.
|
static String |
HTML_CLASS
Constant for the 'html-class' hint.
|
static String |
ICON
Constant for the 'icon' hint used for applying icons for various components.
|
static String |
INITIAL_FOCUS
Constant for the 'initial-focus' hint.
|
static String |
INITIAL_PAGE_SIZE
Constant for the 'initial-page-size' hint.
|
static String |
LAYOUT
Constant for the 'layout' hint.
|
static String |
MARGIN
Constant for the 'margin' hint used for applying margin to layout component.
|
static String |
MAX_TEXT_SIZE
Constant for the 'max-text-size' hint.
|
static String |
NO_DATA_MESSAGE
Constant for the 'no-data-message' hint.
|
static String |
OPEN_IN_NEW_WINDOW
Constant for the 'open-in-new-window' hint.
|
static String |
PAGE_LENGTH
Constant for the 'page-length' hint.
|
static String |
RESIZABLE
Constant for the 'resizable' hint.
|
static String |
SIZE
Constant for the 'size' hint.
|
static String |
SPACING
Constant for the 'spacing' hint used for applying spacing inside layout component.
|
static String |
SUFFIX
Constant for the 'suffix' hint.
|
static String |
TAB_ORDER
Constant for the 'tab-order' hint.
|
static String |
WIDTH
Constant for the 'width' hint.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
applyGenericHints(com.vaadin.ui.Component component,
UIComponentData componentData,
String hintName,
Variant<Object> newValue,
Variant<Object> oldValue)
Applies generic hints to the component.
|
static void |
applyHintsToChildrenWrapper(String hintName,
Variant<Object> newValue,
Variant<Object> oldValue,
com.vaadin.ui.Component childrenWrapper)
Applies hints to the children wrapper component.
|
static boolean |
applyMarginSpacing(com.vaadin.ui.AbstractOrderedLayout component,
String hintName,
Variant<Object> newValue)
|
static boolean |
applySizeHints(com.vaadin.server.Sizeable component,
String hintName,
Variant<Object> newValue)
|
static Variant.MapVariant<String,Object> |
computeHints(UIComponent component)
Runs the hint closure and returns its result.
|
static Variant.MapVariant<String,Object> |
getCurrentHints(UIComponent component,
Variant.MapVariant<String,Object> newHints) |
static boolean |
hasHints(UIComponent component)
Checks whether the component has field.
|
static void |
onUnsupportedHint(UIComponent component,
String hintName)
Handles 'unsupported hint' warnings.
|
static com.vaadin.ui.Alignment |
parseAlignment(String alignment)
Convert string alignment to vaadin alignment.
|
static boolean |
unapplyGenericHint(com.vaadin.ui.Component component,
UIComponentData componentData,
String hintName,
Variant<Object> oldValue)
Inverse operation to
applyGenericHints(com.vaadin.ui.Component, com.whitestein.lsps.vaadin.ui.UIComponentData, String, Variant, Variant) - unapplies (removes effect)
of given hint. |
static void |
unapplyHintsToChildrenWrapper(String hintName,
Variant<Object> oldValue,
com.vaadin.ui.Component childrenWrapper)
Unapplies hints to the children wrapper component.
|
static void |
updateHints(UIComponent component)
Runs the hint closure and updates all hints on the component.
|
public static final String HTML_CLASS
public static final String WIDTH
public static final String RESIZABLE
public static final String HEIGHT
public static final String EXPAND
public static final String ALIGN
public static final String SIZE
public static final String LAYOUT
public static final String MAX_TEXT_SIZE
public static final String INITIAL_PAGE_SIZE
public static final String OPEN_IN_NEW_WINDOW
public static final String HIDDEN
public static final String TAB_ORDER
public static final String INITIAL_FOCUS
public static final String FILE_UPLOAD_MIME
public static final String CONFIG
public static final String MARGIN
public static final String SPACING
public static final String ICON
public static final String BREADCRUMBS
UIActionLink
components inside this layout into breadcrumbs.public static final String SUFFIX
UITextBox
preserving layout.public static final String PAGE_LENGTH
UIComboBox
setting maximum number of items in dropdown list.public static final String DISABLE_COLLAPSING
UITableColumn
, disables ability to collapse table column.public static final String ADDITIONAL_FORMATS
UIDateTextBox
- adds additional formats accepted by the date text box.
Uses the Java SimpleDateFormat
formatting.public static final String HEADER_ALIGN
UITableColumn
and UIGridColumn
- sets the column header alignment.public static final String NO_DATA_MESSAGE
public static boolean applySizeHints(com.vaadin.server.Sizeable component, String hintName, Variant<Object> newValue)
component
- the component, not nullhintName
- the hint name, not null.newValue
- variant containing the new hint value, never null, may contain null value.public static boolean applyGenericHints(com.vaadin.ui.Component component, UIComponentData componentData, String hintName, Variant<Object> newValue, Variant<Object> oldValue)
component
- componentData
- hintName
- the hint name, not null.newValue
- variant containing the new hint value, never null, may contain null value.oldValue
- variant containing the previous hint value, never null, may contain null value if the hint was missing or the old value was null.public static boolean applyMarginSpacing(com.vaadin.ui.AbstractOrderedLayout component, String hintName, Variant<Object> newValue)
component
- the component, not null.hintName
- margin or spacing, not null.newValue
- the new value of the margin/spacing, not null.public static boolean unapplyGenericHint(com.vaadin.ui.Component component, UIComponentData componentData, String hintName, Variant<Object> oldValue)
applyGenericHints(com.vaadin.ui.Component, com.whitestein.lsps.vaadin.ui.UIComponentData, String, Variant, Variant)
- unapplies (removes effect)
of given hint.component
- the component, not null.componentData
- the component data, not null.hintName
- the name of the hint (the key to the hint map), not null.oldValue
- variant containing the previous hint value, never null, may contain null value if the hint was missing or the old value was null.public static com.vaadin.ui.Alignment parseAlignment(String alignment)
alignment
- public static void onUnsupportedHint(UIComponent component, String hintName)
component
- the component with unsupported hint, not null.hintName
- the name of the hint (the key to the hint map), not null.public static boolean hasHints(UIComponent component)
component
- the component, not null.public static Variant.MapVariant<String,Object> computeHints(UIComponent component)
component
- the component, not null.public static Variant.MapVariant<String,Object> getCurrentHints(UIComponent component, Variant.MapVariant<String,Object> newHints)
component
- newHints
- public static void updateHints(UIComponent component)
component
- the component, not null.public static void applyHintsToChildrenWrapper(String hintName, Variant<Object> newValue, Variant<Object> oldValue, com.vaadin.ui.Component childrenWrapper)
HEIGHT
: if specified, wrapper must match parent size and is therefore configured for 100% height. If not specified,
wrapper must wrap contents and is therefore set to unspecified heighthintName
- the name of the hint, not null.newValue
- new hint valueoldValue
- old hint valuechildrenWrapper
- child of this component, contains model children of this component. Not null.public static void unapplyHintsToChildrenWrapper(String hintName, Variant<Object> oldValue, com.vaadin.ui.Component childrenWrapper)
applyHintsToChildrenWrapper(String, Variant, Variant, Component)
for details.hintName
- the name of the hint, not null.oldValue
- old hint valuechildrenWrapper
- child of this component, contains model children of this component. Not null.Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.