Package uk.ac.starlink.topcat.plot
Class PoolStyleSet
java.lang.Object
uk.ac.starlink.topcat.plot.PoolStyleSet
- All Implemented Interfaces:
MutableStyleSet
,uk.ac.starlink.ttools.plot.StyleSet
StyleSet which obtains styles from a base StyleSet, but
only dispenses ones which are not already used. A global list
of used indices, which is shared with other instances of this class,
ensures that markers are not shared between them.
Since this also implements MutableStyleSet, individual styles can
be overwritten.
- Since:
- 4 Nov 2005
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionPoolStyleSet
(uk.ac.starlink.ttools.plot.StyleSet base, BitSet used) Constructs a new StyleSet. -
Method Summary
-
Constructor Details
-
PoolStyleSet
Constructs a new StyleSet.- Parameters:
base
- style set which supplies the actual symbolsused
- a bit vector, shared between a group of PoolStyleSet, which keeps track of which styles (indices intobase
) are currently in use
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceuk.ac.starlink.ttools.plot.StyleSet
-
getStyle
public uk.ac.starlink.ttools.plot.Style getStyle(int index) - Specified by:
getStyle
in interfaceuk.ac.starlink.ttools.plot.StyleSet
-
setStyle
public void setStyle(int index, uk.ac.starlink.ttools.plot.Style style) Explicitly sets the style at a given index to be a specified one.- Specified by:
setStyle
in interfaceMutableStyleSet
- Parameters:
index
- style indexstyle
- style to use
-
reset
public void reset()Resets all the symbols to be ones from the base set. This also has the effect of returning any styles owned by this set to the pool.
-