public final class SimpleLayoutUtils extends Object
Some of the logic behind Layout decisions can be a little involved, so we refactor it here.
In this context, 'simple' means 'with minimal class dependencies, suitable to be compiled into JavaScript' (eg. for GWT).
Modifier and Type | Class and Description |
---|---|
static class |
SimpleLayoutUtils.StrippedMnemonicAndFirstIndex
Simple immutable structure to store a component and its value property.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isSpanAllColumns(Map<String,String> attributes)
Returns true if the field is 'large' or 'wide'.
|
static boolean |
needsLabel(String labelText,
String elementName)
Returns true if the label is blank or if the element is an 'action'.
|
static SimpleLayoutUtils.StrippedMnemonicAndFirstIndex |
stripMnemonic(String withMnemonic)
Strips the given text and returns the text without any MNEMONIC_INDICATOR (&) and also the
index of the first marker.
|
public static boolean isSpanAllColumns(Map<String,String> attributes)
public static boolean needsLabel(String labelText, String elementName)
public static SimpleLayoutUtils.StrippedMnemonicAndFirstIndex stripMnemonic(String withMnemonic)
For escaping purposes, treats two MNEMONIC_INDICATORs together as an escaped MNEMONIC_INDICATOR. Also, ignores MNEMONIC_INDICATOR followed by a space, because it is not likely this is intended to be a mnemonic.
Copyright © 2015. All Rights Reserved.