public class IlvMapGraphicPath extends IlvGraphicPath implements IlvMapGraphic
IlvMapGraphicPath
is an IlvGraphicPath
that accepts an IlvGraphicPathStyle
to define its graphical
attributes.FILL_ONLY, STROKE_AND_FILL, STROKE_ONLY
Constructor and Description |
---|
IlvMapGraphicPath(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
IlvMapGraphicPath(IlvMapGraphicPath source)
Creates a new
IlvMapGraphicPath instance by copying
an existing one. |
IlvMapGraphicPath(IlvPoint[] points,
boolean copy)
Creates an
IlvMapGraphicPath instance containing only one
polypoint. |
IlvMapGraphicPath(IlvPointArray[] paths,
boolean copy)
Creates an
IlvMapGraphicPath object containing several
polypoints. |
Modifier and Type | Method and Description |
---|---|
IlvRect |
boundingBox(IlvTransformer t)
This overridden method takes the decoration size into account.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the shape of the object.
|
IlvGraphic |
copy()
Copies the objects.
|
IlvGraphic |
copy(IlvCoordinateTransformation transform)
Copies the element and applies the specified transformation to its coordinates.
|
void |
draw(Graphics dst,
IlvTransformer t)
Specific drawing method to display decorations.
|
boolean |
equals(Object o)
Checks whether two graphic paths are the same.
|
Color |
getBackground()
Retrieves the background from the style.
|
IlvPathDecoration |
getDecoration()
Returns the decoration for this decorated path.
|
Paint |
getDecorationPaint()
Returns the
Paint object used to draw the decoration. |
int |
getDrawRule()
Overrides
IlvGraphicPath.getDrawRule to take the style
into account. |
Color |
getForeground()
Retrieves the foreground from the style.
|
float[] |
getLineStyle()
Retrieves the line style from the style.
|
double |
getLineWidth()
Retrieves the line width from the style.
|
double |
getMaximumLineWidth()
Retrieves the maximum line width from the style.
|
Paint |
getPaint()
Retrieves the
Paint instance from the style. |
IlvMapStyle |
getStyle()
Retrieves the
IlvMapStyle instance attached to this graphic. |
boolean |
isDecorationOnly()
Returns
true if the decoration of this decorated path
is to be drawn. |
IlvMapGeometry |
makeGeometry()
Returns an
IlvMapPolygon geometry. |
void |
setBackground(Color color)
Sets the background in the
IlvGraphicPathStyle object. |
void |
setDecoration(IlvPathDecoration decoration)
Sets the decoration for this decorated path.
|
void |
setDecorationOnly(boolean set)
Sets if the decoration of this decorated path is to be drawn.
|
void |
setDecorationPaint(Paint p)
Sets the
Paint object used to draw the decoration. |
void |
setForeground(Color color)
Sets the foreground in the
IlvGraphicPathStyle object. |
void |
setLineStyle(float[] style)
Sets the line style in the
IlvGraphicPathStyle object. |
void |
setLineWidth(double width)
Sets the line width in the
IlvGraphicPathStyle object. |
void |
setMaximumLineWidth(double width)
Sets the maximum line width in the
IlvGraphicPathStyle object. |
void |
setPaint(Paint paint)
Sets the
Paint instance in the IlvGraphicPathStyle
object. |
void |
setStyle(IlvMapStyle style)
Implements the
IlvMapGraphic interface. |
void |
write(IlvOutputStream stream)
Writes this
IlvMapGraphicPath object to the
IlvOutputStream passed as a parameter. |
applyTransform, getIntersectionWithOutline, getNumPaths, getPaths, setDrawRule, setPaths, setPaths
addActionListener, addNamedPropertyListener, allViewsRemoved, baseTextDirectionChanged, blinkingStateOn, boundingBox, callDraw, componentOrientationChanged, getAndAssociateObjectInteractor, getBaseTextDirection, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getComponentOrientation, getDefaultInteractor, getGraphicBag, GetGraphicObject, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getResolvedBaseTextDirection, getToolTipBaseTextDirection, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getULocale, getZOrderIndex, hasProperty, inside, intersects, invalidateBBoxCache, invalidateBidiCache, isBaseTextDirectionSensitive, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isPersistent, isSelectable, isVisible, localeChanged, makeSelection, move, move, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBaseTextDirection, setBaseTextDirectionDuringConstruction, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setToolTipText, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved, zoomable
public IlvMapGraphicPath(IlvMapGraphicPath source)
IlvMapGraphicPath
instance by copying
an existing one.source
- The object to be copied.public IlvMapGraphicPath(IlvPointArray[] paths, boolean copy)
IlvMapGraphicPath
object containing several
polypoints.paths
- The array of polypoints.copy
- Set to true
so the array of points is copied
before being used by the class. Set to false
so
the array is stored internally in the object. If this is the case, you
must not use the array anymore.public IlvMapGraphicPath(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input stream.IlvReadFileException
- if the format is not correct.public IlvMapGraphicPath(IlvPoint[] points, boolean copy)
IlvMapGraphicPath
instance containing only one
polypoint.points
- The array of points of the polypoint.copy
- Set to true
so the array of points is copied
before being used by the class. Set to false
so
the array is stored internally in the object. If this is the case, you
must not use the array anymore.public void write(IlvOutputStream stream) throws IOException
IlvMapGraphicPath
object to the
IlvOutputStream
passed as a parameter.write
in interface IlvPersistentObject
write
in class IlvGraphicPath
stream
- The stream to write to.IOException
- if there is a problem writing to stream
.public void draw(Graphics dst, IlvTransformer t)
draw
in class IlvGraphicPath
dst
- The destination Graphics
object.t
- The transformation used to draw the object.IlvGraphic.callDraw(Graphics,IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvGraphic.zoomable()
,
IlvGraphic
public IlvRect boundingBox(IlvTransformer t)
boundingBox
in class IlvGraphicPath
t
- The transformer.IlvGraphicPath.boundingBox(ilog.views.IlvTransformer)
public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains
in class IlvGraphicPath
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.true
if the point lies inside this graphic object.IlvGraphicPath.contains(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)
public IlvMapStyle getStyle()
IlvMapStyle
instance attached to this graphic.getStyle
in interface IlvMapGraphic
IlvMapStyle
instance attached to this graphic.public void setStyle(IlvMapStyle style)
IlvMapGraphic
interface.setStyle
in interface IlvMapGraphic
style
- The IlvMapStyle
to set.
Must be a IlvGeneralPathStyle
instance.public int getDrawRule()
IlvGraphicPath.getDrawRule
to take the style
into account.getDrawRule
in class IlvGraphicPath
IlvGraphicPath.setDrawRule(int)
public void setDecoration(IlvPathDecoration decoration)
decoration
- The decoration.public IlvPathDecoration getDecoration()
IlvPathDecoration
instance used by this polyline.public boolean isDecorationOnly()
true
if the decoration of this decorated path
is to be drawn.true
is returned.public void setDecorationOnly(boolean set)
set
- Set to true
so the decoration is drawn.public void setBackground(Color color)
IlvGraphicPathStyle
object.setBackground
in class IlvGraphicPath
color
- The background to be set in the
IlvGraphicPathStyle
object.IlvGraphic.draw(Graphics, IlvTransformer)
,
IlvGraphic.setForeground(Color)
,
IlvGraphic.setFillOn(boolean)
,
IlvGraphic.setStrokeOn(boolean)
,
IlvGraphic
public Color getBackground()
getBackground
in class IlvGraphicPath
IlvGraphicPathStyle
object.public void setForeground(Color color)
IlvGraphicPathStyle
object.setForeground
in class IlvGraphicPath
color
- The foreground to be set in the
IlvGraphicPathStyle
object.IlvGraphic.draw(Graphics, IlvTransformer)
,
IlvGraphic.setBackground(Color)
,
IlvGraphic.setFillOn(boolean)
,
IlvGraphic.setStrokeOn(boolean)
,
IlvGraphic
public Color getForeground()
getForeground
in class IlvGraphicPath
IlvGraphicPathStyle
object.public void setPaint(Paint paint)
Paint
instance in the IlvGraphicPathStyle
object.paint
- The Paint
instance to be set in the
IlvGraphicPathStyle
object.public Paint getPaint()
Paint
instance from the style.Paint
instance as set in the
IlvGraphicPathStyle
object.public void setLineWidth(double width)
IlvGraphicPathStyle
object.width
- The line width to be set in the
IlvGraphicPathStyle
object.public double getLineWidth()
IlvGraphicPathStyle
object.public void setLineStyle(float[] style)
IlvGraphicPathStyle
object.style
- The line style to be set in the
IlvGraphicPathStyle
object.public float[] getLineStyle()
IlvGraphicPathStyle
object.public void setMaximumLineWidth(double width)
IlvGraphicPathStyle
object.width
- The line width to be set in the
IlvGraphicPathStyle
object.public double getMaximumLineWidth()
IlvGraphicPathStyle
object.public Paint getDecorationPaint()
Paint
object used to draw the decoration.Paint
object used to draw the decoration.public void setDecorationPaint(Paint p)
Paint
object used to draw the decoration.p
- The Paint
object used to draw the decoration.public IlvGraphic copy()
copy
in class IlvGraphicPath
IlvMapGraphicPath
object.IlvGraphic
public IlvGraphic copy(IlvCoordinateTransformation transform) throws IlvCoordinateTransformationException
copy
in interface IlvMapGraphic
transform
- Transformation to apply.IlvCoordinateTransformationException
IlvMapGraphic.copy(ilog.views.maps.srs.coordtrans.IlvCoordinateTransformation)
public IlvMapGeometry makeGeometry()
IlvMapPolygon
geometry.makeGeometry
in interface IlvMapGraphic
IlvMapGraphic.makeGeometry()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.