ilog.views.maps.rendering
Class IlvMapLineRenderingStyle

java.lang.Object
  extended by ilog.views.maps.rendering.IlvMapRenderingStyle
      extended by ilog.views.maps.rendering.IlvMapLineRenderingStyle
All Implemented Interfaces:
IlvPersistentObject

public class IlvMapLineRenderingStyle
extends IlvMapRenderingStyle

This rendering style stores style parameters to draw lines.

Since:
JViews 3.5

Constructor Summary
IlvMapLineRenderingStyle()
          Initializes an instance of the renderer.
IlvMapLineRenderingStyle(IlvInputStream stream)
          Reads the object from an IlvInputStream.
 
Method Summary
 int getEndCap()
          Retrieves the end cap style.
 Color getForeground()
          Retrieves the foreground color.
 int getLineJoin()
          Retrieves the line join style.
 float[] getLineStyle()
          Returns the array representing the lengths of the dash segments.
 float getLineWidth()
          Retrieves the line width.
 Paint getPaint()
          Retrieves the Paint used to draw the lines.
 IlvPathDecoration getPathDecoration()
          Retrieves the IlvPathDecoration used to draw the lines.
 float getScale()
          Returns the scale at which the line width is specified.
 float[] getScaledLineStyle(IlvCoordinateSystem sourceCS, IlvCoordinateSystem targetCS)
          Returns the line style in the manager coordinate system so that the actual style is observed for the specified scale.
 float getScaledLineWidth(IlvCoordinateSystem sourceCS, IlvCoordinateSystem targetCS)
          Returns the line width in the manager coordinate system so that the actual line width is observed for the scale specified in this rendering style.
 Stroke getStroke()
          Returns the Stroke used to draw the lines.
 boolean isDecorationOnly()
          Tells if the object should draw only its decoration.
 boolean isLineWidthZoomed()
          Returns true if the line width of this rendering style is zoomed when the object is zoomed.
 boolean isPaintAbsolute()
          Returns false, the TexturePaint or GradientPaint will be adapted to the bounding rectangle of objects.
 boolean isPaintZoomed()
          Returns true if the texture or gradient will be zoomed according to the shape when the object is zoomed.
 void setDecorationOnly(boolean decorationOnly)
          Sets if the object should only draw its decorations.
 void setEndCap(int endCap)
          Sets the end cap style.
 void setForeground(Color color)
          Sets the foreground color.
 void setLineJoin(int lineJoin)
          Sets the line join style.
 void setLineStyle(float[] lineStyle)
          Sets the array representing the lengths of the dash segments of polylines generated by this renderer.
 void setLineWidth(float lineWidth)
          Sets the line width.
 void setLineWidthZoomed(boolean set)
          When set to true, the line width of this rendering style is zoomed when the object is zoomed.
 void setPaint(Paint paint)
          Sets the Paint used to draw the lines
 void setPaintAbsolute(boolean set)
          When set to false, the TexturePaint or GradientPaint will be adapted to the bounding rectangle of the object.
 void setPaintZoomed(boolean set)
          When set to true, the texture or gradient will be zoomed according to the shape when the object is zoomed.
 void setPathDecoration(IlvPathDecoration decoration)
          Sets the IlvPathDecoration used to draw the lines.
 void setScale(float scale)
          Sets the scale at which the line width is specified.
 void setStroke(Stroke stroke)
          Sets the Stroke used to draw the lines.
 void write(IlvOutputStream stream)
          Writes the object in a IlvOutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvMapLineRenderingStyle

public IlvMapLineRenderingStyle()
Initializes an instance of the renderer.


IlvMapLineRenderingStyle

public IlvMapLineRenderingStyle(IlvInputStream stream)
                         throws IlvReadFileException
Reads the object from an IlvInputStream.

Throws:
IlvReadFileException
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the object in a IlvOutputStream.

Parameters:
stream - the output stream
Throws:
IOException - thrown when an exception occurs during the write operation for this object.

setStroke

public void setStroke(Stroke stroke)
Sets the Stroke used to draw the lines. When a stroke is set, the line width stored in this rendering style is not used anymore.

Since:
JViews 5.0

getStroke

public Stroke getStroke()
Returns the Stroke used to draw the lines.

Since:
JViews 5.0

setPaint

public void setPaint(Paint paint)
Sets the Paint used to draw the lines


getPaint

public Paint getPaint()
Retrieves the Paint used to draw the lines.


setPathDecoration

public void setPathDecoration(IlvPathDecoration decoration)
Sets the IlvPathDecoration used to draw the lines.

Since:
JViews 5.0

isDecorationOnly

public boolean isDecorationOnly()
Tells if the object should draw only its decoration.

Since:
JViews 7.5

setDecorationOnly

public void setDecorationOnly(boolean decorationOnly)
Sets if the object should only draw its decorations.

Since:
JViews 7.5

getPathDecoration

public IlvPathDecoration getPathDecoration()
Retrieves the IlvPathDecoration used to draw the lines.

Since:
JViews 5.0

isLineWidthZoomed

public boolean isLineWidthZoomed()
Returns true if the line width of this rendering style is zoomed when the object is zoomed. If the line width is zoomed, it it scales according to the current map scale. The default value is true.

