Package org.ka2ddo.yaac.gui.osm
Class GuiOsmConstants
java.lang.Object
org.ka2ddo.yaac.gui.osm.GuiOsmConstants
This class is a container for various public constants used by other classes
in the .osm package.
- Author:
- Andrew Pavlin, KA2DDO
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A class implementing a TexturePaint where the texture is a checked pattern in two colors.static class
A TexturePaint object with an associated file path where the image was loaded from.static enum
Enumeration identifying different types of stroke styles used for rendering. -
Field Summary
Modifier and TypeFieldDescriptionstatic final BasicStroke
AWT Stroke for a 1-pixel-wide line of alternating dots and dashes.static final BasicStroke
AWT Stroke for a dashed (6 pixels long) line 1 pixel wide.static final BasicStroke
AWT Stroke for a dotted line 1 pixel wide.static final BasicStroke
AWT Stroke for a 4-pixel-wide solid line.static final BasicStroke
AWT Stroke for a 1-pixel-wide line with long dots (3 pixels long).static final TexturePaint
A translucent checked pattern in green and white.static final TexturePaint
A translucent checked pattern in grey and white.static final TexturePaint
A translucent checked pattern in light blue and white.Map to convert ColorType enums into renderable Paints.static final TexturePaint
A translucent checked pattern in purple and white.static final TexturePaint
A pattern (copied from OpenStreetMaps) for indicating a wetland area.static final BasicStroke
AWT Stroke for a 8-pixel-wide solid line.static final Stroke
The default stroke for drawing a railroad track Way.static final BasicStroke
AWT Stroke for a solid line 1 pixel wide.static final Map<OsmLineType,
Stroke> Map to convert OsmLineType enums to renderable Strokes.static final Color
The Color to use for rendering toll roads, regardless of the color normally configured for the WayType in the WayParams.static final Color
The Color for complete transparency.static final BasicStroke
AWT Stroke for a 2-pixel-wide solid line. -
Method Summary
Modifier and TypeMethodDescriptionstatic TexturePaint
createCheckedTexture
(Color color1, Color color2, int grain) Create a checked TexturePaint object using the specified colors and check size.static TexturePaint
createStripedTexture
(Color color1, Color color2) Create a diagonally striped TexturePaint.
-
Field Details
-
SOLID_STROKE
AWT Stroke for a solid line 1 pixel wide. -
DASHED_STROKE
AWT Stroke for a dashed (6 pixels long) line 1 pixel wide. -
DOTTED_STROKE
AWT Stroke for a dotted line 1 pixel wide. -
LONG_DOTTED_STROKE
AWT Stroke for a 1-pixel-wide line with long dots (3 pixels long). -
DASH_DOT_STROKE
AWT Stroke for a 1-pixel-wide line of alternating dots and dashes. -
W_SOLID_STROKE
AWT Stroke for a 2-pixel-wide solid line. -
DW_SOLID_STROKE
AWT Stroke for a 4-pixel-wide solid line. -
QW_SOLID_STROKE
AWT Stroke for a 8-pixel-wide solid line. -
RAILROAD_STROKE
The default stroke for drawing a railroad track Way. -
STROKE_MAP
Map to convert OsmLineType enums to renderable Strokes. -
TOLL_COLOR
The Color to use for rendering toll roads, regardless of the color normally configured for the WayType in the WayParams. -
TRANSPARENT
The Color for complete transparency. -
PAINT_GREEN_CHECKED
A translucent checked pattern in green and white. -
PAINT_LIGHT_BLUE_CHECKED
A translucent checked pattern in light blue and white. -
PAINT_PURPLE_CHECKED
A translucent checked pattern in purple and white. -
PAINT_GREY_CHECKED
A translucent checked pattern in grey and white. -
PAINT_WETLAND_CHECKED
A pattern (copied from OpenStreetMaps) for indicating a wetland area. -
PAINT_MAP
Map to convert ColorType enums into renderable Paints.
-
-
Method Details
-
createCheckedTexture
Create a checked TexturePaint object using the specified colors and check size.- Parameters:
color1
- first Color of check patterncolor2
- second Color of check patterngrain
- size of check squares in pixels- Returns:
- TexturePaint that will draw a checked pattern
-
createStripedTexture
Create a diagonally striped TexturePaint.- Parameters:
color1
- Color of the thin stripescolor2
- Color of the background- Returns:
- TexturePaint of the striped pattern
-