|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot.DensityStyle
public abstract class DensityStyle
Style for the way that a density map (2d histogram) is plotted.
Nested Class Summary | |
---|---|
static class |
DensityStyle.Channel
Enumeration class which describes a colour channel. |
Field Summary | |
---|---|
static DensityStyle.Channel |
BLUE
Blue colour channel. |
static DensityStyle.Channel |
GREEN
Green colour channel. |
static DensityStyle.Channel |
RED
Red colour channel. |
Constructor Summary | |
---|---|
DensityStyle(DensityStyle.Channel channel)
Constructs a new style which plots in a given colour channel. |
Method Summary | |
---|---|
int |
getIconHeight()
|
int |
getIconWidth()
|
Icon |
getLegendIcon()
Returns an icon suitable for displaying in a legend for this style. |
Shader |
getShader()
Returns the shader to use in indexed (non-RGB) mode. |
protected abstract boolean |
isRGB()
Indicates whether the plotting is currently to be treated as three-channel RGB plotting or as single-channel intensity plotting. |
int |
levelBits(byte level)
Defines how the style looks. |
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
|
void |
setShader(Shader shader)
Sets the shader to use in indexed (non-RGB) mode. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DensityStyle.Channel RED
public static final DensityStyle.Channel GREEN
public static final DensityStyle.Channel BLUE
Constructor Detail |
---|
public DensityStyle(DensityStyle.Channel channel)
channel
- colour channelMethod Detail |
---|
public void setShader(Shader shader)
shader
- shaderpublic Shader getShader()
public int levelBits(byte level)
value=0x000000ff&level
)
to a bitmask which can be OR-ed with an existing integer to
give a 32-type ARGB colour value.
level
- unsigned byte value
protected abstract boolean isRGB()
public Icon getLegendIcon()
Style
getLegendIcon
in interface Style
public int getIconHeight()
getIconHeight
in interface Icon
public int getIconWidth()
getIconWidth
in interface Icon
public void paintIcon(Component c, Graphics g, int x, int y)
paintIcon
in interface Icon
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |