Class DefaultGradientModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.michaelbaranov.microba.common.AbstractBoundedTableModel
com.michaelbaranov.microba.gradient.DefaultGradientModel
- All Implemented Interfaces:
BoundedTableModel,Serializable,TableModel
A very basic implementation of
AbstractBoundedTableModel used by
default by GradientBar. This implementation has bounds 0 - 100 and
is mutable.- Author:
- Michael Baranov
- See Also:
-
Field Summary
Fields inherited from interface com.michaelbaranov.microba.common.BoundedTableModel
PROPERTY_LOWER_BOUND, PROPERTY_UPPER_BOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a color point.voidclear()Removes all color points.getColumnClass(int columnIndex) intintReturns some lower bound, further describing the data.intintReturns some upper bound, further describing the data.getValueAt(int rowIndex, int columnIndex) voidremove(int index) Removes a color point at specified index.Methods inherited from class com.michaelbaranov.microba.common.AbstractBoundedTableModel
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAtMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnName, isCellEditable, removeTableModelListener, setValueAt
-
Constructor Details
-
DefaultGradientModel
public DefaultGradientModel()Constructor.
-
-
Method Details
-
getLowerBound
public int getLowerBound()Description copied from interface:BoundedTableModelReturns some lower bound, further describing the data.- Returns:
- lower bound.
-
getUpperBound
public int getUpperBound()Description copied from interface:BoundedTableModelReturns some upper bound, further describing the data.- Returns:
- upper bound.
-
getRowCount
public int getRowCount() -
getColumnCount
public int getColumnCount() -
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
getValueAt
-
add
Adds a color point.- Parameters:
color-position-
-
remove
public void remove(int index) Removes a color point at specified index.- Parameters:
index-
-
clear
public void clear()Removes all color points.
-