Class MarkerShape
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.layer.MarkerShape
-
public abstract class MarkerShape extends java.lang.ObjectDefines the abstract shape of a MarkerStyle. Instances of this class are factories which can produce a family of MarkerStyle objects with a shape which is in some sense the same, but of various sizes and colours.- Since:
- 8 Sep 2021
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description static MarkerShapeCROSSFactory for cross-hair markers.static MarkerShapeCROXXFactory for X-shaped markers.static MarkerShapeFILLED_CIRCLEFactory for filled circle markers.static MarkerShapeFILLED_DIAMONDFactory for open diamond shaped markers.static MarkerShapeFILLED_SQUAREFactory for filled square markers.static MarkerShapeFILLED_TRIANGLE_DOWNFactory for filled triangle shaped markers with point at the bottom.static MarkerShapeFILLED_TRIANGLE_UPFactory for filled triangle shaped markers with point at the top.static MarkerShapeOPEN_CIRCLEFactory for open circle markers.static MarkerShapeOPEN_DIAMONDFactory for open diamond shaped markers.static MarkerShapeOPEN_SQUAREFactory for open square markers.static MarkerShapeOPEN_TRIANGLE_DOWNFactory for open triangle shaped markers with point at the bottom.static MarkerShapeOPEN_TRIANGLE_UPFactory for open triangle shaped markers with point at the top.static java.awt.RenderingHints.KeyOUTLINE_CIRCLE_HINTRendering hint concerning whether to draw outlines on filled circles.static MarkerShapePOINTFactory for point-like markers.
-
Constructor Summary
Constructors Modifier Constructor Description protectedMarkerShape(java.lang.String name)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract MarkerStylegetStyle(java.awt.Color color, int size)Factory method which produces a MarkerStyle of the shape characteristic of this object with specified colour and nominal size.java.lang.StringtoString()
-
-
-
Field Detail
-
OUTLINE_CIRCLE_HINT
public static java.awt.RenderingHints.Key OUTLINE_CIRCLE_HINT
Rendering hint concerning whether to draw outlines on filled circles. In bitmap contexts, such circles typically look ugly if outlines are not drawn. However, in some contexts (vector graphics, especially of transparent markers) it is a bad idea. If this hint is set to Boolean.TRUE outlines will be drawn, and if it is set to Boolean.FALSE, they will not. If it is not set, the default policy will be followed, which currently means they *will* be drawn (this represents the historical behaviour).
-
POINT
public static final MarkerShape POINT
Factory for point-like markers. The size parameter is ignored.
-
OPEN_CIRCLE
public static final MarkerShape OPEN_CIRCLE
Factory for open circle markers.
-
FILLED_CIRCLE
public static final MarkerShape FILLED_CIRCLE
Factory for filled circle markers.
-
OPEN_SQUARE
public static final MarkerShape OPEN_SQUARE
Factory for open square markers.
-
FILLED_SQUARE
public static final MarkerShape FILLED_SQUARE
Factory for filled square markers.
-
CROSS
public static final MarkerShape CROSS
Factory for cross-hair markers.
-
CROXX
public static final MarkerShape CROXX
Factory for X-shaped markers.
-
OPEN_DIAMOND
public static final MarkerShape OPEN_DIAMOND
Factory for open diamond shaped markers.
-
FILLED_DIAMOND
public static final MarkerShape FILLED_DIAMOND
Factory for open diamond shaped markers.
-
OPEN_TRIANGLE_UP
public static final MarkerShape OPEN_TRIANGLE_UP
Factory for open triangle shaped markers with point at the top.
-
OPEN_TRIANGLE_DOWN
public static final MarkerShape OPEN_TRIANGLE_DOWN
Factory for open triangle shaped markers with point at the bottom.
-
FILLED_TRIANGLE_UP
public static final MarkerShape FILLED_TRIANGLE_UP
Factory for filled triangle shaped markers with point at the top.
-
FILLED_TRIANGLE_DOWN
public static final MarkerShape FILLED_TRIANGLE_DOWN
Factory for filled triangle shaped markers with point at the bottom.
-
-
Method Detail
-
getStyle
public abstract MarkerStyle getStyle(java.awt.Color color, int size)
Factory method which produces a MarkerStyle of the shape characteristic of this object with specified colour and nominal size.- Parameters:
color- colour of stylesize- nominal size of style - any non-negative integer should give a reasonable image
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-