|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.grid.Field
public class Field
A class representing a column in the table model.
Constructor Summary | |
---|---|
Field()
|
|
Field(String name)
|
|
Field(String name,
Class<?> type)
|
|
Field(String name,
String title,
Class<?> type)
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for a specific property. |
protected void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Support for reporting bound property changes for boolean properties. |
protected void |
firePropertyChange(String propertyName,
int oldValue,
int newValue)
Support for reporting bound property changes for integer properties. |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Support for reporting bound property changes for Object properties. |
Filter |
getActualFilter()
Gets the actual filter that is in effect. |
ComparatorContext |
getComparatorContext()
Gets the comparator context. |
ConverterContext |
getConverterContext()
|
String |
getDescription()
|
EditorContext |
getEditorContext()
|
Filter |
getFilter()
Gets the Filter that will be applied to the PivotDataSource. |
Object[] |
getFilteredPossibleValues()
Returns the filtered possible values of the field. |
Icon |
getIcon()
Gets the icon. |
int |
getModelIndex()
Gets the column index in the table model. |
String |
getName()
|
int |
getPreferredWidth()
Gets the preferred width. |
PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all the property change listeners registered on this component. |
PropertyChangeListener[] |
getPropertyChangeListeners(String propertyName)
Returns an array of all the listeners which have been associated with the named property. |
Object[] |
getSelectedPossibleValues()
Returns the selected possible values of the field. |
int |
getSortOrder()
Gets the field sort order. |
TableModel |
getTableModel()
Gets the table model. |
String |
getTitle()
|
Class<?> |
getType()
|
boolean |
isAscending()
Gets the sort order. |
boolean |
isCustomFilterAllowed()
Checks if the custom filter is allowed in the drop down list. |
boolean |
isCustomizable()
Checks if the field settings can be customized by end users. |
boolean |
isDuplicated()
Gets the flag indicating if this field is duplicated from another field. |
boolean |
isExpandable()
Checks if the field can be expanded in the header tables. |
boolean |
isFilterable()
Checks if the field can be filtered. |
boolean |
isNullValueAllowed()
Checks if null value is allowed in the filter. |
boolean |
isPreferSelectedPossibleValues()
Get the flag indicating if selected possible values will be used or filtered possible values. |
boolean |
isSortable()
Checks if the field can be sorted by the user. |
boolean |
isVisible()
Checks if the field is visible. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list for a specific property. |
void |
setAscending(boolean ascending)
Sets the sort order. |
void |
setComparatorContext(ComparatorContext comparatorContext)
Sets the comparator context. |
void |
setConverterContext(ConverterContext converterContext)
|
void |
setCustomFilterAllowed(boolean isCustomFilterAllowed)
Sets the flag if the custom filter is allowed. |
void |
setCustomizable(boolean customizable)
Sets the flag if the field settings can be customized by end users. |
void |
setDescription(String description)
|
void |
setDuplicated(boolean duplicated)
Sets the flag indicating if this field is duplicated from another field. |
void |
setEditorContext(EditorContext editorContext)
|
void |
setExpandable(boolean expandable)
Sets the flag if the field can be expanded in the header tables. |
void |
setFilter(Filter filter)
Sets the Filter that will be applied to the PivotDataSource. |
void |
setFilterable(boolean filterable)
Sets the flag if the field can be filtered. |
void |
setFilteredPossibleValues(Object[] filteredPossibleValues)
Sets the filtered possible values for this field. |
void |
setIcon(Icon icon)
Sets the icon. |
void |
setName(String name)
|
void |
setNullValueAllowed(boolean nullValueAllowed)
Sets if the null value is allowed. |
void |
setPreferredWidth(int preferredWidth)
Sets the preferred width. |
void |
setPreferSelectedPossibleValues(boolean preferSelectedPossibleValues)
Set the flag indicating if selected possible values will be used or filtered possible values. |
void |
setSelectedPossibleValues(Object[] selectedPossibleValues)
Sets the selected possible values for this field. |
void |
setSortable(boolean sortable)
Sets the flag if the field can be sorted by the user. |
void |
setSortOrder(int sortOrder)
Sets the sort order. |
void |
setTitle(String title)
|
void |
setType(Class<?> type)
|
void |
setVisible(boolean visible)
Sets the flag if the field is visible. |
void |
toggleAscending()
Toggles the sort order. |
void |
updateFromTableModel(TableModel tableModel,
int modelIndex)
Updates the table model and model index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ConverterContext _converterContext
protected EditorContext _editorContext
protected int _sortOrder
public static final int SORT_ORDER_ASCENDING
public static final int SORT_ORDER_DESCENDING
public static final int SORT_ORDER_UNSORTED
public static final String PROPERTY_NAME
public static final String PROPERTY_TITLE
public static final String PROPERTY_DESCRIPTION
public static final String PROPERTY_ICON
public static final String PROPERTY_TYPE
public static final String PROPERTY_CONVERTER_CONTEXT
public static final String PROPERTY_EDITOR_CONTEXT
public static final String PROPERTY_FILTERABLE
public static final String PROPERTY_SORTABLE
public static final String PROPERTY_EXPANDABLE
public static final String PROPERTY_VISIBLE
public static final String PROPERTY_CUSTOMIZABLE
public static final String PROPERTY_SELECTED_POSSIBLE_VALUES
public static final String PROPERTY_DESELECTED_POSSIBLE_VALUES
public static final String PROPERTY_FILTER
public static final String PROPERTY_SORT_ORDER
public static final String PROPERTY_PREFER_SELECTED_VALUES
protected PropertyChangeSupport changeSupport
protected TableModel _tableModel
protected int _modelIndex
protected boolean _isConverterContextSet
protected boolean _isEditorContextSet
public static final String PROPERTY_ASCENDING
Constructor Detail |
---|
public Field()
public Field(String name)
public Field(String name, Class<?> type)
public Field(String name, String title, Class<?> type)
Method Detail |
---|
public String getName()
public void setName(String name)
public String getTitle()
public void setTitle(String title)
public String getDescription()
public void setDescription(String description)
public Icon getIcon()
public void setIcon(Icon icon)
icon
- the new iconpublic Class<?> getType()
public void setType(Class<?> type)
public ConverterContext getConverterContext()
public void setConverterContext(ConverterContext converterContext)
public EditorContext getEditorContext()
public void setEditorContext(EditorContext editorContext)
public ComparatorContext getComparatorContext()
setComparatorContext
to set one if
you want to use a different comparator for this PivotField which will be used by pivot table to sort.
public void setComparatorContext(ComparatorContext comparatorContext)
comparatorContext
- the comparator context.public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- the PropertyChangeListener to be addedremovePropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
,
addPropertyChangeListener(String,java.beans.PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- the PropertyChangeListener to be removedaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
,
removePropertyChangeListener(String,java.beans.PropertyChangeListener)
public PropertyChangeListener[] getPropertyChangeListeners()
PropertyChangeListener
s or an empty array if no property change
listeners are currently registeredaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
removePropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners(String)
,
PropertyChangeSupport.getPropertyChangeListeners()
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
- one of the property names listed abovelistener
- the PropertyChangeListener to be addedremovePropertyChangeListener(String,java.beans.PropertyChangeListener)
,
getPropertyChangeListeners(String)
,
addPropertyChangeListener(String,java.beans.PropertyChangeListener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
- a valid property namelistener
- the PropertyChangeListener to be removedaddPropertyChangeListener(String,java.beans.PropertyChangeListener)
,
getPropertyChangeListeners(String)
,
removePropertyChangeListener(java.beans.PropertyChangeListener)
public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
propertyName
- the property name.
PropertyChangeListeners
associated with the named property or an empty array if
no listeners have been addedaddPropertyChangeListener(String,java.beans.PropertyChangeListener)
,
removePropertyChangeListener(String,java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new valueprotected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new valueprotected void firePropertyChange(String propertyName, int oldValue, int newValue)
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new valuepublic int getPreferredWidth()
public void setPreferredWidth(int preferredWidth)
preferredWidth
- the new preferred width.public void setSelectedPossibleValues(Object[] selectedPossibleValues)
setFilteredPossibleValues(Object[])
to set that field to null.
selectedPossibleValues
- new selected possible values.public Object[] getSelectedPossibleValues()
public void setFilteredPossibleValues(Object[] filteredPossibleValues)
setSelectedPossibleValues(Object[])
to set that field to null.
filteredPossibleValues
- new filtered possible values.public Object[] getFilteredPossibleValues()
public boolean isPreferSelectedPossibleValues()
setSelectedPossibleValues(Object[])
,
setFilteredPossibleValues(Object[])
public void setPreferSelectedPossibleValues(boolean preferSelectedPossibleValues)
preferSelectedPossibleValues
- the flagisPreferSelectedPossibleValues()
public boolean isNullValueAllowed()
public void setNullValueAllowed(boolean nullValueAllowed)
nullValueAllowed
- true or false.public boolean isCustomFilterAllowed()
public void setCustomFilterAllowed(boolean isCustomFilterAllowed)
isCustomFilterAllowed
- true or false.public boolean isCustomizable()
public void setCustomizable(boolean customizable)
customizable
- true or false.public boolean isFilterable()
public void setFilterable(boolean filterable)
filterable
- true or false.public boolean isExpandable()
public void setExpandable(boolean expandable)
expandable
- true or false.public boolean isSortable()
public void setSortable(boolean sortable)
sortable
- true or false.public boolean isVisible()
public void setVisible(boolean visible)
visible
- true or false.public Filter getActualFilter()
getFilter()
, getSelectedPossibleValues()
and getFilteredPossibleValues()
to construct a filter that is in effect.
public Filter getFilter()
public void setFilter(Filter filter)
filter
- the Filter.public int getSortOrder()
public void setSortOrder(int sortOrder)
sortOrder
- the sort order. It can be SORT_ORDER_ASCENDING
, SORT_ORDER_DESCENDING
, or
SORT_ORDER_UNSORTED
.public void updateFromTableModel(TableModel tableModel, int modelIndex)
tableModel
- the table model.modelIndex
- the model index.public TableModel getTableModel()
public int getModelIndex()
public boolean isAscending()
public void toggleAscending()
public void setAscending(boolean ascending)
ascending
- true or false.public boolean isDuplicated()
public void setDuplicated(boolean duplicated)
duplicated
- the flag
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |