Modifier and Type | Class | Description |
---|---|---|
static class |
DensityStyle.Channel |
Enumeration class which describes a colour channel.
|
Modifier and Type | Field | Description |
---|---|---|
static DensityStyle.Channel |
BLUE |
Blue colour channel.
|
static DensityStyle.Channel |
GREEN |
Green colour channel.
|
static DensityStyle.Channel |
RED |
Red colour channel.
|
Constructor | Description |
---|---|
DensityStyle(DensityStyle.Channel channel) |
Constructs a new style which plots in a given colour channel.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getIconHeight() |
|
int |
getIconWidth() |
|
javax.swing.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(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
|
void |
setShader(Shader shader) |
Sets the shader to use in indexed (non-RGB) mode.
|
java.lang.String |
toString() |
public static final DensityStyle.Channel RED
public static final DensityStyle.Channel GREEN
public static final DensityStyle.Channel BLUE
public DensityStyle(DensityStyle.Channel channel)
channel
- colour channelpublic 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 valueprotected abstract boolean isRGB()
public javax.swing.Icon getLegendIcon()
Style
getLegendIcon
in interface Style
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.