Package io.guise.framework.component
Class Table
- java.lang.Object
-
- All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable
,com.globalmentor.beans.PropertyConstrainable
,Component
,CompositeComponent
,Control
,EditComponent
,InputFocusableComponent
,EditListenable
,Displayable
,Enableable
,InfoModel
,LabelModel
,Model
,TableModel
,PresentationModel
,DepictedObject
public class Table extends AbstractCompositeStateControl<TableModel.Cell<?>,Table.CellComponentState> implements EditComponent, TableModel
A table component.Property changes to a column's UI model are repeated with the component as the source and the column UI model as the target.
- Author:
- Garret Wilson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Table.CellComponentState
An encapsulation of a component for a cell along with other metadata, such as whether the component was editable when created.static interface
Table.CellRepresentationStrategy<V>
A strategy for generating components to represent table cell model values.protected static class
Table.ColumnUIModel
An encapsulation of the user interface-related model used for a column.static class
Table.DefaultCellMessage<C>
A message model that returns a default representation of the cell in a message.static class
Table.DefaultCellRepresentationStrategy<V>
A default table cell representation strategy.static class
Table.DefaultCellValueModel<C>
A value model that returns and updates a the value of the cell.-
Nested classes/interfaces inherited from class io.guise.framework.component.AbstractCompositeStateComponent
AbstractCompositeStateComponent.ComponentState
-
Nested classes/interfaces inherited from class io.guise.framework.component.AbstractComponent
AbstractComponent.AbstractFlyoverFrameStrategy<S extends Component>, AbstractComponent.AbstractFlyoverStrategy<S extends Component>, AbstractComponent.DefaultFlyoverStrategy<S extends Component>
-
Nested classes/interfaces inherited from interface io.guise.framework.component.Component
Component.FlyoverStrategy<S extends Component>
-
Nested classes/interfaces inherited from interface io.guise.framework.component.Control
Control.Status
-
Nested classes/interfaces inherited from interface io.guise.framework.model.TableModel
TableModel.Cell<C>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DISPLAY_ROW_COUNT_PROPERTY
The display row count bound property.static java.lang.String
DISPLAY_ROW_START_INDEX_PROPERTY
The display row start index bound property.protected java.beans.PropertyChangeListener
updatePrototypesPropertyChangeListener
The property change listener that updates prototype properties.-
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
-
Fields inherited from interface io.guise.framework.component.Component
BOOKMARK_ENABLED_PROPERTY, CONSTRAINTS_PROPERTY, DRAG_ENABLED_PROPERTY, DROP_ENABLED_PROPERTY, FLYOVER_ENABLED_PROPERTY, FLYOVER_STRATEGY_PROPERTY, INPUT_STRATEGY_PROPERTY, NAME_PROPERTY, NOTIFICATION_PROPERTY, ORIENTATION_PROPERTY, THEME_APPLIED_PROPERTY, VALID_PROPERTY
-
Fields inherited from interface io.guise.framework.component.Control
STATUS_PROPERTY
-
Fields inherited from interface io.guise.framework.model.Displayable
DISPLAYED_PROPERTY
-
Fields inherited from interface io.guise.framework.component.EditComponent
EDITABLE_PROPERTY
-
Fields inherited from interface io.guise.framework.model.Enableable
ENABLED_PROPERTY
-
Fields inherited from interface io.guise.framework.model.InfoModel
DESCRIPTION_CONTENT_TYPE_PROPERTY, DESCRIPTION_PROPERTY, INFO_CONTENT_TYPE_PROPERTY, INFO_PROPERTY
-
Fields inherited from interface io.guise.framework.model.LabelModel
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY
-
Fields inherited from interface io.guise.framework.model.ui.PresentationModel
BACKGROUND_COLOR_PROPERTY, BORDER_LINE_FAR_COLOR_PROPERTY, BORDER_LINE_FAR_EXTENT_PROPERTY, BORDER_LINE_FAR_STYLE_PROPERTY, BORDER_LINE_NEAR_COLOR_PROPERTY, BORDER_LINE_NEAR_EXTENT_PROPERTY, BORDER_LINE_NEAR_STYLE_PROPERTY, BORDER_PAGE_FAR_COLOR_PROPERTY, BORDER_PAGE_FAR_EXTENT_PROPERTY, BORDER_PAGE_FAR_STYLE_PROPERTY, BORDER_PAGE_NEAR_COLOR_PROPERTY, BORDER_PAGE_NEAR_EXTENT_PROPERTY, BORDER_PAGE_NEAR_STYLE_PROPERTY, CORNER_LINE_FAR_PAGE_FAR_ARC_SIZE_PROPERTY, CORNER_LINE_FAR_PAGE_NEAR_ARC_SIZE_PROPERTY, CORNER_LINE_NEAR_PAGE_FAR_ARC_SIZE_PROPERTY, CORNER_LINE_NEAR_PAGE_NEAR_ARC_SIZE_PROPERTY, CURSOR_PROPERTY, FONT_FAMILIES_PROPERTY, FONT_SIZE_PROPERTY, FONT_STYLE_PROPERTY, FONT_WEIGHT_BOLD, FONT_WEIGHT_NORMAL, FONT_WEIGHT_PROPERTY, LABEL_FONT_FAMILIES_PROPERTY, LABEL_FONT_SIZE_PROPERTY, LABEL_FONT_STYLE_PROPERTY, LABEL_FONT_WEIGHT_PROPERTY, LABEL_TEXT_COLOR_PROPERTY, LINE_EXTENT_PROPERTY, MARGIN_LINE_FAR_EXTENT_PROPERTY, MARGIN_LINE_NEAR_EXTENT_PROPERTY, MARGIN_PAGE_FAR_EXTENT_PROPERTY, MARGIN_PAGE_NEAR_EXTENT_PROPERTY, OPACITY_PROPERTY, PADDING_LINE_FAR_EXTENT_PROPERTY, PADDING_LINE_NEAR_EXTENT_PROPERTY, PADDING_PAGE_FAR_EXTENT_PROPERTY, PADDING_PAGE_NEAR_EXTENT_PROPERTY, PAGE_EXTENT_PROPERTY, ROUNDED_CORNER_ARC_SIZE, STYLE_ID_PROPERTY, TEXT_COLOR_PROPERTY, TOOLTIP_ENABLED_PROPERTY, VISIBLE_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description Table(TableColumnModel<?>... columns)
Columns constructor with a default data model.Table(TableModel tableModel)
Table model constructor.Table(java.lang.Class<C> valueClass, C[][] rowValues, java.lang.String... columnNames)
Value class, table data, and column names constructor with a default data model.Table(java.lang.Class<C> valueClass, java.lang.String... columnNames)
Value class and column names constructor with a default data model.Table(java.lang.Object[][] rowValues, TableColumnModel<?>... columns)
Table data and columns constructor with a default data model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEditListener(EditListener editListener)
Adds an edit listener.protected Table.CellComponentState
createComponentState(TableModel.Cell<?> cell)
Creates a component state to represent the given object.protected <T> Table.CellComponentState
createTypedComponentState(TableModel.Cell<T> cell)
Creates a component state to represent the given object.protected void
fireEdited()
Fires an edit event to all registered edit listeners.protected void
fireEdited(EditEvent editEvent)
Fires a given edit event to all registered edit listeners.<V> Table.CellRepresentationStrategy<? super V>
getCellRepresentationStrategy(TableColumnModel<V> column)
Returns the given cell representation strategy assigned to produce representation components for the given column.<V> Table.CellRepresentationStrategy<? super V>
getCellRepresentationStrategy(java.lang.Class<V> valueClass)
Returns the given cell representation strategy assigned to produce representation components for the given value class.<C> C
getCellValue(int rowIndex, TableColumnModel<C> column)
Returns the cell value at the given row and column.<C> C
getCellValue(TableModel.Cell<C> cell)
Returns the cell value for the given cell.int
getColumnCount()
int
getColumnIndex(TableColumnModel<?> column)
Determines the logical index of the given table column.java.util.List<java.lang.String>
getColumnLabelFontFamilies(TableColumnModel<?> column)
Returns the label font families for a given column.Extent
getColumnLabelFontSize(TableColumnModel<?> column)
Returns the label font size for a given column.FontStyle
getColumnLabelFontStyle(TableColumnModel<?> column)
Returns the label font style for a given column.double
getColumnLabelFontWeight(TableColumnModel<?> column)
Returns the label font weight for a given column.Extent
getColumnPaddingExtent(TableColumnModel<?> column, Border border)
Returns the padding extent of the indicated column border.Extent
getColumnPaddingLineFarExtent(TableColumnModel<?> column)
Returns the padding extent of the column line far page near border.Extent
getColumnPaddingLineNearExtent(TableColumnModel<?> column)
Returns the padding extent of the column line near page near border.Extent
getColumnPaddingPageFarExtent(TableColumnModel<?> column)
Returns the padding extent of the column line far page far border.Extent
getColumnPaddingPageNearExtent(TableColumnModel<?> column)
Returns the padding extent of the column line near page far border.java.util.List<TableColumnModel<?>>
getColumns()
Table.ColumnUIModel
getColumnUIModel(TableColumnModel<?> column)
Retrieves the UI model for the given column.Component
getComponent(TableModel.Cell<?> cell)
Retrieves the component for the given object.int
getDisplayRowCount()
int
getDisplayRowStartIndex()
ActionPrototype
getFirstActionPrototype()
ActionPrototype
getLastActionPrototype()
ActionPrototype
getNextActionPrototype()
ActionPrototype
getPreviousActionPrototype()
int
getRowCount()
protected TableModel
getTableModel()
void
goFirst()
Goes to the first set of table rows.void
goLast()
Goes to the last set of table rows if the display row count is restricted.void
goNext()
Goes to the next set of table rows if the display row count is restricted.void
goPrevious()
Goes to the previous set of table rows if the display row count is restricted.boolean
isEditable()
void
removeEditListener(EditListener editListener)
Removes an edit listener.<V> Table.CellRepresentationStrategy<? super V>
setCellRepresentationStrategy(TableColumnModel<V> column, Table.CellRepresentationStrategy<V> cellRepresentationStrategy)
Installs the given cell representation strategy to produce representation components for the given column.<V> Table.CellRepresentationStrategy<? super V>
setCellRepresentationStrategy(java.lang.Class<V> valueClass, Table.CellRepresentationStrategy<V> cellRepresentationStrategy)
Installs the given cell representation strategy to produce representation components for the given value class.<C> void
setCellValue(int rowIndex, TableColumnModel<C> column, C newCellValue)
Sets the cell value at the given row and column.<C> void
setCellValue(TableModel.Cell<C> cell, C newCellValue)
Sets the cell value for the given cell.void
setColumnLabelFontFamilies(TableColumnModel<?> column, java.util.List<java.lang.String> newLabelFontFamilies)
Sets the font families of the label for a given column.void
setColumnLabelFontFamilies(java.util.List<java.lang.String> newLabelFontFamilies)
Sets the font families of the labels of all columns.void
setColumnLabelFontSize(Extent newLabelFontSize)
Sets the label font size of all columns.void
setColumnLabelFontSize(TableColumnModel<?> column, Extent newLabelFontSize)
Sets the label font size of a given column.void
setColumnLabelFontStyle(TableColumnModel<?> column, FontStyle newLabelFontStyle)
Sets the style of the label font for a given column.void
setColumnLabelFontStyle(FontStyle newLabelFontStyle)
Sets the style of the label font for all columns.void
setColumnLabelFontWeight(double newLabelFontWeight)
Sets the weight of the label font of all columns.void
setColumnLabelFontWeight(TableColumnModel<?> column, double newLabelFontWeight)
Sets the weight of the label font of a given column.void
setColumnPaddingExtent(Border border, Extent newPaddingExtent)
Sets the padding extent of a all column borders of all columns.void
setColumnPaddingExtent(Extent newPaddingExtent)
Sets the padding extent of all borders of all columns.void
setColumnPaddingExtent(TableColumnModel<?> column, Border border, Extent newPaddingExtent)
Sets the padding extent of a given column border.void
setColumnPaddingExtent(TableColumnModel<?> column, Extent newPaddingExtent)
Sets the padding extent of all borders of a column.void
setColumnPaddingLineFarExtent(Extent newPaddingExtent)
Sets the padding extent of the line far border of all columns.void
setColumnPaddingLineFarExtent(TableColumnModel<?> column, Extent newPaddingExtent)
Sets the padding extent of the column line far border.void
setColumnPaddingLineNearExtent(Extent newPaddingExtent)
Sets the padding extent of the line near border of all columns.void
setColumnPaddingLineNearExtent(TableColumnModel<?> column, Extent newPaddingExtent)
Sets the padding extent of the column line near border.void
setColumnPaddingPageFarExtent(Extent newPaddingExtent)
Sets the padding extent of the page far border of all columns.void
setColumnPaddingPageFarExtent(TableColumnModel<?> column, Extent newPaddingExtent)
Sets the padding extent of the column page far border.void
setColumnPaddingPageNearExtent(Extent newPaddingExtent)
Sets the padding extent of the page near border of all columns.void
setColumnPaddingPageNearExtent(TableColumnModel<?> column, Extent newPaddingExtent)
Sets the padding extent of the column page near border.void
setDisplayRowCount(int newDisplayRowCount)
Sets the number of rows to display at one time.void
setDisplayRowStartIndex(int newDisplayRowStartIndex)
Sets the index of the first row to display.void
setEditable(boolean newEditable)
Sets whether the value is editable and the component will allow the the user to change the value.protected void
updatePrototypes()
Updates the state of the prototypes, such as previous and next.-
Methods inherited from class io.guise.framework.component.AbstractCompositeStateControl
determineStatus, getEnableable, getStatus, isEnabled, reset, setEnabled, setNotification, setStatus, updateStatus, updateValid
-
Methods inherited from class io.guise.framework.component.AbstractCompositeStateComponent
clearComponentStates, determineComponentState, getComponentState, getComponentStates, getObject, putComponentState, removeComponentState
-
Methods inherited from class io.guise.framework.component.AbstractMultipleCompositeComponent
addComponent, getChildComponents, hasChildComponents, removeComponent
-
Methods inherited from class io.guise.framework.component.AbstractCompositeComponent
addCompositeComponentListener, childComponentValidPropertyChanged, determineChildrenValid, determineValid, dispatchInputEvent, dispatchInputEvent, fireChildComponentAdded, fireChildComponentAdded, fireChildComponentRemoved, fireChildComponentRemoved, initializeChildComponent, loadPreferences, removeCompositeComponentListener, resetTheme, savePreferences, uninitializeChildComponent, updateTheme, validate, validateChildren
-
Methods inherited from class io.guise.framework.component.AbstractComponent
addCommandListener, addExportStrategy, addImportStrategy, addKeyListener, addMouseListener, addNotificationListener, addPreferenceProperty, applyTheme, applyTheme, depict, equals, exportTransfer, fireInputEvent, fireNotified, fireNotified, getAncestor, getCommandListeners, getComponentByID, getComponentByName, getComponentOrientation, getConstraints, getDepictID, getDepictor, getDescription, getDescriptionContentType, getDirtyComponents, getDirtyComponents, getEventListenerManager, getFlyoverStrategy, getGlyphURI, getInfo, getInfoContentType, getInfoModel, getInputStrategy, getKeyListeners, getLabel, getLabelContentType, getMouseListeners, getName, getNotification, getNotifications, getNotifications, getOrientation, getParent, getPreferenceProperties, getRootComponent, getTheme, hasAncestor, hasCommandListeners, hashCode, hasKeyListeners, hasMouseListeners, importTransfer, initialize, isDragEnabled, isDropEnabled, isFlyoverEnabled, isPreferenceProperty, isThemeApplied, isValid, notify, processEvent, removeCommandListener, removeExportStrategy, removeImportStrategy, removeKeyListener, removeMouseListener, removeNotificationListener, removePreferenceProperty, setConstraints, setDepicted, setDescription, setDescriptionContentType, setDragEnabled, setDropEnabled, setFlyoverEnabled, setFlyoverStrategy, setGlyphURI, setInfo, setInfoContentType, setInputStrategy, setLabel, setLabelContentType, setName, setOrientation, setParent, setThemeApplied, setValid, toString, update
-
Methods inherited from class io.guise.framework.model.ui.AbstractPresentationModel
BorderLineFarColor, BorderLineFarExtent, BorderLineFarStyle, BorderLineNearColor, BorderLineNearExtent, BorderLineNearStyle, BorderPageFarColor, BorderPageFarExtent, BorderPageFarStyle, BorderPageNearColor, BorderPageNearExtent, BorderPageNearStyle, getBackgroundColor, getBorderColor, getBorderExtent, getBorderStyle, getCornerArcSize, getCornerLineFarPageFarArcSize, getCornerLineFarPageNearArcSize, getCornerLineNearPageFarArcSize, getCornerLineNearPageNearArcSize, getCursor, getExtent, getFontFamilies, getFontSize, getFontStyle, getFontWeight, getLabelFontFamilies, getLabelFontSize, getLabelFontStyle, getLabelFontWeight, getLabelTextColor, getLineExtent, getMarginExtent, getMarginLineFarExtent, getMarginLineNearExtent, getMarginPageFarExtent, getMarginPageNearExtent, getOpacity, getPaddingExtent, getPaddingLineFarExtent, getPaddingLineNearExtent, getPaddingPageFarExtent, getPaddingPageNearExtent, getPageExtent, getStyleID, getTextColor, isDisplayed, isTooltipEnabled, isVisible, setBackgroundColor, setBorderColor, setBorderColor, setBorderExtent, setBorderExtent, setBorderLineFarColor, setBorderLineFarExtent, setBorderLineFarStyle, setBorderLineNearColor, setBorderLineNearExtent, setBorderLineNearStyle, setBorderPageFarColor, setBorderPageFarExtent, setBorderPageFarStyle, setBorderPageNearColor, setBorderPageNearExtent, setBorderPageNearStyle, setBorderStyle, setBorderStyle, setCornerArcSize, setCornerArcSize, setCornerLineFarPageFarArcSize, setCornerLineFarPageNearArcSize, setCornerLineNearPageFarArcSize, setCornerLineNearPageNearArcSize, setCursor, setDisplayed, setExtent, setFontFamilies, setFontSize, setFontStyle, setFontWeight, setLabelFontFamilies, setLabelFontSize, setLabelFontStyle, setLabelFontWeight, setLabelTextColor, setLineExtent, setMarginExtent, setMarginExtent, setMarginLineFarExtent, setMarginLineNearExtent, setMarginPageFarExtent, setMarginPageNearExtent, setOpacity, setPaddingExtent, setPaddingExtent, setPaddingLineFarExtent, setPaddingLineNearExtent, setPaddingPageFarExtent, setPaddingPageNearExtent, setPageExtent, setStyleID, setTextColor, setTooltipEnabled, setVisible
-
Methods inherited from class io.guise.framework.event.GuiseBoundPropertyObject
getSession
-
Methods inherited from class com.globalmentor.beans.BoundPropertyObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.guise.framework.component.Component
addCommandListener, addExportStrategy, addImportStrategy, addKeyListener, addMouseListener, addNotificationListener, addPreferenceProperty, applyTheme, applyTheme, dispatchInputEvent, exportTransfer, fireInputEvent, getAncestor, getComponentOrientation, getConstraints, getDepictor, getFlyoverStrategy, getInputStrategy, getName, getNotification, getOrientation, getParent, getPreferenceProperties, getTheme, hasCommandListeners, hasKeyListeners, hasMouseListeners, importTransfer, initialize, isDragEnabled, isDropEnabled, isFlyoverEnabled, isPreferenceProperty, isThemeApplied, isValid, loadPreferences, notify, removeCommandListener, removeExportStrategy, removeImportStrategy, removeKeyListener, removeMouseListener, removeNotificationListener, removePreferenceProperty, resetTheme, savePreferences, setConstraints, setDragEnabled, setDropEnabled, setFlyoverEnabled, setFlyoverStrategy, setInputStrategy, setName, setNotification, setOrientation, setParent, setThemeApplied, updateTheme, validate
-
Methods inherited from interface io.guise.framework.platform.DepictedObject
depict, getDepictID, getSession, processEvent
-
Methods inherited from interface io.guise.framework.model.InfoModel
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType
-
Methods inherited from interface io.guise.framework.model.LabelModel
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType
-
Methods inherited from interface io.guise.framework.model.ui.PresentationModel
BorderLineFarColor, BorderLineFarExtent, BorderLineFarStyle, BorderLineNearColor, BorderLineNearExtent, BorderLineNearStyle, BorderPageFarColor, BorderPageFarExtent, BorderPageFarStyle, BorderPageNearColor, BorderPageNearExtent, BorderPageNearStyle, getBackgroundColor, getBorderColor, getBorderExtent, getBorderStyle, getCornerArcSize, getCornerLineFarPageFarArcSize, getCornerLineFarPageNearArcSize, getCornerLineNearPageFarArcSize, getCornerLineNearPageNearArcSize, getCursor, getExtent, getFontFamilies, getFontSize, getFontStyle, getFontWeight, getLabelFontFamilies, getLabelFontSize, getLabelFontStyle, getLabelFontWeight, getLabelTextColor, getLineExtent, getMarginExtent, getMarginLineFarExtent, getMarginLineNearExtent, getMarginPageFarExtent, getMarginPageNearExtent, getOpacity, getPaddingExtent, getPaddingLineFarExtent, getPaddingLineNearExtent, getPaddingPageFarExtent, getPaddingPageNearExtent, getPageExtent, getSession, getStyleID, getTextColor, isDisplayed, isTooltipEnabled, isVisible, setBackgroundColor, setBorderColor, setBorderColor, setBorderExtent, setBorderExtent, setBorderLineFarColor, setBorderLineFarExtent, setBorderLineFarStyle, setBorderLineNearColor, setBorderLineNearExtent, setBorderLineNearStyle, setBorderPageFarColor, setBorderPageFarExtent, setBorderPageFarStyle, setBorderPageNearColor, setBorderPageNearExtent, setBorderPageNearStyle, setBorderStyle, setBorderStyle, setCornerArcSize, setCornerArcSize, setCornerLineFarPageFarArcSize, setCornerLineFarPageNearArcSize, setCornerLineNearPageFarArcSize, setCornerLineNearPageNearArcSize, setCursor, setDisplayed, setExtent, setFontFamilies, setFontSize, setFontStyle, setFontWeight, setLabelFontFamilies, setLabelFontSize, setLabelFontStyle, setLabelFontWeight, setLabelTextColor, setLineExtent, setMarginExtent, setMarginExtent, setMarginLineFarExtent, setMarginLineNearExtent, setMarginPageFarExtent, setMarginPageNearExtent, setOpacity, setPaddingExtent, setPaddingExtent, setPaddingLineFarExtent, setPaddingLineNearExtent, setPaddingPageFarExtent, setPaddingPageNearExtent, setPageExtent, setStyleID, setTextColor, setTooltipEnabled, setVisible
-
-
-
-
Field Detail
-
DISPLAY_ROW_COUNT_PROPERTY
public static final java.lang.String DISPLAY_ROW_COUNT_PROPERTY
The display row count bound property.
-
DISPLAY_ROW_START_INDEX_PROPERTY
public static final java.lang.String DISPLAY_ROW_START_INDEX_PROPERTY
The display row start index bound property.
-
updatePrototypesPropertyChangeListener
protected final java.beans.PropertyChangeListener updatePrototypesPropertyChangeListener
The property change listener that updates prototype properties.
-
-
Constructor Detail
-
Table
public Table(java.lang.Class<C> valueClass, java.lang.String... columnNames)
Value class and column names constructor with a default data model. Default cell representation strategies will be installed for the value classes of the indicated columns.- Type Parameters:
C
- The type of values in all the cells in the table.- Parameters:
valueClass
- The class indicating the type of values held in the model.columnNames
- The names to serve as label headers for the columns.- Throws:
java.lang.NullPointerException
- if the given value class isnull
.
-
Table
public Table(TableColumnModel<?>... columns)
Columns constructor with a default data model. Default cell representation strategies will be installed for the value classes of the given columns.- Parameters:
columns
- The models representing the table columns.
-
Table
public Table(java.lang.Class<C> valueClass, C[][] rowValues, java.lang.String... columnNames)
Value class, table data, and column names constructor with a default data model. Default cell representation strategies will be installed for the value classes of the indicated columns.- Type Parameters:
C
- The type of values in all the cells in the table.- Parameters:
valueClass
- The class indicating the type of values held in the model.rowValues
- The two-dimensional list of values, where the first index represents the row and the second represents the column, ornull
if no default values should be given.columnNames
- The names to serve as label headers for the columns.- Throws:
java.lang.NullPointerException
- if the given value class isnull
.java.lang.IllegalArgumentException
- if the given number of columns does not equal the number of columns in any given data row.java.lang.ClassCastException
- if one of the values in a row is not compatible with the type of its column.
-
Table
public Table(java.lang.Object[][] rowValues, TableColumnModel<?>... columns)
Table data and columns constructor with a default data model. Default cell representation strategies will be installed for the value classes of the given columns.- Parameters:
rowValues
- The two-dimensional list of values, where the first index represents the row and the second represents the column, ornull
if no default values should be given.columns
- The models representing the table columns.- Throws:
java.lang.IllegalArgumentException
- if the given number of columns does not equal the number of columns in any given data row.java.lang.ClassCastException
- if one of the values in a row is not compatible with the type of its column.
-
Table
public Table(TableModel tableModel)
Table model constructor. Default cell representation strategies will be installed for the value classes of all the model's columns.- Parameters:
tableModel
- The component data model.- Throws:
java.lang.NullPointerException
- if the given table model isnull
.
-
-
Method Detail
-
getTableModel
protected TableModel getTableModel()
- Returns:
- The table model used by this component.
-
getFirstActionPrototype
public ActionPrototype getFirstActionPrototype()
- Returns:
- The prototype for the first action.
-
getPreviousActionPrototype
public ActionPrototype getPreviousActionPrototype()
- Returns:
- The prototype for the previous action.
-
getNextActionPrototype
public ActionPrototype getNextActionPrototype()
- Returns:
- The prototype for the next action.
-
getLastActionPrototype
public ActionPrototype getLastActionPrototype()
- Returns:
- The prototype for the last action.
-
getDisplayRowCount
public int getDisplayRowCount()
- Returns:
- The number of rows to display at one time, or -1 the row count is not restricted.
-
setDisplayRowCount
public void setDisplayRowCount(int newDisplayRowCount)
Sets the number of rows to display at one time. This is a bound property of typeInteger
.- Parameters:
newDisplayRowCount
- The number of rows to display at one time, or -1 the row count is not restricted.- See Also:
DISPLAY_ROW_COUNT_PROPERTY
-
getDisplayRowStartIndex
public int getDisplayRowStartIndex()
- Returns:
- The index of the first row to display.
-
setDisplayRowStartIndex
public void setDisplayRowStartIndex(int newDisplayRowStartIndex)
Sets the index of the first row to display. This is a bound property of typeInteger
.- Parameters:
newDisplayRowStartIndex
- The index of the first row to display.- Throws:
java.lang.IndexOutOfBoundsException
- if the given index is less than zero.- See Also:
DISPLAY_ROW_START_INDEX_PROPERTY
-
isEditable
public boolean isEditable()
- Specified by:
isEditable
in interfaceEditComponent
- Returns:
- Whether the value is editable and the component will allow the the user to change the value.
-
setEditable
public void setEditable(boolean newEditable)
Description copied from interface:EditComponent
Sets whether the value is editable and the component will allow the the user to change the value. This is a bound property of typeBoolean
.- Specified by:
setEditable
in interfaceEditComponent
- Parameters:
newEditable
-true
if the component should allow the user to change the value.- See Also:
EditComponent.EDITABLE_PROPERTY
-
setCellRepresentationStrategy
public <V> Table.CellRepresentationStrategy<? super V> setCellRepresentationStrategy(java.lang.Class<V> valueClass, Table.CellRepresentationStrategy<V> cellRepresentationStrategy)
Installs the given cell representation strategy to produce representation components for the given value class. The specified representation strategy will only be used if there is no representation strategy for a given column.- Type Parameters:
V
- The type of value represented.- Parameters:
valueClass
- The value class with which the strategy should be associated.cellRepresentationStrategy
- The strategy for generating components to represent values of the given type.- Returns:
- The representation strategy previously associated with the given value class.
- See Also:
setCellRepresentationStrategy(TableColumnModel, CellRepresentationStrategy)
-
getCellRepresentationStrategy
public <V> Table.CellRepresentationStrategy<? super V> getCellRepresentationStrategy(java.lang.Class<V> valueClass)
Returns the given cell representation strategy assigned to produce representation components for the given value class. The returned representation strategy can be overridden by a representation strategy associated with a particular column.- Type Parameters:
V
- The type of value represented.- Parameters:
valueClass
- The value class with which the strategy should be associated.- Returns:
- The strategy for generating components to represent values of the given type, or
null
if there is no associated representation strategy. - See Also:
getCellRepresentationStrategy(TableColumnModel)
-
setCellRepresentationStrategy
public <V> Table.CellRepresentationStrategy<? super V> setCellRepresentationStrategy(TableColumnModel<V> column, Table.CellRepresentationStrategy<V> cellRepresentationStrategy)
Installs the given cell representation strategy to produce representation components for the given column. A cell representation strategy for a particular column will override a cell representation strategy registered for a given type.- Type Parameters:
V
- The type of value the column represents.- Parameters:
column
- The column with which the strategy should be associated.cellRepresentationStrategy
- The strategy for generating components to represent values in the given column.- Returns:
- The representation strategy previously associated with the given column.
- See Also:
setCellRepresentationStrategy(Class, CellRepresentationStrategy)
-
getCellRepresentationStrategy
public <V> Table.CellRepresentationStrategy<? super V> getCellRepresentationStrategy(TableColumnModel<V> column)
Returns the given cell representation strategy assigned to produce representation components for the given column. A cell representation strategy for a particular column will override a cell representation strategy registered for a given type.- Type Parameters:
V
- The type of value the column represents.- Parameters:
column
- The column with which the strategy should be associated.- Returns:
- The strategy for generating components to represent values in the given column, or
null
if there is no associated representation strategy. - See Also:
getCellRepresentationStrategy(Class)
-
getComponent
public Component getComponent(TableModel.Cell<?> cell)
Retrieves the component for the given object. If no component yet exists for the given object, one will be created.This version is provided to allow public access.
- Overrides:
getComponent
in classAbstractCompositeStateComponent<TableModel.Cell<?>,Table.CellComponentState>
- Parameters:
cell
- The object for which a representation component should be returned.- Returns:
- The child component representing the given object.
-
createComponentState
protected Table.CellComponentState createComponentState(TableModel.Cell<?> cell)
Creates a component state to represent the given object.This implementation delegates to
createTypedComponentState(io.guise.framework.model.TableModel.Cell)
.- Specified by:
createComponentState
in classAbstractCompositeStateComponent<TableModel.Cell<?>,Table.CellComponentState>
- Parameters:
cell
- The object with which the component state is to be associated.- Returns:
- The component state to represent the given object.
-
createTypedComponentState
protected <T> Table.CellComponentState createTypedComponentState(TableModel.Cell<T> cell)
Creates a component state to represent the given object.- Type Parameters:
T
- The type of value contained in the cell.- Parameters:
cell
- The object with which the component state is to be associated.- Returns:
- The component state to represent the given object.
- Throws:
java.lang.IllegalArgumentException
- if the given object is not an appropriate object for a component state to be created.java.lang.IllegalStateException
- if there is no registered cell representation strategy appropriate for the cell.
-
getColumnUIModel
public Table.ColumnUIModel getColumnUIModel(TableColumnModel<?> column)
Retrieves the UI model for the given column. If no UI model yet exists for the given column, one will be created. There is normally no need for applications to call this method directly.- Parameters:
column
- The column for which a UI model should be returned.- Returns:
- The UI model for the given column.
- Throws:
java.lang.NullPointerException
- if the given column isnull
.
-
getColumnLabelFontFamilies
public java.util.List<java.lang.String> getColumnLabelFontFamilies(TableColumnModel<?> column)
Returns the label font families for a given column.- Parameters:
column
- The column for which the label font families should be returned.- Returns:
- The prioritized list of label font family names, or
null
if no label font family names have been specified. - Throws:
java.lang.NullPointerException
- if the given column isnull
.
-
setColumnLabelFontFamilies
public void setColumnLabelFontFamilies(TableColumnModel<?> column, java.util.List<java.lang.String> newLabelFontFamilies)
Sets the font families of the label for a given column. This is a bound property.- Parameters:
column
- The column for which the label font families should be set.newLabelFontFamilies
- The new prioritized list of label font family names, ornull
if no label font family names are specified.- Throws:
java.lang.NullPointerException
- if the given column isnull
.- See Also:
PresentationModel.LABEL_FONT_FAMILIES_PROPERTY
-
setColumnLabelFontFamilies
public void setColumnLabelFontFamilies(java.util.List<java.lang.String> newLabelFontFamilies)
Sets the font families of the labels of all columns. This is a bound property for each column.- Parameters:
newLabelFontFamilies
- The new prioritized list of label font family names, ornull
if no label font family names are specified.- See Also:
PresentationModel.LABEL_FONT_FAMILIES_PROPERTY
-
getColumnLabelFontSize
public Extent getColumnLabelFontSize(TableColumnModel<?> column)
Returns the label font size for a given column.- Parameters:
column
- The column for which the label font size should be returned.- Returns:
- The size of the label font from baseline to baseline, or
null
if no label font size has been specified. - Throws:
java.lang.NullPointerException
- if the given column isnull
.
-
setColumnLabelFontSize
public void setColumnLabelFontSize(TableColumnModel<?> column, Extent newLabelFontSize)
Sets the label font size of a given column. This is a bound property.- Parameters:
column
- The column for which the label font size should be set.newLabelFontSize
- The new size of the label font from baseline to baseline, ornull
there is no label font size specified.- Throws:
java.lang.NullPointerException
- if the given column isnull
.- See Also:
PresentationModel.LABEL_FONT_SIZE_PROPERTY
-
setColumnLabelFontSize
public void setColumnLabelFontSize(Extent newLabelFontSize)
Sets the label font size of all columns. This is a bound property for each column.- Parameters:
newLabelFontSize
- The new size of the label font from baseline to baseline, ornull
there is no label font size specified.- See Also:
PresentationModel.LABEL_FONT_SIZE_PROPERTY
-
getColumnLabelFontStyle
public FontStyle getColumnLabelFontStyle(TableColumnModel<?> column)
Returns the label font style for a given column.- Parameters:
column
- The column for which the label font style should be returned.- Returns:
- The style of the label font.
- Throws:
java.lang.NullPointerException
- if the given column isnull
.
-
setColumnLabelFontStyle
public void setColumnLabelFontStyle(TableColumnModel<?> column, FontStyle newLabelFontStyle)
Sets the style of the label font for a given column. This is a bound property.- Parameters:
column
- The column for which the label font size should be set.newLabelFontStyle
- The style of the label font.- Throws:
java.lang.NullPointerException
- if the given column and/or label font style isnull
.- See Also:
PresentationModel.LABEL_FONT_STYLE_PROPERTY
-
setColumnLabelFontStyle
public void setColumnLabelFontStyle(FontStyle newLabelFontStyle)
Sets the style of the label font for all columns. This is a bound property of each column.- Parameters:
newLabelFontStyle
- The style of the label font.- Throws:
java.lang.NullPointerException
- if the given label font style isnull
.- See Also:
PresentationModel.LABEL_FONT_STYLE_PROPERTY
-
getColumnLabelFontWeight
public double getColumnLabelFontWeight(TableColumnModel<?> column)
Returns the label font weight for a given column.- Parameters:
column
- The column for which the label font weight should be returned.- Returns:
- The weight of the label font relative to a normal value of 0.5.
- Throws:
java.lang.NullPointerException
- if the given column isnull
.
-
setColumnLabelFontWeight
public void setColumnLabelFontWeight(TableColumnModel<?> column, double newLabelFontWeight)
Sets the weight of the label font of a given column. The weight of the label font relative to a normal value of 0.5. A font weight of 0.75 is equivalent to a bold font. It is recommended that the constant variablesPresentationModel.FONT_WEIGHT_NORMAL
andPresentationModel.FONT_WEIGHT_BOLD
be used for the most compatibility across platforms. This is a bound property of typeDouble
.- Parameters:
column
- The column for which the label font weight should be set.newLabelFontWeight
- The weight of the label font relative to a normal value of 0.5.- Throws:
java.lang.NullPointerException
- if the given column isnull
.- See Also:
PresentationModel.FONT_WEIGHT_PROPERTY
,PresentationModel.FONT_WEIGHT_NORMAL
,PresentationModel.FONT_WEIGHT_BOLD
-
setColumnLabelFontWeight
public void setColumnLabelFontWeight(double newLabelFontWeight)
Sets the weight of the label font of all columns. The weight of the label font relative to a normal value of 0.5. A font weight of 0.75 is equivalent to a bold font. It is recommended that the constant variablesPresentationModel.FONT_WEIGHT_NORMAL
andPresentationModel.FONT_WEIGHT_BOLD
be used for the most compatibility across platforms. This is a bound property of typeDouble
.- Parameters:
newLabelFontWeight
- The weight of the label font relative to a normal value of 0.5.- See Also:
PresentationModel.FONT_WEIGHT_PROPERTY
,PresentationModel.FONT_WEIGHT_NORMAL
,PresentationModel.FONT_WEIGHT_BOLD
-
getColumnPaddingExtent
public Extent getColumnPaddingExtent(TableColumnModel<?> column, Border border)
Returns the padding extent of the indicated column border.- Parameters:
column
- The column for which a padding extent should be returned.border
- The border for which a padding extent should be returned.- Returns:
- The padding extent of the given column border.
- Throws:
java.lang.NullPointerException
- if the given column isnull
.
-
getColumnPaddingLineNearExtent
public Extent getColumnPaddingLineNearExtent(TableColumnModel<?> column)
Returns the padding extent of the column line near page near border.- Parameters:
column
- The column for which a padding extent should be returned.- Returns:
- The padding extent of the given column border.
- Throws:
java.lang.NullPointerException
- if the given column isnull
.
-
getColumnPaddingLineFarExtent
public Extent getColumnPaddingLineFarExtent(TableColumnModel<?> column)
Returns the padding extent of the column line far page near border.- Parameters:
column
- The column for which a padding extent should be returned.- Returns:
- The padding extent of the given column border.
- Throws:
java.lang.NullPointerException
- if the given column isnull
.
-
getColumnPaddingPageNearExtent
public Extent getColumnPaddingPageNearExtent(TableColumnModel<?> column)
Returns the padding extent of the column line near page far border.- Parameters:
column
- The column for which a padding extent should be returned.- Returns:
- The padding extent of the given column border.
- Throws:
java.lang.NullPointerException
- if the given column isnull
.
-
getColumnPaddingPageFarExtent
public Extent getColumnPaddingPageFarExtent(TableColumnModel<?> column)
Returns the padding extent of the column line far page far border.- Parameters:
column
- The column for which a padding extent should be returned.- Returns:
- The padding extent of the given column border.
- Throws:
java.lang.NullPointerException
- if the given column isnull
.
-
setColumnPaddingExtent
public void setColumnPaddingExtent(TableColumnModel<?> column, Border border, Extent newPaddingExtent)
Sets the padding extent of a given column border. The padding extent of each column border represents a bound property.- Parameters:
column
- The column for which the padding extent should be set.border
- The border for which the padding extent should be set.newPaddingExtent
- The padding extent.- Throws:
java.lang.NullPointerException
- if the given column, border and/or padding extent isnull
.- See Also:
PresentationModel.PADDING_LINE_NEAR_EXTENT_PROPERTY
,PresentationModel.PADDING_LINE_FAR_EXTENT_PROPERTY
,PresentationModel.PADDING_PAGE_NEAR_EXTENT_PROPERTY
,PresentationModel.PADDING_PAGE_FAR_EXTENT_PROPERTY
-
setColumnPaddingLineNearExtent
public void setColumnPaddingLineNearExtent(TableColumnModel<?> column, Extent newPaddingExtent)
Sets the padding extent of the column line near border. This is a bound property.- Parameters:
column
- The column for which the padding extent should be set.newPaddingExtent
- The padding extent.- Throws:
java.lang.NullPointerException
- if the given column and/or padding extent isnull
.- See Also:
PresentationModel.PADDING_LINE_NEAR_EXTENT_PROPERTY
-
setColumnPaddingLineFarExtent
public void setColumnPaddingLineFarExtent(TableColumnModel<?> column, Extent newPaddingExtent)
Sets the padding extent of the column line far border. This is a bound property.- Parameters:
column
- The column for which the padding extent should be set.newPaddingExtent
- The padding extent, ornull
if the default padding extent should be used.- Throws:
java.lang.NullPointerException
- if the given column and/or padding extent isnull
.- See Also:
PresentationModel.PADDING_LINE_FAR_EXTENT_PROPERTY
-
setColumnPaddingPageNearExtent
public void setColumnPaddingPageNearExtent(TableColumnModel<?> column, Extent newPaddingExtent)
Sets the padding extent of the column page near border. This is a bound property.- Parameters:
column
- The column for which the padding extent should be set.newPaddingExtent
- The padding extent, ornull
if the default padding extent should be used.- Throws:
java.lang.NullPointerException
- if the given columna and/or padding extent isnull
.- See Also:
PresentationModel.PADDING_PAGE_NEAR_EXTENT_PROPERTY
-
setColumnPaddingPageFarExtent
public void setColumnPaddingPageFarExtent(TableColumnModel<?> column, Extent newPaddingExtent)
Sets the padding extent of the column page far border. This is a bound property.- Parameters:
column
- The column for which the padding extent should be set.newPaddingExtent
- The padding extent, ornull
if the default padding extent should be used.- Throws:
java.lang.NullPointerException
- if the given column and/or padding extent isnull
.- See Also:
PresentationModel.PADDING_PAGE_FAR_EXTENT_PROPERTY
-
setColumnPaddingExtent
public void setColumnPaddingExtent(TableColumnModel<?> column, Extent newPaddingExtent)
Sets the padding extent of all borders of a column. The padding extent of each column border represents a bound property.- Parameters:
column
- The column for which the padding extent should be set.newPaddingExtent
- The padding extent.- Throws:
java.lang.NullPointerException
- if the given column and/or padding extent isnull
.- See Also:
PresentationModel.PADDING_LINE_NEAR_EXTENT_PROPERTY
,PresentationModel.PADDING_LINE_FAR_EXTENT_PROPERTY
,PresentationModel.PADDING_PAGE_NEAR_EXTENT_PROPERTY
,PresentationModel.PADDING_PAGE_FAR_EXTENT_PROPERTY
-
setColumnPaddingExtent
public void setColumnPaddingExtent(Border border, Extent newPaddingExtent)
Sets the padding extent of a all column borders of all columns. The padding extent of each column border represents a bound property.- Parameters:
border
- The border for which the padding extent should be set.newPaddingExtent
- The padding extent.- Throws:
java.lang.NullPointerException
- if the border and/or padding extent isnull
.- See Also:
PresentationModel.PADDING_LINE_NEAR_EXTENT_PROPERTY
,PresentationModel.PADDING_LINE_FAR_EXTENT_PROPERTY
,PresentationModel.PADDING_PAGE_NEAR_EXTENT_PROPERTY
,PresentationModel.PADDING_PAGE_FAR_EXTENT_PROPERTY
-
setColumnPaddingLineNearExtent
public void setColumnPaddingLineNearExtent(Extent newPaddingExtent)
Sets the padding extent of the line near border of all columns. This is a bound property.- Parameters:
newPaddingExtent
- The padding extent.- Throws:
java.lang.NullPointerException
- if the given padding extent isnull
.- See Also:
PresentationModel.PADDING_LINE_NEAR_EXTENT_PROPERTY
-
setColumnPaddingLineFarExtent
public void setColumnPaddingLineFarExtent(Extent newPaddingExtent)
Sets the padding extent of the line far border of all columns. This is a bound property.- Parameters:
newPaddingExtent
- The padding extent, ornull
if the default padding extent should be used.- Throws:
java.lang.NullPointerException
- if the given padding extent isnull
.- See Also:
PresentationModel.PADDING_LINE_FAR_EXTENT_PROPERTY
-
setColumnPaddingPageNearExtent
public void setColumnPaddingPageNearExtent(Extent newPaddingExtent)
Sets the padding extent of the page near border of all columns. This is a bound property.- Parameters:
newPaddingExtent
- The padding extent, ornull
if the default padding extent should be used.- Throws:
java.lang.NullPointerException
- if the given padding extent isnull
.- See Also:
PresentationModel.PADDING_PAGE_NEAR_EXTENT_PROPERTY
-
setColumnPaddingPageFarExtent
public void setColumnPaddingPageFarExtent(Extent newPaddingExtent)
Sets the padding extent of the page far border of all columns. This is a bound property.- Parameters:
newPaddingExtent
- The padding extent, ornull
if the default padding extent should be used.- Throws:
java.lang.NullPointerException
- if the given padding extent isnull
.- See Also:
PresentationModel.PADDING_PAGE_FAR_EXTENT_PROPERTY
-
setColumnPaddingExtent
public void setColumnPaddingExtent(Extent newPaddingExtent)
Sets the padding extent of all borders of all columns. The padding extent of each border represents a bound property. This is a convenience method that callssetColumnPaddingExtent(Border, Extent)
for each border.- Parameters:
newPaddingExtent
- The padding extent.- Throws:
java.lang.NullPointerException
- if the given padding extent isnull
.- See Also:
PresentationModel.PADDING_LINE_NEAR_EXTENT_PROPERTY
,PresentationModel.PADDING_LINE_FAR_EXTENT_PROPERTY
,PresentationModel.PADDING_PAGE_NEAR_EXTENT_PROPERTY
,PresentationModel.PADDING_PAGE_FAR_EXTENT_PROPERTY
-
updatePrototypes
protected void updatePrototypes()
Updates the state of the prototypes, such as previous and next.
-
goFirst
public void goFirst()
Goes to the first set of table rows.
-
goPrevious
public void goPrevious()
Goes to the previous set of table rows if the display row count is restricted. If the display row count is not restricted and the row start index is greater than zero, it is reset to zero.- See Also:
getDisplayRowStartIndex()
,getDisplayRowCount()
-
goNext
public void goNext()
Goes to the next set of table rows if the display row count is restricted. If the display row count is not restricted, or there are no rows, nothing occurs.- See Also:
getDisplayRowStartIndex()
,getDisplayRowCount()
-
goLast
public void goLast()
Goes to the last set of table rows if the display row count is restricted. If the display row count is not restricted, nothing occurs.- See Also:
getDisplayRowStartIndex()
,getDisplayRowCount()
-
getColumnIndex
public int getColumnIndex(TableColumnModel<?> column)
Description copied from interface:TableModel
Determines the logical index of the given table column.- Specified by:
getColumnIndex
in interfaceTableModel
- Parameters:
column
- One of the table columns.- Returns:
- The zero-based logical index of the column within the table, or -1 if the column is not one of the model's columns.
-
getColumns
public java.util.List<TableColumnModel<?>> getColumns()
- Specified by:
getColumns
in interfaceTableModel
- Returns:
- A read-only list of table columns in physical order.
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfaceTableModel
- Returns:
- The number of rows in this table.
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceTableModel
- Returns:
- The number of columns in this table.
-
getCellValue
public <C> C getCellValue(TableModel.Cell<C> cell)
Description copied from interface:TableModel
Returns the cell value for the given cell. This method delegates toTableModel.getCellValue(int, TableColumnModel)
.- Specified by:
getCellValue
in interfaceTableModel
- Type Parameters:
C
- The type of cell value.- Parameters:
cell
- The cell containing the row index and column information.- Returns:
- The value in the cell at the given row and column, or
null
if there is no value in that cell.
-
getCellValue
public <C> C getCellValue(int rowIndex, TableColumnModel<C> column)
Description copied from interface:TableModel
Returns the cell value at the given row and column.- Specified by:
getCellValue
in interfaceTableModel
- Type Parameters:
C
- The type of cell values in the given column.- Parameters:
rowIndex
- The zero-based row index.column
- The column for which a value should be returned.- Returns:
- The value in the cell at the given row and column, or
null
if there is no value in that cell.
-
setCellValue
public <C> void setCellValue(TableModel.Cell<C> cell, C newCellValue)
Description copied from interface:TableModel
Sets the cell value for the given cell. This method delegates toTableModel.setCellValue(int, TableColumnModel, Object)
.- Specified by:
setCellValue
in interfaceTableModel
- Type Parameters:
C
- The type of cell value.- Parameters:
cell
- The cell containing the row index and column information.newCellValue
- The value to place in the cell at the given row and column, ornull
if there should be no value in that cell.
-
setCellValue
public <C> void setCellValue(int rowIndex, TableColumnModel<C> column, C newCellValue)
Description copied from interface:TableModel
Sets the cell value at the given row and column.- Specified by:
setCellValue
in interfaceTableModel
- Type Parameters:
C
- The type of cell values in the given column.- Parameters:
rowIndex
- The zero-based row index.column
- The column for which a value should be returned.newCellValue
- The value to place in the cell at the given row and column, ornull
if there should be no value in that cell.
-
addEditListener
public void addEditListener(EditListener editListener)
Description copied from interface:EditListenable
Adds an edit listener.- Specified by:
addEditListener
in interfaceEditListenable
- Parameters:
editListener
- The edit listener to add.
-
removeEditListener
public void removeEditListener(EditListener editListener)
Description copied from interface:EditListenable
Removes an edit listener.- Specified by:
removeEditListener
in interfaceEditListenable
- Parameters:
editListener
- The edit listener to remove.
-
fireEdited
protected void fireEdited()
Fires an edit event to all registered edit listeners. This method delegates tofireEdited(EditEvent)
.- See Also:
EditListener
,EditEvent
-
fireEdited
protected void fireEdited(EditEvent editEvent)
Fires a given edit event to all registered edit listeners.- Parameters:
editEvent
- The edit event to fire.
-
-