org.openstreetmap.josm.gui.mappaint
Class BoxTextElemStyle

java.lang.Object
  extended by org.openstreetmap.josm.gui.mappaint.ElemStyle
      extended by org.openstreetmap.josm.gui.mappaint.BoxTextElemStyle
All Implemented Interfaces:
StyleKeys

public class BoxTextElemStyle
extends ElemStyle

Text style attached to a style with a bounding box, like an icon or a symbol.


Nested Class Summary
static interface BoxTextElemStyle.BoxProvider
           
static class BoxTextElemStyle.BoxProviderResult
           
static class BoxTextElemStyle.HorizontalTextAlignment
           
static class BoxTextElemStyle.SimpleBoxProvider
           
static class BoxTextElemStyle.VerticalTextAlignment
           
 
Field Summary
protected  java.awt.Rectangle box
           
protected  BoxTextElemStyle.BoxProvider boxProvider
           
private static java.awt.Color DEFAULT_TEXT_COLOR
           
 BoxTextElemStyle.HorizontalTextAlignment hAlign
           
static BoxTextElemStyle SIMPLE_NODE_TEXT_ELEMSTYLE
           
 TextElement text
           
 BoxTextElemStyle.VerticalTextAlignment vAlign
           
static java.awt.Rectangle ZERO_BOX
           
 
Fields inherited from class org.openstreetmap.josm.gui.mappaint.ElemStyle
isModifier, major_z_index, object_z_index, z_index
 
Fields inherited from interface org.openstreetmap.josm.gui.mappaint.StyleKeys
COLOR, DASHES, DASHES_BACKGROUND_COLOR, DASHES_BACKGROUND_OPACITY, DASHES_OFFSET, FILL_COLOR, FILL_IMAGE, FILL_OPACITY, ICON_IMAGE, MODIFIER, OBJECT_Z_INDEX, OFFSET, OPACITY, REAL_WIDTH, TEXT, TEXT_POSITION, WIDTH, Z_INDEX
 
Constructor Summary
BoxTextElemStyle(Cascade c, TextElement text, BoxTextElemStyle.BoxProvider boxProvider, java.awt.Rectangle box, BoxTextElemStyle.HorizontalTextAlignment hAlign, BoxTextElemStyle.VerticalTextAlignment vAlign)
           
 
Method Summary
static BoxTextElemStyle create(Environment env, BoxTextElemStyle.BoxProvider boxProvider)
           
static BoxTextElemStyle create(Environment env, BoxTextElemStyle.BoxProvider boxProvider, java.awt.Rectangle box)
           
static BoxTextElemStyle create(Environment env, java.awt.Rectangle box)
           
 boolean equals(java.lang.Object obj)
           
 java.awt.Rectangle getBox()
           
 int hashCode()
           
private static void initDefaultParameters()
           
 void paintPrimitive(OsmPrimitive osm, MapPaintSettings settings, MapPainter painter, boolean selected, boolean member)
          draws a primitive
 java.lang.String toString()
           
 
Methods inherited from class org.openstreetmap.josm.gui.mappaint.ElemStyle
getFont, getWidth, isProperLineStyle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO_BOX

public static final java.awt.Rectangle ZERO_BOX

text

public TextElement text

boxProvider

protected BoxTextElemStyle.BoxProvider boxProvider

box

protected java.awt.Rectangle box

hAlign

public BoxTextElemStyle.HorizontalTextAlignment hAlign

vAlign

public BoxTextElemStyle.VerticalTextAlignment vAlign

SIMPLE_NODE_TEXT_ELEMSTYLE

public static final BoxTextElemStyle SIMPLE_NODE_TEXT_ELEMSTYLE

DEFAULT_TEXT_COLOR

private static java.awt.Color DEFAULT_TEXT_COLOR
Constructor Detail

BoxTextElemStyle

public BoxTextElemStyle(Cascade c,
                        TextElement text,
                        BoxTextElemStyle.BoxProvider boxProvider,
                        java.awt.Rectangle box,
                        BoxTextElemStyle.HorizontalTextAlignment hAlign,
                        BoxTextElemStyle.VerticalTextAlignment vAlign)
Method Detail

create

public static BoxTextElemStyle create(Environment env,
                                      BoxTextElemStyle.BoxProvider boxProvider)

create

public static BoxTextElemStyle create(Environment env,
                                      java.awt.Rectangle box)

create

public static BoxTextElemStyle create(Environment env,
                                      BoxTextElemStyle.BoxProvider boxProvider,
                                      java.awt.Rectangle box)

getBox

public java.awt.Rectangle getBox()

initDefaultParameters

private static void initDefaultParameters()

paintPrimitive

public void paintPrimitive(OsmPrimitive osm,
                           MapPaintSettings settings,
                           MapPainter painter,
                           boolean selected,
                           boolean member)
Description copied from class: ElemStyle
draws a primitive

Specified by:
paintPrimitive in class ElemStyle
selected - true, if primitive is selected
member - true, if primitive is not selected and member of a selected relation

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class ElemStyle

hashCode

public int hashCode()
Overrides:
hashCode in class ElemStyle

toString

public java.lang.String toString()
Overrides:
toString in class ElemStyle


JOSM