Package gw.lang.reflect
Class IPresentationInfo.Default
- java.lang.Object
-
- gw.lang.reflect.IPresentationInfo.Default
-
- All Implemented Interfaces:
IPresentationInfo
- Enclosing interface:
- IPresentationInfo
public static final class IPresentationInfo.Default extends Object implements IPresentationInfo
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gw.lang.reflect.IPresentationInfo
IPresentationInfo.Default
-
-
Field Summary
Fields Modifier and Type Field Description static IPresentationInfo.Default
GET
-
Fields inherited from interface gw.lang.reflect.IPresentationInfo
CATEGORY_BEHAVIOR, CATEGORY_DESIGN
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeatureCategory
getCategory()
String
getCharacterMask()
String
getDefaultValue()
boolean
isAutoUpdate()
boolean
isMultiEdit()
boolean
isMultiLine()
boolean
isPresentable()
boolean
isPrimary()
boolean
isRequired()
-
-
-
Field Detail
-
GET
public static final IPresentationInfo.Default GET
-
-
Method Detail
-
isPresentable
public boolean isPresentable()
- Specified by:
isPresentable
in interfaceIPresentationInfo
- Returns:
- True if the this feature can be presented for editing e.g., in a property editor.
-
isRequired
public boolean isRequired()
- Specified by:
isRequired
in interfaceIPresentationInfo
- Returns:
- True if this feature is required, and should be called out as such in a property editor.
-
getCategory
public FeatureCategory getCategory()
- Specified by:
getCategory
in interfaceIPresentationInfo
- Returns:
- The id of the category under which this feature belongs. Feature categories facilitate grouping of features for presentation purposes e.g., in a property editor.
-
isMultiEdit
public boolean isMultiEdit()
- Specified by:
isMultiEdit
in interfaceIPresentationInfo
- Returns:
- True if this feature can be edited in the company of other objects with this feature. For instance, if this is a font it's likely that it's ok to edit this font's value along with other objects that are selected so as to set all their fonts to the same value with one change. Conversely, if this is a value that probably pertains to just this object, say a chunk of Gosu, it's probably best to return true here so that the feature is not editable while other object are selected.
-
isAutoUpdate
public boolean isAutoUpdate()
- Specified by:
isAutoUpdate
in interfaceIPresentationInfo
- Returns:
- True if the feature editor for this feature can auto-update while the user modifies the value. For instance, if this feature is a simple label text value, auto-update means that the value changes automatically as the user types. Otherwise, if auto-update is false, the user must explicitly commit the changes when he is finished typing e.g., via an OK button.
-
isPrimary
public boolean isPrimary()
- Specified by:
isPrimary
in interfaceIPresentationInfo
- Returns:
- True if this property is considered the primary property for this object, false otherwise. Editors may use this information to implement editing behavior e.g. supporting jumping to the primary property when editing.
-
getCharacterMask
public String getCharacterMask()
- Specified by:
getCharacterMask
in interfaceIPresentationInfo
- Returns:
- A regular expression string specifying which characters are allowed in the value of this property, or null if no such restriction exists.
-
getDefaultValue
public String getDefaultValue()
- Specified by:
getDefaultValue
in interfaceIPresentationInfo
-
isMultiLine
public boolean isMultiLine()
- Specified by:
isMultiLine
in interfaceIPresentationInfo
-
-