JIDE 3.5.15

com.jidesoft.palette
Class AbstractPalette

java.lang.Object
  extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jidesoft.palette.Palette
Palette.Cycle
 
Constructor Summary
protected AbstractPalette()
           
 
Method Summary
 void addPaletteListener(PaletteListener listener)
          Add a listener to the list that's notified each time a change to the palette occurs.
 void addWeakPaletteListener(PaletteListener listener)
          Add a listener to the list that's notified each time a change to the palette occurs.
protected  int getEntry(double fraction, int colorCount, int paletteSize)
           
 boolean isInverted()
           
protected  void notifyPaletteChanged(PaletteEvent event)
           
 void removePaletteListener(PaletteListener listener)
          Remove a listener to the list that's notified each time a change to the palette occurs.
 void removePaletteListeners()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.palette.Palette
getColor, getColor, getColorCount, getCycle
 

Constructor Detail

AbstractPalette

protected AbstractPalette()
Method Detail

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)

JIDE 3.5.15