|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractListModel
contrib.ch.randelshofer.quaqua.colorchooser.PaletteListModel
public class PaletteListModel
PaletteListModel manages a list of PaletteEntry.
Field Summary |
---|
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
PaletteListModel(java.lang.String name,
java.lang.String info,
PaletteEntry[] entries)
Creates a new instance. |
Method Summary | |
---|---|
int |
computeClosestIndex(java.awt.Color referenceColor)
Computes the index of the color which comes closest to the specified color. |
int |
getClosestIndex()
Returns the index of the color which is closest to the current color in the color chooser, or -1 of no such color exists. |
java.lang.Object |
getElementAt(int index)
|
java.lang.String |
getInfo()
|
java.lang.String |
getName()
|
int |
getSize()
|
void |
setClosestIndex(int newValue)
Sets the index of the color which is closest to the current color in the color chooser. |
void |
setInfo(java.lang.String newValue)
|
void |
setName(java.lang.String newValue)
|
java.lang.String |
toString()
Used for displaying the name of the palette in the combo box of the ColorPalettesChooser. |
Methods inherited from class javax.swing.AbstractListModel |
---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PaletteListModel(java.lang.String name, java.lang.String info, PaletteEntry[] entries)
Method Detail |
---|
public void setName(java.lang.String newValue)
public java.lang.String getName()
public void setInfo(java.lang.String newValue)
public java.lang.String getInfo()
public java.lang.Object getElementAt(int index)
public int getSize()
public java.lang.String toString()
toString
in class java.lang.Object
public int computeClosestIndex(java.awt.Color referenceColor)
public void setClosestIndex(int newValue)
newValue
- closest index or -1, if no color is close.public int getClosestIndex()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |