ilog.views.maps.graphic
Class IlvDecoratedPath

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.graphic.IlvGeneralPath
          extended by ilog.views.maps.graphic.IlvDecoratedPath
All Implemented Interfaces:
IlvPolyPointsInterface, IlvPersistentObject, Transferable, Serializable

public class IlvDecoratedPath
extends IlvGeneralPath

A graphic object composed of decorations on a java.awt.Shape.

Since:
JViews 5.0
See Also:
IlvGeneralPath, IlvPathDecoration, Serialized Form

Constructor Summary
IlvDecoratedPath(IlvDecoratedPath source)
          Copy constructor.
IlvDecoratedPath(IlvInputStream stream)
          Reads the object from an IlvInputStream.
IlvDecoratedPath(Shape shape)
          Constructs a new decorated path whose baseline is the specified java.awt.Shape.
 
Method Summary
 IlvRect boundingBox(IlvTransformer t)
          Computes the bounding box of this object for the specified transformer.
 boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
          Tests if a point lies within the shape.
 IlvGraphic copy()
          Returns a copy of this decorated path.
 void draw(Graphics graphics, IlvTransformer t)
          Draws this IlvDecoratedPath with the specified graphics and the specified transformer.
 IlvPathDecoration getDecoration()
          Returns the decoration for this decorated path.
 boolean isDecorationOn()
          Returns true if the decoration of this decorated path is to be drawn.
 void setDecoration(IlvPathDecoration decoration)
          Sets the decoration for this decorated path.
 void setDecorationOn(boolean set)
          Sets whether the decoration of this decorated path is to be drawn.
 void write(IlvOutputStream stream)
          Writes this object to the specified IlvOutputStream.
 boolean zoomable()
          Returns true if this object is zoomable.
 
Methods inherited from class ilog.views.graphic.IlvGeneralPath
adaptPaint, allowsPointInsertion, allowsPointMove, allowsPointRemoval, applyTransform, calcBoundingBox, getAlpha, getClip, getFillPaint, getIntersectionWithOutline, getMaximumStrokeWidth, getPointAt, getPointsCardinal, getShape, getShapeBounds, getStroke, getStrokePaint, getTransformer, insertPoint, isContainsWhenNotFilled, isFillOn, isMovePointAllowed, isPaintAbsolute, isPaintZoomed, isPointEditionAllowed, isStrokeOn, isTransformedShapeMode, makeSelection, movePoint, moveResize, pointsInBBox, removePoint, resize, setAlpha, setBackground, setClip, setContainsWhenNotFilled, setFillOn, setFillPaint, setForeground, setInternalShape, setMaximumStrokeWidth, setMovePointAllowed, setPaintAbsolute, setPaintZoomed, setPointEditionAllowed, setShape, setShapeBounds, setStroke, setStrokeOn, setStrokePaint, setTransformedShapeMode, setTransformer
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, getAndAssociateObjectInteractor, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, hasProperty, inside, intersects, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isPersistent, isSelectable, isVisible, move, move, notifyObjectInteractorToManager, processActionEvent, reDraw, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, rotate, scale, setEditable, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setToolTipText, setVisible, toString, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvDecoratedPath

public IlvDecoratedPath(Shape shape)
Constructs a new decorated path whose baseline is the specified java.awt.Shape.

Parameters:
shape - The Shape of this decorated path.

IlvDecoratedPath

public IlvDecoratedPath(IlvDecoratedPath source)
Copy constructor.

Parameters:
source - The source decorated path.

IlvDecoratedPath

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

Throws:
IlvReadFileException
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes this object to the specified IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvGeneralPath
Parameters:
stream - The output stream.
Throws:
IOException - thrown when an exception occurs during the write operation for this object.

setDecoration

public void setDecoration(IlvPathDecoration decoration)
Sets the decoration for this decorated path.

Parameters:
decoration - The decoration.

getDecoration

public IlvPathDecoration getDecoration()
Returns the decoration for this decorated path.


isDecorationOn

public boolean isDecorationOn()
Returns true if the decoration of this decorated path is to be drawn.


setDecorationOn

public void setDecorationOn(boolean set)
Sets whether the decoration of this decorated path is to be drawn.

Parameters:
set - If true, the decoration is drawn.

draw

public void draw(Graphics graphics,
                 IlvTransformer t)
Draws this IlvDecoratedPath with the specified graphics and the specified transformer.

Overrides:
draw in class IlvGeneralPath
Parameters:
graphics - The graphics to draw to.
t - The viewing transformer.
See Also:
IlvGraphic.boundingBox(ilog.views.IlvTransformer), IlvGraphic.zoomable(), IlvGraphic

contains

public boolean contains(IlvPoint p,
                        IlvPoint tp,
                        IlvTransformer t)
Tests if a point lies within the shape.

Overrides:
contains in class IlvGeneralPath
Parameters:
p - The point to be tested.
tp - The point p transformed by the transformer t.
t - The transformation that was applied to the object when it was drawn.
Returns:
true if the point lies inside this graphic object.
See Also:
IlvGeneralPath.isContainsWhenNotFilled()

copy

public IlvGraphic copy()
Returns a copy of this decorated path.

Overrides:
copy in class IlvGeneralPath
Returns:
A new IlvGeneralPath.
See Also:
IlvGraphic

boundingBox

public IlvRect boundingBox(IlvTransformer t)
Computes the bounding box of this object for the specified transformer.

Specified by:
boundingBox in interface IlvPolyPointsInterface
Overrides:
boundingBox in class IlvGeneralPath
Parameters:
t - The transformer.
Returns:
The bounding box of this object.
See Also:
IlvGeneralPath.getShapeBounds(IlvTransformer)

zoomable

public boolean zoomable()
Returns true if this object is zoomable.

Overrides:
zoomable in class IlvGraphic
See Also:
IlvGraphic, IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer), IlvGraphic.boundingBox(IlvTransformer), IlvManager


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