com.vividsolutions.jump.workbench.ui.renderer.style
Class LabelStyle

java.lang.Object
  extended by com.vividsolutions.jump.workbench.ui.renderer.style.LabelStyle
All Implemented Interfaces:
Style, java.lang.Cloneable

public class LabelStyle
extends java.lang.Object
implements Style


Field Summary
static java.lang.String ABOVE_LINE
           
static java.lang.String BELOW_LINE
           
static java.lang.String FID_COLUMN
           
static int FONT_BASE_SIZE
           
static java.lang.String ON_LINE
           
 java.lang.String verticalAlignment
           
 
Constructor Summary
LabelStyle()
           
 
Method Summary
static double angle(Feature feature, java.lang.String angleAttributeName, double defaultAngle)
           
 java.lang.Object clone()
           
 java.lang.String getAngleAttribute()
           
 java.lang.String getAttribute()
           
 java.awt.Color getColor()
           
 java.awt.Font getFont()
           
 double getHeight()
           
 java.lang.String getHeightAttribute()
           
 java.lang.String getVerticalAlignment()
           
static double height(Feature feature, java.lang.String heightAttributeName, double defaultHeight)
           
 void initialize(Layer layer)
          Called before #paint is applied to each Feature.
 boolean isEnabled()
           
 boolean isHidingOverlappingLabels()
           
 boolean isScaling()
           
 void paint(Feature f, java.awt.Graphics2D g, Viewport viewport)
           
 void paint(java.awt.Graphics2D g, java.lang.String text, double viewportScale, java.awt.geom.Point2D viewCentre, double angle, double height, boolean linear)
           
 void setAngleAttribute(java.lang.String angleAttribute)
           
 void setAttribute(java.lang.String attribute)
           
 void setColor(java.awt.Color color)
           
 void setEnabled(boolean enabled)
           
 void setFont(java.awt.Font font)
           
 void setHeight(double height)
           
 void setHeightAttribute(java.lang.String heightAttribute)
           
 void setHidingOverlappingLabels(boolean hidingOverlappingLabels)
           
 void setScaling(boolean scaling)
           
 void setVerticalAlignment(java.lang.String verticalAlignment)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FONT_BASE_SIZE

public static final int FONT_BASE_SIZE
See Also:
Constant Field Values

ABOVE_LINE

public static final java.lang.String ABOVE_LINE
See Also:
Constant Field Values

ON_LINE

public static final java.lang.String ON_LINE
See Also:
Constant Field Values

BELOW_LINE

public static final java.lang.String BELOW_LINE
See Also:
Constant Field Values

FID_COLUMN

public static final java.lang.String FID_COLUMN
See Also:
Constant Field Values

verticalAlignment

public java.lang.String verticalAlignment
Constructor Detail

LabelStyle

public LabelStyle()
Method Detail

initialize

public void initialize(Layer layer)
Description copied from interface: Style
Called before #paint is applied to each Feature.

Specified by:
initialize in interface Style

paint

public void paint(Feature f,
                  java.awt.Graphics2D g,
                  Viewport viewport)
           throws java.awt.geom.NoninvertibleTransformException
Specified by:
paint in interface Style
Throws:
java.awt.geom.NoninvertibleTransformException

angle

public static double angle(Feature feature,
                           java.lang.String angleAttributeName,
                           double defaultAngle)

height

public static double height(Feature feature,
                            java.lang.String heightAttributeName,
                            double defaultHeight)

paint

public void paint(java.awt.Graphics2D g,
                  java.lang.String text,
                  double viewportScale,
                  java.awt.geom.Point2D viewCentre,
                  double angle,
                  double height,
                  boolean linear)

getAttribute

public java.lang.String getAttribute()

getAngleAttribute

public java.lang.String getAngleAttribute()

getHeightAttribute

public java.lang.String getHeightAttribute()

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface Style

getColor

public java.awt.Color getColor()

getFont

public java.awt.Font getFont()

isScaling

public boolean isScaling()

getHeight

public double getHeight()

isHidingOverlappingLabels

public boolean isHidingOverlappingLabels()

getVerticalAlignment

public java.lang.String getVerticalAlignment()

setVerticalAlignment

public void setVerticalAlignment(java.lang.String verticalAlignment)

setAttribute

public void setAttribute(java.lang.String attribute)

setAngleAttribute

public void setAngleAttribute(java.lang.String angleAttribute)

setHeightAttribute

public void setHeightAttribute(java.lang.String heightAttribute)

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface Style

setColor

public void setColor(java.awt.Color color)

setFont

public void setFont(java.awt.Font font)

setScaling

public void setScaling(boolean scaling)

setHeight

public void setHeight(double height)

setHidingOverlappingLabels

public void setHidingOverlappingLabels(boolean hidingOverlappingLabels)

clone

public java.lang.Object clone()
Specified by:
clone in interface Style
Overrides:
clone in class java.lang.Object