ilog.views.maps.label
Class IlvMapLabelStyle

java.lang.Object
  extended by ilog.views.maps.graphic.style.IlvMapStyle
      extended by ilog.views.maps.label.IlvMapLabelStyle
All Implemented Interfaces:
IlvPersistentObject, IlvInheritable

public class IlvMapLabelStyle
extends IlvMapStyle

Class holding main graphic attributes for a label, that is, font, fill color, outline color, outline stroke and whether outline should be drawn.

Since:
JViews 7.5

Field Summary
static String ALLOW_POINT_OVERLAP
          The AllowPointOverlap property name.
static String DRAW_CENTERED
          The drawCentered property name.
static String DRAW_OUTLINE
          The DrawOutline property name.
static String FOLLOW_PATH
          The FollowPath property name.
static String FOREGROUND
          The Foreground property name.
static String LABEL_FONT
          The LabelFont property name.
static String LABEL_STROKE
          The LabelStroke property name.
static String LABELLING_SMALL_AREAS
          The LabellingSmallAreas property name.
static String OUTLINE_COLOR
          The OutlineColor property name.
static String STROKE_WIDTH
          The StrokeWidth property name.
 
Fields inherited from class ilog.views.maps.graphic.style.IlvMapStyle
ALPHA, ALWAYS_ON_TOP, ATTRIBUTE_INFO, CATEGORY, LABEL_ATTRIBUTE, LEGEND_GROUP, PARENT, THIN_CLIENT_BACKGROUND, VISIBLE_IN_3DVIEW, VISIBLE_IN_OVERVIEW, VISIBLE_IN_TREE, VISIBLE_IN_VIEW
 
Constructor Summary
IlvMapLabelStyle()
          Constructs a IlvMapLabelStyle
IlvMapLabelStyle(IlvInputStream stream)
          Reads a IlvMapLabelStyle from an IlvInputStream
IlvMapLabelStyle(IlvMapLabelStyle source)
          Constructor by copy
 
Method Summary
 IlvMapStyle copy()
          Creates a copy of the style.
 Color getForeground()
          Returns the fill color of the label.
 Font getLabelFont()
          Returns the text font of the label.
 Stroke getLabelStroke()
          Returns the outline stroke of the label.
 Color getOutlineColor()
          Returns the outline color of the label.
 float getStrokeWidth()
          Returns the line width of the label stroke.
 boolean isAllowPointOverlap()
          Tests if the labels are allowed to overlap points.
 boolean isDrawCentered()
          Tells whether labels should be displayed in the polygon center, even if polygon is not filled.
 boolean isDrawOutline()
          Returns whether the outline should be drawn.
 boolean isFollowPath()
          Tells whether the labels should follow polylines.
 boolean isLabellingSmallAreas()
          Tells whether small areas should be labeled, even if label is bigger than area.
 void setAllowPointOverlap(boolean b)
          Sets the overlap policy for labels and points.
 void setDrawCentered(boolean drawCentered)
          Sets whether labels should be displayed in the polygon center, even if polygon is not filled.
 void setDrawOutline(boolean drawOutline)
          Sets whether the outline should be drawn.
 void setFollowPath(boolean labelSmallAreas)
          Sets whether the labels should follow polylines.
 void setForeground(Color fillColor)
          Sets the fill color of the label.
 void setLabelFont(Font labelFont)
          Sets the text font of the label.
 void setLabellingSmallAreas(boolean labelSmallAreas)
          Sets whether small areas should be labeled, even if label is bigger than area.
 void setLabelStroke(Stroke labelStroke)
          Returns the stroke of the label.
 void setOutlineColor(Color outlineColor)
          Sets the outline color of the label.
 void setStrokeWidth(float f)
          Sets the line width of the label stroke.
 void write(IlvOutputStream stream)
          Write a IlvMapLabelStyle into an IlvOutputStream.
 
Methods inherited from class ilog.views.maps.graphic.style.IlvMapStyle
addAttributeListener, addChild, addStyleListener, addWeakStyleListener, equals, getAlpha, getAttribute, getAttribute, getAttributeFilter, getAttributeInfo, getAttributeListeners, getCategory, getChildren, getDefaultValues, getGraphic, getLabelAttribute, getLegendGroup, getListeners, getParent, getStyleListeners, hashCode, isAlwaysOnTop, isInherited, isThinClientBackground, isVisibleIn3DView, isVisibleInOverview, isVisibleInTree, isVisibleInView, objectEquals, removeAttributeListener, removeChild, removeStyleListener, setAlpha, setAlwaysOnTop, setAttribute, setAttributeFilter, setAttributeInfo, setCategory, setGraphic, setInherited, setLabelAttribute, setLegendGroup, setParent, setThinClientBackground, setVisibleIn3DView, setVisibleInOverview, setVisibleInTree, setVisibleInView
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FOREGROUND

public static final String FOREGROUND
The Foreground property name.

See Also:
Constant Field Values

LABEL_FONT

public static final String LABEL_FONT
The LabelFont property name.

See Also:
Constant Field Values

LABEL_STROKE

public static final String LABEL_STROKE
The LabelStroke property name.

See Also:
Constant Field Values

OUTLINE_COLOR

public static final String OUTLINE_COLOR
The OutlineColor property name.

