org.ka2ddo.yaac.gui.osm
Class GuiOsmConstants

java.lang.Object
  extended by org.ka2ddo.yaac.gui.osm.GuiOsmConstants

public class GuiOsmConstants
extends java.lang.Object

This class is a container for various public constants used by other classes in the .osm package.


Nested Class Summary
static class GuiOsmConstants.CheckedTexturePaint
          A class implementing a TexturePaint where the texture is a checked pattern in two colors.
static class GuiOsmConstants.StrokeEnum
          Enumeration identifying different types of stroke styles used for rendering.
 
Field Summary
static java.awt.Stroke DASH_DOT_STROKE
          AWT Stroke for a 1-pixel-wide line of alternating dots and dashes.
static java.awt.Stroke DASHED_STROKE
          AWT Stroke for a dashed (6 pixels long) line 1 pixel wide.
static java.awt.Stroke DOTTED_STROKE
          AWT Stroke for a dotted line 1 pixel wide.
static java.awt.Stroke DW_SOLID_STROKE
          AWT Stroke for a 4-pixel-wide solid line.
static java.awt.Stroke LONG_DOTTED_STROKE
          AWT Stroke for a 1-pixel-wide line with long dots (3 pixels long).
static java.awt.TexturePaint PAINT_GREEN_CHECKED
          A translucent checked pattern in green and white.
static java.awt.TexturePaint PAINT_LIGHT_BLUE_CHECKED
          A translucent checked pattern in light blue and white.
static java.awt.TexturePaint PAINT_PURPLE_CHECKED
          A translucent checked pattern in purple and white.
static java.awt.TexturePaint PAINT_WETLAND_CHECKED
          A pattern (copied from OpenStreetMaps) for indicating a wetland area.
static java.awt.Stroke RAILROAD_STROKE
          The default stroke for drawing a railroad track Way.
static java.awt.Stroke SOLID_STROKE
          AWT Stroke for a solid line 1 pixel wide.
static java.awt.Color TOLL_COLOR
          The Color to use for rendering toll roads, regardless of the color normally configured for the WayType in the WayParams.
static java.awt.Stroke W_SOLID_STROKE
          AWT Stroke for a 2-pixel-wide solid line.
 
Method Summary
static java.awt.TexturePaint createCheckedTexture(java.awt.Color color1, java.awt.Color color2, int grain)
          Create a checked TexturePain object using the specified colors and check size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOLID_STROKE

public static final java.awt.Stroke SOLID_STROKE
AWT Stroke for a solid line 1 pixel wide.


DASHED_STROKE

public static final java.awt.Stroke DASHED_STROKE
AWT Stroke for a dashed (6 pixels long) line 1 pixel wide.


DOTTED_STROKE

public static final java.awt.Stroke DOTTED_STROKE
AWT Stroke for a dotted line 1 pixel wide.


LONG_DOTTED_STROKE

public static final java.awt.Stroke LONG_DOTTED_STROKE
AWT Stroke for a 1-pixel-wide line with long dots (3 pixels long).


DASH_DOT_STROKE

public static final java.awt.Stroke DASH_DOT_STROKE
AWT Stroke for a 1-pixel-wide line of alternating dots and dashes.


W_SOLID_STROKE

public static final java.awt.Stroke W_SOLID_STROKE
AWT Stroke for a 2-pixel-wide solid line.


DW_SOLID_STROKE

public static final java.awt.Stroke DW_SOLID_STROKE
AWT Stroke for a 4-pixel-wide solid line.


TOLL_COLOR

public static final java.awt.Color TOLL_COLOR
The Color to use for rendering toll roads, regardless of the color normally configured for the WayType in the WayParams.


PAINT_GREEN_CHECKED

public static final java.awt.TexturePaint PAINT_GREEN_CHECKED
A translucent checked pattern in green and white.


PAINT_LIGHT_BLUE_CHECKED

public static final java.awt.TexturePaint PAINT_LIGHT_BLUE_CHECKED
A translucent checked pattern in light blue and white.


PAINT_PURPLE_CHECKED

public static final java.awt.TexturePaint PAINT_PURPLE_CHECKED
A translucent checked pattern in purple and white.


PAINT_WETLAND_CHECKED

public static final java.awt.TexturePaint PAINT_WETLAND_CHECKED
A pattern (copied from OpenStreetMaps) for indicating a wetland area.


RAILROAD_STROKE

public static final java.awt.Stroke RAILROAD_STROKE
The default stroke for drawing a railroad track Way.

Method Detail

createCheckedTexture

public static java.awt.TexturePaint createCheckedTexture(java.awt.Color color1,
                                                         java.awt.Color color2,
                                                         int grain)
Create a checked TexturePain object using the specified colors and check size.

Parameters:
color1 - first Color of check pattern
color2 - second Color of check pattern
grain - size of check squares in pixels
Returns:
TexturePaint that will draw a checked pattern