com.jidesoft.palette
Class AbstractPalette
java.lang.Object
com.jidesoft.palette.AbstractPalette
- All Implemented Interfaces:
- Palette
- Direct Known Subclasses:
- AbstractMutablePalette
public abstract class AbstractPalette
- extends Object
- implements Palette
This class provides a skeletal implementation of the Palette interface to minimize the effort required to implement
this interface.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPalette
protected AbstractPalette()
getEntry
protected int getEntry(double fraction,
int colorCount,
int paletteSize)
isInverted
public boolean isInverted()
addPaletteListener
public void addPaletteListener(PaletteListener listener)
- Description copied from interface:
Palette
- Add a listener to the list that's notified each time a change to the palette occurs.
- Specified by:
addPaletteListener
in interface Palette
- Parameters:
listener
- the PaletteListener
addWeakPaletteListener
public void addWeakPaletteListener(PaletteListener listener)
- Description copied from interface:
Palette
- Add a listener to the list that's notified each time a change to the palette occurs. The listener will
automatically be disposed of should no other object have a reference to it.
- Specified by:
addWeakPaletteListener
in interface Palette
- Parameters:
listener
- the PaletteListener
removePaletteListener
public void removePaletteListener(PaletteListener listener)
- Description copied from interface:
Palette
- Remove a listener to the list that's notified each time a change to the palette occurs.
- Specified by:
removePaletteListener
in interface Palette
- Parameters:
listener
- the PaletteListener
removePaletteListeners
public void removePaletteListeners()
notifyPaletteChanged
protected void notifyPaletteChanged(PaletteEvent event)