See Also:
Constant Field Values

DRAW_OUTLINE

public static final String DRAW_OUTLINE
The DrawOutline property name.

See Also:
Constant Field Values

LABELLING_SMALL_AREAS

public static final String LABELLING_SMALL_AREAS
The LabellingSmallAreas property name.

See Also:
Constant Field Values

DRAW_CENTERED

public static final String DRAW_CENTERED
The drawCentered property name.

Since:
JViews 7.5
See Also:
Constant Field Values

FOLLOW_PATH

public static final String FOLLOW_PATH
The FollowPath property name.

See Also:
Constant Field Values

STROKE_WIDTH

public static final String STROKE_WIDTH
The StrokeWidth property name.

Since:
JViews 8.0
See Also:
Constant Field Values

ALLOW_POINT_OVERLAP

public static final String ALLOW_POINT_OVERLAP
The AllowPointOverlap property name.

Since:
JViews 8.1
See Also:
Constant Field Values
Constructor Detail

IlvMapLabelStyle

public IlvMapLabelStyle()
Constructs a IlvMapLabelStyle


IlvMapLabelStyle

public IlvMapLabelStyle(IlvInputStream stream)
                 throws IlvReadFileException
Reads a IlvMapLabelStyle from an IlvInputStream

Parameters:
stream - The stream to read from.
Throws:
IlvReadFileException

IlvMapLabelStyle

public IlvMapLabelStyle(IlvMapLabelStyle source)
Constructor by copy

Parameters:
source - source style to copy
Method Detail

copy

public IlvMapStyle copy()
Creates a copy of the style.

Overrides:
copy in class IlvMapStyle
Returns:
a new IlvMapLabelStyle

write

public void write(IlvOutputStream stream)
           throws IOException
Write a IlvMapLabelStyle into an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvMapStyle
Parameters:
stream - The stream to write to.
Throws:
IOException

getLabelFont

public Font getLabelFont()
Returns the text font of the label.

Returns:
The text font.

setLabelFont

public void setLabelFont(Font labelFont)
Sets the text font of the label.

Parameters:
labelFont - The text font.

getForeground

public Color getForeground()
Returns the fill color of the label.

Returns:
The fill color.

setForeground

public void setForeground(Color fillColor)
Sets the fill color of the label.

Parameters:
fillColor - The fill color.

getOutlineColor

public Color getOutlineColor()
Returns the outline color of the label.

Returns:
The outline color.

setOutlineColor

public void setOutlineColor(Color outlineColor)
Sets the outline color of the label.

Parameters:
outlineColor - The outline color.

getLabelStroke

public Stroke getLabelStroke()
Returns the outline stroke of the label.

Returns:
The outline stroke.

setLabelStroke

public void setLabelStroke(Stroke labelStroke)
Returns the stroke of the label.

Parameters:
labelStroke - The label stroke.

isDrawOutline

public boolean isDrawOutline()
Returns whether the outline should be drawn.

Returns:
true if the outline should be drawn false otherwise.

setDrawOutline

public void setDrawOutline(boolean drawOutline)
Sets whether the outline should be drawn.

Parameters:
drawOutline - true if the outline should be drawn false otherwise.

setLabellingSmallAreas

public void setLabellingSmallAreas(boolean labelSmallAreas)
Sets whether small areas should be labeled, even if label is bigger than area.

Parameters:
labelSmallAreas - true if the small areas should be labeled, false otherwise.

isDrawCentered

public boolean isDrawCentered()
Tells whether labels should be displayed in the polygon center, even if polygon is not filled.

Returns:
true labels should be displayed in the polygon center, false otherwise.
Since:
JViews 7.5

setDrawCentered

public void setDrawCentered(boolean drawCentered)
Sets whether labels should be displayed in the polygon center, even if polygon is not filled.

Parameters:
drawCentered - true if labels should be displayed in the polygon center, false otherwise.
Since:
JViews 7.5

isLabellingSmallAreas

public boolean isLabellingSmallAreas()
Tells whether small areas should be labeled, even if label is bigger than area.

Returns:
true if the small areas should be labeled, false otherwise.

setFollowPath

public void setFollowPath(boolean labelSmallAreas)
Sets whether the labels should follow polylines.

Parameters:
labelSmallAreas - true if the the labels should follow polylines, false otherwise.

isFollowPath

public boolean isFollowPath()
Tells whether the labels should follow polylines.

Returns:
true if the the labels should follow polylines, false otherwise.

setStrokeWidth

public void setStrokeWidth(float f)
Sets the line width of the label stroke.

Parameters:
f - new line width
Since:
JViews 8.0
See Also:
setLabelStroke(Stroke)

getStrokeWidth

public float getStrokeWidth()
Returns the line width of the label stroke.

Returns:
Returns the line width of the label stroke.
Since:
JViews 8.0

setAllowPointOverlap

public void setAllowPointOverlap(boolean b)
Sets the overlap policy for labels and points.

Parameters:
b - Set to true to allow overlap, set to false to avoid overlap.
Since:
JViews 8.1

isAllowPointOverlap

public boolean isAllowPointOverlap()
Tests if the labels are allowed to overlap points.

Returns:
If the labels can overlap points, true is returned.
Since:
JViews 8.1


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.