public abstract class ShapeMode extends Object implements ModePlotter.Mode
Modifier and Type | Class and Description |
---|---|
static class |
ShapeMode.AutoTransparentStamper
Stamper implementation for auto transparency.
|
static class |
ShapeMode.DensityStamper
Stamper implementation for density mode.
|
static class |
ShapeMode.FlatStamper
Stamper implementation for flat colouring.
|
static class |
ShapeMode.ShadeStamper
Stamper implementation for use with AuxShadingMode.
|
static class |
ShapeMode.WeightStamper
Stamper implementation for use with WeightedShadingMode.
|
Modifier and Type | Field and Description |
---|---|
static ShapeMode |
AUTO
Auto density mode, no user settings.
|
static ShapeMode |
AUX
Aux variable colouring mode with global colour map.
|
static ShapeMode |
AUX_PRIVATE |
static ShapeMode |
DENSITY
Configurable density mode.
|
static ShapeMode |
FLAT2D
Simple flat mode for use with 2D plots.
|
static ShapeMode |
FLAT3D
Simple flat mode for use with 3D plots.
|
static ShapeMode |
IRGB
Flat RGB mode.
|
static ShapeMode[] |
MODES_2D
List of modes suitable for use with 2D plotting.
|
static ShapeMode[] |
MODES_3D
List of modes suitable for use with 3D plotting.
|
static ReportKey<Double> |
REPKEY_SKYPIX
Report key for nominal pixel size in square degrees.
|
static ReportKey<Double> |
REPKEY_XPIX
Report key for pixel X dimension in data coordinates.
|
static ReportKey<Double> |
REPKEY_YPIX
Report key for pixel Y dimension in data coordinates.
|
static ShapeMode |
TRANSLUCENT
Transparency with automatic adjustment of opacity level.
|
static ShapeMode |
TRANSPARENT2D
Transparency with explicit opacity setting, suitable for 2D plots.
|
static ShapeMode |
TRANSPARENT3D
Transparency with explicit opacity setting, suitable for 3D plots.
|
static ShapeMode |
WEIGHTED
Weighted density mode with global colour map.
|
static ShapeMode |
WEIGHTED_PRIVATE |
Constructor and Description |
---|
ShapeMode(String name,
Icon icon,
Coord[] extraCoords,
boolean hasReports)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static Icon |
createColoredIcon(Icon base,
Shader shader,
float value)
Returns a wrapped icon whose painting is done in the context of
a forground colour got by applying a given shader and shading value.
|
abstract PlotLayer |
createLayer(ShapePlotter plotter,
ShapeForm form,
DataGeom geom,
DataSpec dataSpec,
Outliner outliner,
Stamper stamper)
Creates a plot layer.
|
abstract Stamper |
createStamper(ConfigMap config)
Returns an object which will do the work of colouring in shapes
when supplied with the appropriate style information and data.
|
abstract ConfigKey<?>[] |
getConfigKeys()
Returns style configuration keys associated with this mode.
|
Coord[] |
getExtraCoords()
Returns the additional coordinates associated with this mode.
|
abstract String |
getModeDescription()
Returns a description of this mode as an XML string.
|
Icon |
getModeIcon()
Returns an icon to identify this mode in the GUI.
|
String |
getModeName()
Returns the user-directed name for this mode.
|
boolean |
hasReports()
Indicates whether the drawing produced by this mode willl return
general interest report information to upstream plotting code.
|
static String |
modeRef(ShapeMode mode)
Returns an XML reference to the given mode.
|
public static final ShapeMode AUTO
public static final ShapeMode FLAT2D
public static final ShapeMode FLAT3D
public static final ShapeMode TRANSLUCENT
public static final ShapeMode TRANSPARENT2D
public static final ShapeMode TRANSPARENT3D
public static final ShapeMode DENSITY
public static final ShapeMode AUX
public static final ShapeMode WEIGHTED
public static final ShapeMode AUX_PRIVATE
public static final ShapeMode WEIGHTED_PRIVATE
public static final ShapeMode IRGB
public static final ShapeMode[] MODES_2D
public static final ShapeMode[] MODES_3D
public static final ReportKey<Double> REPKEY_XPIX
public static final ReportKey<Double> REPKEY_YPIX
public ShapeMode(String name, Icon icon, Coord[] extraCoords, boolean hasReports)
name
- mode nameicon
- mode iconextraCoords
- data coordinates associated with this mode
(not positional ones)hasReports
- whether plot reports containing genera-interest
plot information are generatedpublic String getModeName()
ModePlotter.Mode
getModeName
in interface ModePlotter.Mode
public Icon getModeIcon()
ModePlotter.Mode
getModeIcon
in interface ModePlotter.Mode
public boolean hasReports()
public abstract String getModeDescription()
public Coord[] getExtraCoords()
public abstract ConfigKey<?>[] getConfigKeys()
createStamper(uk.ac.starlink.ttools.plot2.config.ConfigMap)
.public abstract Stamper createStamper(ConfigMap config)
getConfigKeys()
.config
- configuration map from which values for this mode's
config keys will be extractedpublic abstract PlotLayer createLayer(ShapePlotter plotter, ShapeForm form, DataGeom geom, DataSpec dataSpec, Outliner outliner, Stamper stamper)
plotter
- plotterform
- shape formgeom
- data coordinate specificationdataSpec
- data specificationoutliner
- shape outlinerstamper
- shape stamperpublic static Icon createColoredIcon(Icon base, Shader shader, float value)
base
- base iconshader
- colour shadervalue
- value in range 0-1 at which shader should be appliedCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.