public abstract class Property extends DefaultExpandableRow implements ExpandableCell, ConverterContextSupport, EditorContextSupport, EditorStyleSupport, Comparable<Property>, Serializable
Modifier and Type | Field and Description |
---|---|
protected String |
_category
The category of the property.
|
protected ObjectConverter |
_converter |
protected ConverterContext |
_converterContext
The context of the converter.
|
protected String |
_description
The description of the property.
|
protected String |
_displayName
The display name of the property.
|
protected boolean |
_editable
true if the property is editable.
|
protected EditorContext |
_editorContext
The context of the editor.
|
protected boolean |
_expert
The "expert" flag is used to distinguish between properties that are intended for expert users from those that
are intended for normal users.
|
protected String |
_focusDisplayName
The focus display name of the property.
|
protected boolean |
_hidden
The "hidden" flag is used to identify properties that are intended only for tool use, and which should not be
exposed to humans.
|
protected boolean |
_indentNonCategoryRow |
protected boolean |
_isCategoryRow
true if the cell is a category row.
|
protected String |
_name
The name of the property.
|
protected boolean |
_preferred
The "preferred" flag is used to identify properties that are particularly important for presenting to humans.
|
protected boolean |
_required
The "required" flag is used to identify properties that are particularly important for presenting to humans.
|
protected Class<?> |
_type
The type of the property.
|
static String |
PROPERTY_CATEGORY |
static String |
PROPERTY_CONVERTER_CONTEXT |
static String |
PROPERTY_DEPENDING_PROPERTIES |
static String |
PROPERTY_DESCRIPTION |
static String |
PROPERTY_DISPLAY_NAME |
static String |
PROPERTY_EDITABLE |
static String |
PROPERTY_EDITOR_CONTEXT |
static String |
PROPERTY_EXPERT |
static String |
PROPERTY_FOCUS_DISPLAY_NAME |
static String |
PROPERTY_HIDDEN |
static String |
PROPERTY_NAME |
static String |
PROPERTY_PREFERRED |
static String |
PROPERTY_REQUIRED |
static String |
PROPERTY_TYPE |
static String |
PROPERTY_VALUE |
_children, EMPTY_ENUMERATION, PROPERTY_CHILDREN
_expandable, _expanded
_parent, PROPERTY_PARENT
PROPERTY_EXPANDABLE, PROPERTY_EXPANDED
PROPERTY_ADJUSTING
Modifier | Constructor and Description |
---|---|
protected |
Property() |
|
Property(String name)
Creates a property just using name.
|
|
Property(String name,
String description)
Creates a property if you don't need to specify child properties, converter context, category and type.
|
|
Property(String name,
String description,
Class<?> type)
Creates a property if you don't need to specify child properties, converter context and category.
|
|
Property(String name,
String description,
Class<?> type,
String category)
Creates a property if you don't need to specify child properties and converter context.
|
|
Property(String name,
String description,
Class<?> type,
String category,
ConverterContext context)
Creates a property if you don't need to specify child properties.
|
|
Property(String name,
String description,
Class<?> type,
String category,
ConverterContext context,
List<Property> childProperties)
Creates a Property.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addDependingProperty(String name)
Adds a property specified by name as depending property.
|
boolean |
addDependingProperty(String[] names)
Adds several properties specified by names array as depending properties.
|
void |
clearDependingProperties()
Removes all depending properties.
|
int |
compareTo(Property property) |
String |
getCategory()
Gets the category of the property.
|
CellEditor |
getCellEditor()
Gets the cell editor for this property.
|
CellEditor |
getCellEditor(int column)
Gets the cell editor for this property.
|
ConverterContext |
getConverterContext()
Gets the converter context.
|
List<String> |
getDependingProperties()
Gets the names of all depending properties.
|
String |
getDescription()
Gets the description of the property.
|
String |
getDisplayName()
Gets the display name of the property.
|
EditorContext |
getEditorContext()
Gets the editor context.
|
int |
getEditorStyle()
Gets editor style for the property.
|
String |
getFocusDisplayName()
Gets the focus display name of the property.
|
String |
getFullName()
Gets the full name of the property.
|
int |
getLevel()
Gets the level of the property.
|
String |
getName()
Gets the name of the property.
|
TableCellRenderer |
getTableCellRenderer()
Gets the cell renderer for this property.
|
TableCellRenderer |
getTableCellRenderer(int column)
Gets the cell renderer for this property.
|
Class<?> |
getType()
Gets the type of the property.
|
abstract Object |
getValue()
Gets the value from the property.
|
Object |
getValueAt(int columnIndex)
Gets the value for cell at
columnIndex |
boolean |
hasValue()
Checks if the property has value.
|
boolean |
isCategoryRow()
If the property is a category row.
|
boolean |
isEditable()
If the property is editable.
|
boolean |
isEditorStyleSupported(int editorStyle)
Checks if the editor style is supported by the cell editor.
|
boolean |
isExpert()
The "expert" flag is used to distinguish between those properties that are intended for expert users from those
that are intended for normal users.
|
boolean |
isHidden()
The "hidden" flag is used to identify properties that are intended only for tool use, and which should not be
exposed to humans.
|
boolean |
isIndentNonCategoryRow()
Checks if the non-category row should indent.
|
boolean |
isPreferred()
The "preferred" flag is used to identify properties that are particularly important for presenting to humans.
|
boolean |
isRequired()
The "required" flag is used to identify properties that are required to fill in.
|
boolean |
removeDependingProperty(String name)
Removes the property specified by name from depending property.
|
void |
setCategory(String category)
Sets the category of the property.
|
void |
setCategoryRow(boolean categoryRow)
Sets the property as category row.
|
void |
setCellEditor(CellEditor cellEditor)
Sets the cell editor for this property.
|
void |
setConverterContext(ConverterContext converterContext)
Sets the converter context.
|
void |
setDescription(String description)
Sets the description of the property.
|
void |
setDisplayName(String displayName)
Sets the display name of the property.
|
void |
setEditable(boolean editable)
Sets if the property is editable.
|
void |
setEditorContext(EditorContext editorContext)
Sets the editor context.
|
void |
setEditorStyle(int editorStyle)
Sets the editor style to the cell editor.
|
void |
setExpert(boolean expert)
The "expert" flag is used to distinguish between properties that are intended for expert users from those that
are intended for normal users.
|
void |
setFocusDisplayName(String focusDisplayName)
Sets the focus display name of the property.
|
void |
setHidden(boolean hidden)
The "hidden" flag is used to identify properties that are intended only for tool use, and which should not be
exposed to humans.
|
void |
setIndentNonCategoryRow(boolean indent)
Sets if first level non-category row indent from category row.
|
void |
setName(String name)
Sets the name of the property.
|
void |
setPreferred(boolean preferred)
The "preferred" flag is used to identify properties that are particularly important for presenting to humans.
|
void |
setRequired(boolean required)
The "required" flag is used to identify properties that are required to fill in.
|
void |
setTableCellRenderer(TableCellRenderer tableCellRenderer)
Sets the cell renderer for this property.
|
void |
setType(Class<?> type)
Sets the type of the property.
|
abstract void |
setValue(Object value)
Sets the value of the property.
|
cellUpdated, getCellClassAt, getConverterContextAt, getEditorContextAt, isCellEditable, notifyCellUpdated, rowUpdated, setValueAt
breadthFirstEnumeration, depthFirstEnumeration, getChildren, postorderEnumeration, preorderEnumeration, setChildren
addChild, addChild, addChildren, getAllChildrenCount, getAllVisibleChildrenCount, getChildAt, getChildIndex, getChildrenCount, getExpandableTreeTableModel, getNumberOfVisibleChildren, getNumberOfVisibleExpandable, getTreeTableModel, hasChildren, hasVisibleChildren, isAdjusting, isExpandable, isExpanded, moveDownChild, moveUpChild, notifyChildDeleted, notifyChildInserted, notifyChildrenDeleted, notifyChildrenInserted, notifyChildrenUpdated, notifyChildUpdated, removeAllChildren, removeChild, removeChildren, setAdjusting, setExpandable, setExpanded
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getNextSibling, getParent, getPreviousSibling, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setParent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChild, addChild, addChildren, getAllVisibleChildrenCount, getChildAt, getChildIndex, getChildren, getChildrenCount, getNumberOfVisibleExpandable, hasChildren, isExpandable, isExpanded, moveDownChild, moveUpChild, notifyChildDeleted, notifyChildInserted, notifyChildrenDeleted, notifyChildrenInserted, notifyChildrenUpdated, notifyChildUpdated, removeAllChildren, removeChild, removeChildren, setChildren, setExpandable, setExpanded
getNextSibling, getParent, getPreviousSibling, setParent
protected String _name
protected String _displayName
protected String _focusDisplayName
protected String _description
protected Class<?> _type
protected ConverterContext _converterContext
protected EditorContext _editorContext
protected String _category
protected boolean _isCategoryRow
protected boolean _expert
protected boolean _hidden
protected boolean _preferred
protected boolean _required
protected boolean _editable
protected ObjectConverter _converter
public static final String PROPERTY_NAME
public static final String PROPERTY_DISPLAY_NAME
public static final String PROPERTY_FOCUS_DISPLAY_NAME
public static final String PROPERTY_VALUE
public static final String PROPERTY_TYPE
public static final String PROPERTY_DESCRIPTION
public static final String PROPERTY_DEPENDING_PROPERTIES
public static final String PROPERTY_CATEGORY
public static final String PROPERTY_CONVERTER_CONTEXT
public static final String PROPERTY_EDITOR_CONTEXT
public static final String PROPERTY_EDITABLE
public static final String PROPERTY_EXPERT
public static final String PROPERTY_HIDDEN
public static final String PROPERTY_PREFERRED
public static final String PROPERTY_REQUIRED
protected boolean _indentNonCategoryRow
public Property(String name, String description, Class<?> type, String category, ConverterContext context, List<Property> childProperties)
name
- name of the propertydescription
- description of the propertytype
- type of the propertycategory
- which category this property belongs tocontext
- converter context used by this propertychildProperties
- child properties of this propertypublic Property(String name, String description, Class<?> type, String category, ConverterContext context)
name
- name of the propertydescription
- description of the propertytype
- type of the propertycategory
- which category this property belongs tocontext
- converter context used by this propertypublic Property(String name, String description, Class<?> type, String category)
name
- name of the propertydescription
- description of the propertytype
- type of the propertycategory
- which category this property belongs topublic Property(String name, String description, Class<?> type)
name
- name of the propertydescription
- description of the propertytype
- type of the propertypublic Property(String name, String description)
name
- name of the propertydescription
- description of the propertypublic Property(String name)
name
- name of the propertyprotected Property()
public abstract void setValue(Object value)
value
- the new valuepublic abstract Object getValue()
public boolean hasValue()
public String getName()
public void setName(String name)
name
- the new name of the propertypublic String getDisplayName()
public void setDisplayName(String displayName)
displayName
- the display name of the property.public String getFocusDisplayName()
setFocusDisplayName(String)
public void setFocusDisplayName(String focusDisplayName)
focusDisplayName
- the focus display name of the property.public String getDescription()
public void setDescription(String description)
description
- the description of the propertypublic Class<?> getType()
getType
in interface ConverterContextSupport
public void setType(Class<?> type)
setType
in interface ConverterContextSupport
type
- the type of the propertypublic String getCategory()
public void setCategory(String category)
category
- the category of the propertypublic String getFullName()
public boolean isEditable()
public void setEditable(boolean editable)
editable
- if the property is editablepublic boolean isCategoryRow()
public void setCategoryRow(boolean categoryRow)
categoryRow
- true or false.public int getLevel()
getLevel
in interface Node
getLevel
in class AbstractNode
public ConverterContext getConverterContext()
getConverterContext
in interface ConverterContextSupport
public void setConverterContext(ConverterContext converterContext)
setConverterContext
in interface ConverterContextSupport
converterContext
- the converter contextpublic EditorContext getEditorContext()
getEditorContext
in interface EditorContextSupport
public void setEditorContext(EditorContext editorContext)
setEditorContext
in interface EditorContextSupport
editorContext
- the editor contextpublic CellEditor getCellEditor()
setCellEditor(javax.swing.CellEditor)
. By default, it's null.
Since 2.10.4, this method could return null which is not the case before and include 2.10.3.public void setCellEditor(CellEditor cellEditor)
cellEditor
- the cell editorpublic CellEditor getCellEditor(int column)
column
- the column index as in the table model.public TableCellRenderer getTableCellRenderer()
setTableCellRenderer(javax.swing.table.TableCellRenderer)
.
By default, it's null.
Since 2.10.4, this method could return null which is not the case before and include 2.10.3.public void setTableCellRenderer(TableCellRenderer tableCellRenderer)
tableCellRenderer
- the cell rendererpublic TableCellRenderer getTableCellRenderer(int column)
column
- the column index as in the table modelpublic List<String> getDependingProperties()
public boolean addDependingProperty(String name)
name
- the name of the property.public boolean addDependingProperty(String[] names)
names
- the names of all the properties.public boolean removeDependingProperty(String name)
name
- the name of the property.public void clearDependingProperties()
public int compareTo(Property property)
compareTo
in interface Comparable<Property>
public boolean isExpert()
public void setExpert(boolean expert)
expert
- True if this property is intended for use by experts only.public boolean isHidden()
public void setHidden(boolean hidden)
hidden
- True if this property should be hidden from human users.public boolean isPreferred()
public void setPreferred(boolean preferred)
preferred
- True if this property should be preferentially shown to human users.public boolean isRequired()
public void setRequired(boolean required)
required
- True if this property is required to fill in.public boolean isIndentNonCategoryRow()
public void setIndentNonCategoryRow(boolean indent)
indent
- true or false.public Object getValueAt(int columnIndex)
Row
columnIndex
getValueAt
in interface Row
columnIndex
- the column whose value to be queriedpublic boolean isEditorStyleSupported(int editorStyle)
EditorStyleSupport
isEditorStyleSupported
in interface EditorStyleSupport
editorStyle
- the editor stylepublic void setEditorStyle(int editorStyle)
EditorStyleSupport
setEditorStyle
in interface EditorStyleSupport
editorStyle
- the editor stylepublic int getEditorStyle()