Interface ColorPaletteModel
-
- All Known Implementing Classes:
DefaultColorPaletteModel
public interface ColorPaletteModel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChangeListener(javax.swing.event.ChangeListener listener)
Addslistener
as a listener to changes in the model.void
bulkLoad(java.util.List<java.awt.Color> colors, int columns)
Replaces all colors in the model, and my alter the structure (column/row count).java.awt.Color
getColor(int row, int column)
Returns the color at this locationint
getColumnCount()
How many columns of colors in the paletteint
getRowCount()
How many rows of colors in the palette?void
removeChangeListener(javax.swing.event.ChangeListener listener)
Removeslistener
as a listener to changes in the model.void
setColor(int row, int column, java.awt.Color color)
Change the color at a location
-
-
-
Method Detail
-
getColumnCount
int getColumnCount()
How many columns of colors in the palette
-
getRowCount
int getRowCount()
How many rows of colors in the palette?
-
getColor
java.awt.Color getColor(int row, int column)
Returns the color at this location
-
setColor
void setColor(int row, int column, java.awt.Color color)
Change the color at a location
-
bulkLoad
void bulkLoad(java.util.List<java.awt.Color> colors, int columns)
Replaces all colors in the model, and my alter the structure (column/row count). The size of the color list must be divisible by the new column count.
-
addChangeListener
void addChangeListener(javax.swing.event.ChangeListener listener)
Addslistener
as a listener to changes in the model.- Parameters:
listener
- theChangeListener
to be added
-
removeChangeListener
void removeChangeListener(javax.swing.event.ChangeListener listener)
Removeslistener
as a listener to changes in the model.- Parameters:
listener
- theChangeListener
to be removed
-
-