See Also:
getScaledLineWidth(ilog.views.maps.srs.coordsys.IlvCoordinateSystem, ilog.views.maps.srs.coordsys.IlvCoordinateSystem), getScale(), setScale(float)

setLineWidthZoomed

public void setLineWidthZoomed(boolean set)
When set to true, the line width of this rendering style is zoomed when the object is zoomed. If the line width is zoomed, it it scales according to the current map scale.

See Also:
getScaledLineWidth(ilog.views.maps.srs.coordsys.IlvCoordinateSystem, ilog.views.maps.srs.coordsys.IlvCoordinateSystem), getScale(), setScale(float)

isPaintZoomed

public boolean isPaintZoomed()
Returns true if the texture or gradient will be zoomed according to the shape when the object is zoomed. The default value is false.
This functionality is only valid if the renderer using this rendering style produces an IlvGeneralPath.

See Also:
IlvGeneralPath.isPaintZoomed(), IlvDefaultCurveRenderer.isUsingGeneralPath(), IlvDefaultCurveRenderer.setUsingGeneralPath(boolean)

setPaintZoomed

public void setPaintZoomed(boolean set)
When set to true, the texture or gradient will be zoomed according to the shape when the object is zoomed.
This functionality is only valid if the renderer using this rendering style produces an IlvGeneralPath.

Parameters:
set - If true, the texture or gradient is zoomed.
See Also:
IlvGeneralPath.setPaintZoomed(boolean), IlvDefaultCurveRenderer.isUsingGeneralPath(), IlvDefaultCurveRenderer.setUsingGeneralPath(boolean)

isPaintAbsolute

public boolean isPaintAbsolute()
Returns false, the TexturePaint or GradientPaint will be adapted to the bounding rectangle of objects. The default value is false. This value doesn't affect automatically adjusted Paint such as ilog.views.java2d.IlvLinearGradientPaint.
This functionality is only valid if the renderer using this rendering style produces an IlvGeneralPath.

See Also:
IlvGeneralPath.isPaintAbsolute(), IlvDefaultCurveRenderer.isUsingGeneralPath(), IlvDefaultCurveRenderer.setUsingGeneralPath(boolean)

setPaintAbsolute

public void setPaintAbsolute(boolean set)
When set to false, the TexturePaint or GradientPaint will be adapted to the bounding rectangle of the object. The default value is false. This value doesn't affect automatically adjusted Paint such as ilog.views.java2d.IlvLinearGradientPaint.
This functionality is only valid if the renderer using this rendering style produces an IlvGeneralPath.

Parameters:
set - If false, the paint is not adapted to the bounding rectangle of objects.
See Also:
IlvGeneralPath.setPaintAbsolute(boolean), IlvDefaultCurveRenderer.isUsingGeneralPath(), IlvDefaultCurveRenderer.setUsingGeneralPath(boolean)

setForeground

public void setForeground(Color color)
Sets the foreground color. This color is ignored if a Paint has been set and a IlvGeneralPath is used.


getForeground

public Color getForeground()
Retrieves the foreground color.


setLineWidth

public void setLineWidth(float lineWidth)
Sets the line width. This line width is ignored if a Paint has been set and a IlvGeneralPath is used.


getLineWidth

public float getLineWidth()
Retrieves the line width.


setEndCap

public void setEndCap(int endCap)
Sets the end cap style. This end cap style is ignored if a Paint has been set, and a IlvGeneralPath is used.

Parameters:
endCap - The end cap. Valid values are java.awt.BasicStroke.CAP_BUTT, java.awt.BasicStroke.CAP_ROUND and java.awt.BasicStroke.CAP_SQUARE.

getEndCap

public int getEndCap()
Retrieves the end cap style.


setLineJoin

public void setLineJoin(int lineJoin)
Sets the line join style. This line join style is ignored if a Paint has been set, and a IlvGeneralPath is used.

Parameters:
lineJoin - The line join. Valid values are java.awt.BasicStroke.JOIN_BEVEL , java.awt.BasicStroke.JOIN_MITER and java.awt.BasicStroke.JOIN_ROUND.

getLineJoin

public int getLineJoin()
Retrieves the line join style.


setLineStyle

public void setLineStyle(float[] lineStyle)
Sets the array representing the lengths of the dash segments of polylines generated by this renderer.

Parameters:
lineStyle - An array of float describing the dash.

getLineStyle

public float[] getLineStyle()
Returns the array representing the lengths of the dash segments.


setScale

public void setScale(float scale)
Sets the scale at which the line width is specified. When zooming to this scale and beyond, the line has this specified line width.

Parameters:
scale - The scale.

getScale

public float getScale()
Returns the scale at which the line width is specified. When zooming to this scale and beyond, the line has this specified line width.


getScaledLineStyle

public float[] getScaledLineStyle(IlvCoordinateSystem sourceCS,
                                  IlvCoordinateSystem targetCS)
Returns the line style in the manager coordinate system so that the actual style is observed for the specified scale.

Since:
JViews 5.0
See Also:
setScale(float), getScale()

getScaledLineWidth

public float getScaledLineWidth(IlvCoordinateSystem sourceCS,
                                IlvCoordinateSystem targetCS)
Returns the line width in the manager coordinate system so that the actual line width is observed for the scale specified in this rendering style.

Since:
JViews 5.0
See Also:
setScale(float), getScale()


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