public class DefaultGrfMarker extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CIRCLE
Use a circle marker.
|
static int |
CROSS
Use a cross marker.
|
static int |
DIAMOND
Use a diamond marker.
|
static int |
DOT
Use a dot marker.
|
static int |
DOWNTRIANGLE
Use a pointing down triangle marker.
|
static int |
FILLEDCIRCLE
Use a filled circle marker.
|
static int |
FILLEDDIAMOND
Use a filled diamond marker.
|
static int |
FILLEDDOWNTRIANGLE
Use a filled pointing down triangle marker.
|
static int |
FILLEDSQUARE
Use a filled square marker.
|
static int |
FILLEDUPTRIANGLE
Use a filled pointing up triangle marker.
|
static int |
PLUS
Use a plus marker.
|
static int |
SQUARE
Use a square marker.
|
static int |
STAR
Use a star marker.
|
static int |
UPTRIANGLE
Use a pointing up triangle marker.
|
Constructor and Description |
---|
DefaultGrfMarker() |
Modifier and Type | Method and Description |
---|---|
static void |
draw(Graphics2D g2,
int type,
double x,
double y,
double size)
Draw a marker at a given position.
|
protected static void |
drawCircle(Graphics2D g2,
double x,
double y,
double size,
boolean filled)
Draw a circle.
|
protected static void |
drawCross(Graphics2D g2,
double x,
double y,
double size)
Draw a cross.
|
protected static void |
drawDiamond(Graphics2D g2,
double x,
double y,
double size,
boolean filled)
Draw a diamond.
|
protected static void |
drawDot(Graphics2D g2,
double x,
double y,
double size)
Draw a dot, should be a point really, but is a filled square of size 1.
|
protected static void |
drawPlus(Graphics2D g2,
double x,
double y,
double size)
Draw a plus.
|
protected static void |
drawSquare(Graphics2D g2,
double x,
double y,
double size,
boolean filled)
Draw a square.
|
protected static void |
drawStar(Graphics2D g2,
double x,
double y,
double size)
Draw a star (cross+plus).
|
protected static void |
drawTriangle(Graphics2D g2,
double x,
double y,
double size,
boolean up,
boolean filled)
Draw an equilateral triangle
|
static String |
getDescription(int type)
Get a user presentable description of a marker.
|
static int |
getNumMarkers()
Return the number of markers.
|
public static final int DOT
public static final int CROSS
public static final int PLUS
public static final int SQUARE
public static final int STAR
public static final int CIRCLE
public static final int DIAMOND
public static final int UPTRIANGLE
public static final int DOWNTRIANGLE
public static final int FILLEDSQUARE
public static final int FILLEDCIRCLE
public static final int FILLEDDIAMOND
public static final int FILLEDUPTRIANGLE
public static final int FILLEDDOWNTRIANGLE
public static void draw(Graphics2D g2, int type, double x, double y, double size)
g2
- the Graphics2D to draw ontotype
- the type of marker to draw. Must be one of the
defined constants, CIRCLE, SQUARE etc.x
- the X centre of the marker (graphics coordinates)y
- the Y centre of the marker (graphics coordinates)size
- the size of the marker (graphics coordinates)public static String getDescription(int type)
type
- the type of marker (POINT etc.).public static int getNumMarkers()
protected static void drawDot(Graphics2D g2, double x, double y, double size)
protected static void drawCross(Graphics2D g2, double x, double y, double size)
protected static void drawPlus(Graphics2D g2, double x, double y, double size)
protected static void drawSquare(Graphics2D g2, double x, double y, double size, boolean filled)
protected static void drawStar(Graphics2D g2, double x, double y, double size)
protected static void drawCircle(Graphics2D g2, double x, double y, double size, boolean filled)
protected static void drawDiamond(Graphics2D g2, double x, double y, double size, boolean filled)
protected static void drawTriangle(Graphics2D g2, double x, double y, double size, boolean up, boolean filled)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.