com.michaelbaranov.microba.gradienteditor

Class DefaultGradientEditorModel

Implemented Interfaces:
MarkerMutationModel

public class DefaultGradientEditorModel
extends AbstractBoundedTableModelWithSelection
implements MarkerMutationModel

A basic implementation of AbstractBoundedTableModelWithSelection and MarkerMutationModel. Used by default by GradientEditor as a color model, color selection model and color mutation model.

This implementation is mutable.

Author:
Michael Baranov

Field Summary

static int
COLOR_COLUMN
static int
POSITION_COLUMN

Constructor Summary

DefaultGradientEditorModel()

Method Summary

int
addMarkAtPosition(int pos)
Class
getColumnClass(int columnIndex)
int
getColumnCount()
int
getLowerBound()
int
getRowCount()
int
getUpperBound()
Object
getValueAt(int rowIndex, int columnIndex)
boolean
isCellEditable(int rowIndex, int columnIndex)
void
removeMarkerAtIndex(int index)
void
setValueAt(Object aValue, int rowIndex, int columnIndex)

Field Details

COLOR_COLUMN

public static final int COLOR_COLUMN
Field Value:
1

POSITION_COLUMN

public static final int POSITION_COLUMN
Field Value:
0

Constructor Details

DefaultGradientEditorModel

public DefaultGradientEditorModel()

Method Details

addMarkAtPosition

public int addMarkAtPosition(int pos)

getColumnClass

public Class getColumnClass(int columnIndex)

getColumnCount

public int getColumnCount()

getLowerBound

public int getLowerBound()

getRowCount

public int getRowCount()

getUpperBound

public int getUpperBound()

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)

removeMarkerAtIndex

public void removeMarkerAtIndex(int index)

setValueAt

public void setValueAt(Object aValue,
                       int rowIndex,
                       int columnIndex)