ilog.views.maps.graphic
Class IlvMultiPathDecoration

java.lang.Object
  extended by ilog.views.maps.graphic.IlvMultiPathDecoration
All Implemented Interfaces:
IlvPersistentObject, IlvPathDecoration

public class IlvMultiPathDecoration
extends Object
implements IlvPathDecoration, IlvPersistentObject

This class implements a path decoration composed of multiple path decorations.
When drawing, a multipath decoration draws the decorations in the order they are set, and with the following behavior:

Since:
JViews 5.0

Constructor Summary
IlvMultiPathDecoration(IlvInputStream stream)
          Creates a new IlvMultiPathDecoration by reading it from a stream.
IlvMultiPathDecoration(IlvPathDecoration[] deco)
          Constructs a new IlvMultiPathDecoration that draws the decoration using the specified decorations.
 
Method Summary
 IlvRect boundingBox(Shape shape, IlvRect r, IlvTransformer t)
          Returns the bounding box of the specified shape, if it is decorated using this decoration.
 void draw(Graphics2D graphics, Shape shape, IlvTransformer t)
          Draws the decoration for the specified shape in the specified graphics.
 float equivalentWidth(IlvTransformer t)
          Returns an equivalent line width for the specified transformer.
 boolean isZoomable()
          Returns true if this path decoration is zoomable.
 void write(IlvOutputStream stream)
          Writes this decoration to an IlvOutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvMultiPathDecoration

public IlvMultiPathDecoration(IlvInputStream stream)
Creates a new IlvMultiPathDecoration by reading it from a stream.

Parameters:
stream - The stream to read from.
Since:
JViews 8.1

IlvMultiPathDecoration

public IlvMultiPathDecoration(IlvPathDecoration[] deco)
Constructs a new IlvMultiPathDecoration that draws the decoration using the specified decorations.

Parameters:
deco - An array of decorations to use.
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes this decoration to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Parameters:
stream - The output stream to write to.
Throws:
IOException - if there is a standard IO error.
Since:
JViews 8.1
See Also:
IlvPersistentObject.write(ilog.views.io.IlvOutputStream)

draw

public void draw(Graphics2D graphics,
                 Shape shape,
                 IlvTransformer t)
Draws the decoration for the specified shape in the specified graphics.

Specified by:
draw in interface IlvPathDecoration
Parameters:
graphics - The Graphics2D to draw in.
shape - The Shape to draw.
t - The viewing transformer.

boundingBox

public IlvRect boundingBox(Shape shape,
                           IlvRect r,
                           IlvTransformer t)
Returns the bounding box of the specified shape, if it is decorated using this decoration.
If r is non-null, the result is put in r and returned, otherwise the result is returned in a newly allocated IlvRect.

Specified by:
boundingBox in interface IlvPathDecoration
Parameters:
shape - The shape whose bounding box is to be computed.
r - The IlvRect that will contain the result.
t - The transformer for this bounding box.

isZoomable

public boolean isZoomable()
Returns true if this path decoration is zoomable.

Specified by:
isZoomable in interface IlvPathDecoration

equivalentWidth

public float equivalentWidth(IlvTransformer t)
Returns an equivalent line width for the specified transformer.

Specified by:
equivalentWidth in interface IlvPathDecoration
Parameters:
t - The transformer to compute the equivalent width.
Returns:
The equivalent width.


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