com.michaelbaranov.microba.gradient

Class DefaultGradientModel


public class DefaultGradientModel
extends AbstractBoundedTableModel

A very basic implementation of AbstractBoundedTableModel used by default by GradientBar. This implementation has bounds 0 - 100 and is mutable.
Author:
Michael Baranov

Constructor Summary

DefaultGradientModel()
Constructor.

Method Summary

void
add(Color color, int position)
Adds a color point.
void
clear()
Removes all color points.
Class
getColumnClass(int columnIndex)
int
getColumnCount()
int
getLowerBound()
int
getRowCount()
int
getUpperBound()
Object
getValueAt(int rowIndex, int columnIndex)
void
remove(int index)
Removes a color point at specified index.

Constructor Details

DefaultGradientModel

public DefaultGradientModel()
Constructor.

Method Details

add

public void add(Color color,
                int position)
Adds a color point.
Parameters:
color -
position -

clear

public void clear()
Removes all color points.

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)

remove

public void remove(int index)
Removes a color point at specified index.
Parameters:
index -