Package eu.webtoolkit.jwt
Class ItemDataRole
java.lang.Object
eu.webtoolkit.jwt.ItemDataRole
- All Implemented Interfaces:
Comparable<ItemDataRole>
Enumeration that indicates a role for a data item.
A single data item can have data associated with it corresponding to different roles. Each role may be used by the corresponding view class in a different way.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ItemDataRoleBar brush color (forWCartesianChart) (19).static final ItemDataRoleBar pen color (forWCartesianChart) (18).static final ItemDataRoleRole that indicates the check state (4).static final ItemDataRoleRole for the url of an icon (1).static final ItemDataRoleRole for textual representation (0).static final ItemDataRoleRole for the edited value (2).static final ItemDataRoleLevel in aggregation, for header data (8).static final ItemDataRoleRole for a link (6).static final ItemDataRoleMarker brush color (forWCartesianChart) (17).static final ItemDataRoleMarker pen color (forWCartesianChart) (16).static final ItemDataRoleMarker size (forWCartesianChart) (20).static final ItemDataRoleMarker type (forWCartesianChart) (21).static final ItemDataRoleRole for mime type information (7).static final ItemDataRoleRole for the style class (3).static final ItemDataRoleRole for a (plain) tooltip (5).static final ItemDataRoleFirst role reserved for user purposes (32). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ItemDataRole rhs) booleanintgetValue()Returns the underlying int of this role.inthashCode()static ItemDataRoleof(int role) Returns the canonical ItemDataRole for the given numeric value.toString()
-
Field Details
-
Display
Role for textual representation (0). -
Decoration
Role for the url of an icon (1). -
Edit
Role for the edited value (2). -
StyleClass
Role for the style class (3). -
Checked
Role that indicates the check state (4).Data for this role should be a
bool. When the Wt::ItemIsTristate flag is set for the item, data for this role should be of typeCheckState. -
ToolTip
Role for a (plain) tooltip (5). -
Link
Role for a link (6). -
MimeType
Role for mime type information (7). -
Level
Level in aggregation, for header data (8). -
MarkerPenColor
Marker pen color (forWCartesianChart) (16). -
MarkerBrushColor
Marker brush color (forWCartesianChart) (17). -
MarkerScaleFactor
Marker size (forWCartesianChart) (20). -
MarkerType
Marker type (forWCartesianChart) (21). -
BarPenColor
Bar pen color (forWCartesianChart) (18). -
BarBrushColor
Bar brush color (forWCartesianChart) (19). -
User
First role reserved for user purposes (32).
-
-
Constructor Details
-
ItemDataRole
public ItemDataRole(int role) Create a new role with a certain int value.JWt's roles are < 32. User defined roles should be >e; 32.
-
-
Method Details
-
of
Returns the canonical ItemDataRole for the given numeric value.If the role is one of the predefined roles, that instance is returned, otherwise a new role is created, so the following is true for all predefined roles:
ItemDataRole.of(0).equals(ItemDataRole.Display) && ItemDataRole.of(0) == ItemDataRole.Display -
getValue
public int getValue()Returns the underlying int of this role. -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<ItemDataRole>
-
toString
-
hashCode
public int hashCode()
-