public class IlvMapPolyline extends IlvPolyline implements IlvMapGraphic
IlvMapPolyline
is an IlvPolyline
that reads its
attribute from an IlvPolylineStyle
instance. This polyline
object support decorations.IlvPathDecoration
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected IlvPolylineStyle |
style
The map style in use.
|
Constructor and Description |
---|
IlvMapPolyline(IlvInputStream stream)
Reads an
IlvMapPolyline object from an
IlvInputStream . |
IlvMapPolyline(IlvMapPolyline source)
Creates an
IlvMapPolyline instance by copying an existing
one. |
IlvMapPolyline(IlvPoint[] points)
Creates a new
IlvMapPolyline instance. |
IlvMapPolyline(IlvPoint[] points,
boolean copy)
Creates a new
IlvMapPolyline insance. |
Modifier and Type | Method and Description |
---|---|
IlvRect |
boundingBox(IlvTransformer t)
Returns the bounding rectangle of this object.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the outline of this object.
|
IlvGraphic |
copy()
Copies the object.
|
IlvGraphic |
copy(IlvCoordinateTransformation transform)
Copies the element and applies the specified transformation to its coordinates.
|
void |
draw(Graphics graphics,
IlvTransformer t)
Draws this
IlvMapPolyline object with the specified graphics
and transformer. |
protected void |
drawDecoration(Graphics2D g,
IlvTransformer t)
Draws the decoration if there is one.
|
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 |
getEndCap()
Retrieves the end cap from the style.
|
Color |
getForeground()
Retrieves the foreground from the style.
|
int |
getLineJoin()
Retrieves the line join from the style.
|
float[] |
getLineStyle()
Retrieves the line style from the style.
|
double |
getLineWidth()
Retrieves the line width from the style.
|
double |
getLineWidth(IlvTransformer t)
Returns the line width that is really displayed when the object is drawn with the specified transformer.
|
double |
getMaximumLineWidth()
Retrieves the maximum line width from the style.
|
IlvMapStyle |
getStyle()
Retrieves the
IlvMapStyle attached to this graphic. |
boolean |
isDecorationOnly()
Returns
true if the decoration of this decorated path is to
be drawn. |
static boolean |
isPreciseContains()
Tests if the contains method is performing a precise and costly check.
|
IlvMapGeometry |
makeGeometry()
Returns an
IlvMapLineString geometry. |
void |
setBackground(Color color)
Sets the background in the
IlvPolylineStyle object. |
void |
setDecoration(IlvPathDecoration decoration)
Sets the decoration for this decorated path.
|
void |
setDecorationOnly(boolean set)
Sets whether the decoration of this decorated path is to be drawn.
|
void |
setDecorationPaint(Paint p)
Sets the
Paint object used to draw the decoration. |
void |
setEndCap(int end)
Sets the end cap in the
IlvPolylineStyle object. |
void |
setForeground(Color color)
Sets the foreground in the
IlvPolylineStyle object. |
void |
setLineJoin(int join)
Sets the line join in the
IlvPolylineStyle object. |
void |
setLineStyle(float[] s)
Sets the line style in the
IlvPolylineStyle object. |
void |
setLineWidth(double width)
Sets the line width in the
IlvPolylineStyle object. |
static void |
setPreciseContains(boolean pc)
Set to
true if the contains method should perform a precise
and costly check. |
void |
setStyle(IlvMapStyle stl)
Implements the
IlvMapGraphic interface. |
void |
write(IlvOutputStream stream)
Writes this
IlvMapGraphicPath object to the
IlvOutputStream passed as parameter |
boolean |
zoomable()
Returns whether the object is zoomable.
|
computeBBox, finalize, getIntersectionWithOutline, pointsInBBox, setMaximumLineWidth
allowsPointInsertion, allowsPointMove, allowsPointRemoval, applyTransform, getPointAt, getPoints, getPointsCardinal, inBBox, insertPoint, intersects, makeSelection, movePoint, recomputeBBox, removePoint, translate
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, invalidateBBoxCache, invalidateBidiCache, isBaseTextDirectionSensitive, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isPersistent, isSelectable, isVisible, localeChanged, 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, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved
protected IlvPolylineStyle style
public IlvMapPolyline(IlvMapPolyline source)
IlvMapPolyline
instance by copying an existing
one.source
- The source IlvMapPolyline
object.public IlvMapPolyline(IlvPoint[] points)
IlvMapPolyline
instance.points
- The array of points defining the polyline.public IlvMapPolyline(IlvPoint[] points, boolean copy)
IlvMapPolyline
insance.points
- The array of points defining the polyline.copy
- Specifies if the array of points is to be copied or not.public IlvMapPolyline(IlvInputStream stream) throws IlvReadFileException
IlvMapPolyline
object from an
IlvInputStream
.stream
- The stream to read from.IlvReadFileException
- if there is a problem reading from
stream
.public void write(IlvOutputStream stream) throws IOException
IlvMapGraphicPath
object to the
IlvOutputStream
passed as parameterwrite
in interface IlvPersistentObject
write
in class IlvPolyline
stream
- The stream to write to.IOException
- if there is a problem writing to stream
.public void setDecoration(IlvPathDecoration decoration)
decoration
- The decoration.public IlvPathDecoration getDecoration()
IlvPathDecoration
object 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
for the decoration to be drawn.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 void setEndCap(int end)
IlvPolylineStyle
object.setEndCap
in class IlvPolyline
end
- The end cap to be set in the IlvPolylineStyle
object.IlvStroke
public int getEndCap()
getEndCap
in class IlvPolyline
IlvPolylineStyle
object.IlvStroke
public void setForeground(Color color)
IlvPolylineStyle
object.setForeground
in class IlvPolyline
color
- The foreground to be set in the IlvPolylineStyle
object.IlvGraphic.draw(Graphics, IlvTransformer)
,
IlvGraphic.setBackground(Color)
,
IlvGraphic.setFillOn(boolean)
,
IlvGraphic.setStrokeOn(boolean)
,
IlvGraphic
public Color getForeground()
getForeground
in class IlvPolyline
IlvPolylineStyle
object.public void setLineJoin(int join)
IlvPolylineStyle
object.setLineJoin
in class IlvPolyline
join
- The line join to be set in the IlvPolylineStyle
object.IlvStroke
public int getLineJoin()
getLineJoin
in class IlvPolyline
IlvPolylineStyle
object.IlvStroke
public void setLineStyle(float[] s)
IlvPolylineStyle
object.setLineStyle
in class IlvPolyline
s
- The line style to be set in the IlvPolylineStyle
object.public float[] getLineStyle()
getLineStyle
in class IlvPolyline
IlvPolylineStyle
object.public void setLineWidth(double width)
IlvPolylineStyle
object.setLineWidth
in class IlvPolyline
width
- The line width to be set in the IlvPolylineStyle
object.public double getLineWidth()
getLineWidth
in class IlvPolyline
IlvPolylineStyle
object.public double getLineWidth(IlvTransformer t)
getLineWidth
in class IlvPolyline
t
- the transformer used to draw the object.public double getMaximumLineWidth()
getMaximumLineWidth
in class IlvPolyline
IlvPolylineStyle
object.public void setBackground(Color color)
IlvPolylineStyle
object.setBackground
in class IlvGraphic
color
- The maximum line style to be set in the
IlvPolylineStyle
object.IlvGraphic.draw(Graphics, IlvTransformer)
,
IlvGraphic.setForeground(Color)
,
IlvGraphic.setFillOn(boolean)
,
IlvGraphic.setStrokeOn(boolean)
,
IlvGraphic
public Color getBackground()
IlvPolylineStyle
object.public IlvMapStyle getStyle()
IlvMapStyle
attached to this graphic.getStyle
in interface IlvMapGraphic
IlvMapStyle
attached to this graphic.public void setStyle(IlvMapStyle stl)
IlvMapGraphic
interface.setStyle
in interface IlvMapGraphic
stl
- The IlvMapStyle
object to set. Must be an
IlvPolylineStyle
instance.public void draw(Graphics graphics, IlvTransformer t)
IlvMapPolyline
object with the specified graphics
and transformer.draw
in class IlvPolyline
graphics
- The graphics to draw to.t
- The view transformer.IlvGraphic.callDraw(Graphics,IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvGraphic.zoomable()
,
IlvGraphic
protected void drawDecoration(Graphics2D g, IlvTransformer t)
g
- The current Graphics2D
instance.t
- The current IlvTransformer
instance.public IlvRect boundingBox(IlvTransformer t)
boundingBox
in interface IlvPolyPointsInterface
boundingBox
in class IlvPolyline
t
- The transformer used to draw the object.IlvPolyline.boundingBox(ilog.views.IlvTransformer)
public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains
in class IlvPolyline
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
is returned.IlvGraphic
public IlvGraphic copy()
copy
in class IlvPolyline
IlvMapPolyline
instance.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 static boolean isPreciseContains()
true
is returned.public static void setPreciseContains(boolean pc)
true
if the contains method should perform a precise
and costly check.pc
- Set to true
to perform a precise check.public IlvMapGeometry makeGeometry()
IlvMapLineString
geometry.makeGeometry
in interface IlvMapGraphic
IlvMapLineString
geometry.IlvMapGraphic.makeGeometry()
public boolean zoomable()
zoomable
in class IlvPolyline
IlvPolyline.zoomable()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.