public class IlvGeneralLink extends IlvSimpleLink implements IlvGraphicBag, IlvLabelInterface, ilog.views.sdm.internal.labellayout.IlvSDMLabeledNode
IlvStyleSheetRenderer
, as it uses the bean properties
for customization intensively.
For a complete description see the user documentation.
Modifier and Type | Field and Description |
---|---|
static int |
ANIM_SPEED
Animation speed for all links.
|
static int |
ARROW_DECORATION
A custom arrow shape, which is defined by a decoration.
|
static int |
ARROW_FILL
The filled triangle arrow shape.
|
static int |
ARROW_GRADIENT
The arrow (actually, the orientation) of the link is
represented by a smooth luminosity effect along the link.
|
static int |
ARROW_OPEN
The 2-arms arrow shape.
|
static int |
DECORATION_ABSOLUTE
The decoration option to let the decoration
position itself.
|
static int |
DECORATION_ANCHOR_BOTTOM
The decoration option that anchors at the bottom.
|
static int |
DECORATION_ANCHOR_LEFT
The decoration option that anchors to the left.
|
static int |
DECORATION_ANCHOR_RIGHT
The decoration option that anchors to the right.
|
static int |
DECORATION_ANCHOR_TOP
The decoration option that anchors on top.
|
static int |
DECORATION_ANIMATE
The decoration option that enables animation.
|
static int |
DECORATION_FIXED_SIZE
The decoration option that prevents zooming on the decoration.
|
static int |
DECORATION_FULL_RETRACT_AT_END
The decoration option to simulate an arrow behavior.
|
static int |
DECORATION_HALF_RETRACT_AT_END
The decoration option to simulate an arrow behavior.
|
static int |
DECORATION_NO_RETRACT_AT_END
The decoration option to simulate an arrow behavior.
|
static int |
DECORATION_NOTHING
The default decoration option.
|
static int |
DECORATION_OVER
The decoration option for hard-positioning the decoration onto the
center of the link.
|
static int |
DECORATION_PROPORTIONAL_ANGLE
The decoration option that the rotation angle is directly propertional
to the slope of the link.
|
static int |
DECORATION_RIGHT_SIDE_UP_ANGLE
The decoration option that the rotation angle keeps the decoration
rightside up.
|
static int |
DECORATION_ROTATE
The decoration option that rotates the decoration according
to the link orientation.
|
static int |
MODE_GRADIENT
Mode where the foreground color generates a gradient to paint the link.
|
static int |
MODE_NEON
Mode where the foreground color generates a neon-like gradient
to paint the link.
|
static int |
MODE_TEXTURE
Mode where the texture property is used to paint the link.
|
static int |
MODE_UNICOLOR
Mode where the foreground color paints the link.
|
BRIDGE_CROSSINGS, NO_CROSSINGS, TUNNEL_CROSSINGS
Constructor and Description |
---|
IlvGeneralLink()
Bean constructor.
|
IlvGeneralLink(IlvGeneralLink source)
Copy constructor.
|
IlvGeneralLink(IlvGraphic from,
IlvGraphic to)
Creates and initializes a new
IlvGeneralLink . |
IlvGeneralLink(IlvGraphic from,
IlvGraphic to,
boolean oriented)
Creates and initializes a new
IlvGeneralLink . |
IlvGeneralLink(IlvGraphic from,
IlvGraphic to,
boolean backoriented,
boolean oriented,
IlvPoint[] points)
Creates and initializes a new
IlvGeneralLink . |
IlvGeneralLink(IlvGraphic from,
IlvGraphic to,
boolean oriented,
IlvPoint[] points)
Creates and initializes a new
IlvGeneralLink . |
IlvGeneralLink(IlvInputStream stream)
Reads a link from an input stream.
|
Modifier and Type | Method and Description |
---|---|
void |
addObject(IlvGraphic graphic,
boolean redraw)
Adds a graphic object in the bag.
|
void |
applyToObject(IlvGraphic graphic,
IlvApplyObject f,
Object arg,
boolean redraw)
Applies a method to a graphic object of the bag.
|
protected IlvRect |
arrowBBox(IlvPoint pos,
double theta,
IlvTransformer t)
Returns the arrow bounding box.
|
void |
baseTextDirectionChanged(int oldBaseTextDirection,
int newBaseTextDirection)
Called when the object is base text direction sensitive and the
resolved base text direction has changed.
|
IlvRect |
calcBoundingBox(IlvTransformer t)
Calculates the bounding rectangle of the link.
|
protected Paint[] |
colorize(Color base,
double fsize)
Generates rainbow colors from a base, when mode is
MODE_GRADIENT . |
protected Paint[] |
colorizeNeon(Color base,
double fsize)
Generates rainbow colors from a base, when mode is
MODE_NEON . |
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the outline of the link.
|
IlvGraphic |
copy()
Copies the object.
|
protected IlvGraphic |
createCrossingGraphic(int mode)
Creates the appropriate crossing graphic.
|
protected Shape |
createFillArrowShape(IlvPoint pos,
double theta,
double length)
Returns the shape of a filled arrow.
|
protected Shape |
createOpenArrowShape(IlvPoint pos,
double theta,
double length)
Returns the shape of an open arrow.
|
protected Shape |
curvedShapeFromManyPoints(IlvPoint[] points)
Called by
shapeFromPoints() to generate a curved shape. |
IlvRect |
decorationBoundingBox(IlvTransformer t,
int decorationIndex)
Returns the bounding box of one of the link
decorations.
|
int |
decorationHit(IlvPoint tp,
IlvTransformer t)
Returns the decoration which contains the given point.
|
IlvTransformer |
decorationTransformer(IlvTransformer t,
int decorationIndex)
Returns the transformer that will be applied to one of the link
decorations.
|
protected void |
drawArrow(Graphics dst,
IlvPoint pos,
double theta,
IlvTransformer t)
Draws an arrow.
|
protected void |
drawCore(Graphics2D dst,
IlvTransformer t)
Draws the object.
|
Color |
getAlternateColor()
Returns the current alternate color.
|
float |
getAnimateSpeed()
Returns the current animation speed.
|
Color |
getArrowColor()
Returns the current arrow color.
|
int |
getArrowMode()
Returns the current arrow style.
|
double |
getArrowPosition()
Returns the current position of the forward arrow.
|
double |
getArrowRatio()
Returns the current arrow size ratio.
|
protected double |
getArrowSize(double lineWidth,
IlvTransformer t)
Returns the size of the arrow for the specified
IlvTransformer and lineWidth . |
double |
getBackArrowPosition()
Returns the current position of the backwards arrow.
|
protected double |
getBackArrowSize(double lineWidth,
IlvTransformer t)
Returns the size of the backward arrow for the specified
IlvTransformer and lineWidth . |
int |
getBaseTextDirection()
Returns the base direction of the text.
|
Color |
getBorderDownColor()
Returns the current lower border.
|
float[] |
getBorderStyle()
Returns the dash pattern for the border.
|
float |
getBorderStylePhase()
Returns the dash pattern offset for the border.
|
Color |
getBorderUpColor()
Returns the current upper border color.
|
double |
getBorderWidth()
Returns the current border width.
|
ComponentOrientation |
getComponentOrientation()
Returns the component orientation of this object.
|
double |
getCurved()
Returns whether the link is straight (
0.0 ) or curved (> 0.0 ). |
int[] |
getDecorationOptions()
Returns the current decoration options.
|
int |
getDecorationOptions(int index)
Returns the current decoration options.
|
double[] |
getDecorationPositions()
Returns the current decoration positions.
|
double |
getDecorationPositions(int index)
Returns the current decoration positions.
|
IlvGraphic[] |
getDecorations()
Returns the current decorations of the link.
|
IlvGraphic |
getDecorations(int index)
Returns the decoration located at the specified index.
|
protected IlvPoint[] |
getDrawingLinkPoints(IlvTransformer t)
Returns the link points used to draw the polyline of the link.
|
IlvPoint[] |
getIntermediateLinkPoints()
Returns the intermediate link points (without the two
connection points).
|
double |
getInternalZoom()
Returns the current internal scale factor.
|
String |
getLabel()
Returns the label of the object.
|
IlvRect |
getLabelBBox(IlvTransformer t)
Returns the area where the label is displayed.
|
float |
getLineStylePhase()
Returns the dash pattern offset.
|
double |
getMinimumLineWidth()
Returns the minimum line width (while zooming out).
|
int |
getMode()
Returns the current drawing mode.
|
IlvGraphic |
getObject(String name)
Returns the graphic object with that name if it exists in the bag,
otherwise returns
null . |
IlvGraphicEnumeration |
getObjects()
Implementation of the
IlvGraphicBag interface. |
protected IlvPoint |
getPolylinePosition(IlvPoint[] points,
double ratio,
double[] slope)
Deprecated.
|
IlvPoint |
getPolylinePosition(IlvPoint[] points,
double ratio,
double[] slope,
IlvTransformer current)
Utility function to return the position of a point along a polyline.
|
static int |
getQualityLevel()
Returns the current quality level.
|
double |
getRadius()
Returns current radius for rounded links.
|
double |
getRealLinkWidth(IlvTransformer t)
Returns the final width of the link, according to the given transformer.
|
int |
getResolvedBaseTextDirection()
Returns the resolved base text direction.
|
Shape |
getShape(IlvPoint[] points)
Deprecated.
|
Shape |
getShape(IlvPoint[] points,
IlvTransformer t)
Returns the shape of the link, according to the given
intermediate points.
|
protected Shape |
getSimpleShape(IlvPoint[] points,
IlvTransformer t)
Returns the shape of the link, according to the given intermediate
points.
|
IlvTexture |
getTexture()
Returns the current texture.
|
String |
getWave()
Returns the current wave value of the link.
|
protected void |
invalidateBidiCache()
Mark internal caches for locale, component orientation and base
text direction invalid.
|
boolean |
isCrossingEnabled()
Returns
true if crossings are shown on the link. |
boolean |
isOptimized()
Returns the "optimized" mode of this link.
|
boolean |
isSpline()
Tests if the link has spline routing functionality.
|
protected boolean |
mergeCrossings(double dist,
double gap,
double lineWidth,
IlvTransformer t)
Returns whether to merge two subsequent crossings.
|
void |
moveDecoration(int index,
double x,
double y,
IlvTransformer t)
Label layout uses this method to set the decoration
location.
|
void |
moveLabel(double x,
double y,
IlvTransformer t)
Label layout uses this method to set the label
location.
|
void |
moveObject(IlvGraphic graphic,
double x,
double y,
boolean redraw)
Changes the location of a graphic object.
|
void |
reDrawObj(IlvGraphic graphic)
Redraws a graphic object located in the bag.
|
void |
reDrawRegion(IlvRegion region)
Redraws a region of the bag.
|
void |
removeObject(IlvGraphic graphic,
boolean redraw)
Removes a graphic object from the bag.
|
void |
reshapeObject(IlvGraphic graphic,
IlvRect newrect,
boolean redraw)
Changes the size of a graphic object.
|
protected Shape |
roundedFromManyPoints(IlvPoint[] points,
double radius,
IlvTransformer current)
Called by
shapeFromPoints() to generate a straight shape with rounded corners. |
void |
setAlternateColor(Color c)
Sets the alternating color.
|
void |
setAnimateSpeed(float speed)
Sets the speed of animation.
|
void |
setArrowColor(Color value)
Sets the arrow color.
|
void |
setArrowMode(int style)
Sets the arrow drawing style.
|
void |
setArrowPosition(double value)
Sets the arrow position as a proportion of the link length (for example,
.5 is the middle of the link). |
void |
setArrowRatio(double value)
Sets the arrow size as a proportion of the link width (for example,
1 is about twice the link width). |
void |
setBackArrowPosition(double value)
Sets the backward arrow position as a proportion of the link length
(for example,
.5 is the middle of the link). |
void |
setBackOriented(boolean oriented)
Sets whether the link is backward oriented.
|
void |
setBaseTextDirection(int baseTextDirection)
Changes the base direction of the text.
|
protected void |
setBaseTextDirectionDuringConstruction(int baseTextDirection)
Changes the base direction of the text.
|
void |
setBorderDownColor(Color value)
Sets the lower border color.
|
void |
setBorderStyle(float[] lineStyle)
Overrides the array representing the lengths of the dash segments for
the border.
|
void |
setBorderStylePhase(float phase)
Sets the dash pattern offset for the border.
|
void |
setBorderUpColor(Color value)
Sets the border color.
|
void |
setBorderWidth(double value)
Sets the border width.
|
static void |
setContainsMargin(double margin)
Deprecated.
Beginning with Perforce JViews 8.7, use
IlvUtil.SetDeltaLine(double) instead. |
void |
setCrossingMode(int mode)
Sets the crossing mode of the link.
|
void |
setCurved(double value)
Sets the curved look and the smoothness of the spline.
|
void |
setDecorationOptions(int[] value)
Sets all the decoration options at once.
|
void |
setDecorationOptions(int index,
int value)
Sets how the decoration is displayed.
|
void |
setDecorationPositions(double[] value)
Sets all the relative decoration positions of the link.
|
void |
setDecorationPositions(int index,
double value)
Sets the relative decoration positions on the link.
|
void |
setDecorations(IlvGraphic[] decorations)
Sets decorations on the link.
|
void |
setDecorations(int index,
IlvGraphic decoration)
Sets a decoration on the link.
|
void |
setEndCap(int endCap)
Changes the decorations applied at the end of the polyline.
|
void |
setForeground(Color c)
Sets the color of the link.
|
void |
setIntermediateLinkPoints(IlvPoint[] points)
Sets the intermediate points of the link.
|
void |
setInternalZoom(double value)
Sets the internal scale factor.
|
void |
setLabel(String label)
Sets a label for the link.
|
void |
setLineJoin(int lineJoin)
Changes the decoration applied when two segments are joined.
|
void |
setLineStyle(float[] lineStyle)
Changes the array representing the lengths of the dash segments.
|
void |
setLineStylePhase(float phase)
Sets the dash pattern offset.
|
void |
setLineWidth(double val)
Changes the line width of the object.
|
void |
setMinimumLineWidth(double val)
Sets the minimum line width while zooming out.
|
void |
setMode(int mode)
Sets the link drawing mode.
|
boolean |
setObjectName(IlvGraphic graphic,
String name)
Changes the name of a graphic object.
|
void |
setOptimized(boolean optimized)
Sets or clears the "optimized" mode of this link.
|
void |
setOriented(boolean oriented)
Sets the link as oriented or nonoriented.
|
void |
setOrthogonal(boolean orthogonal)
Enables the orthogonal mode of the link.
|
static void |
setQualityLevel(int val)
Controls the quality rendering of the link.
|
void |
setRadius(double radius)
Sets radius for rounded link.
|
void |
setTexture(IlvTexture value)
Sets the texture.
|
void |
setWave(String wave)
Sets the wavy outline for the link.
|
protected Shape |
shapeFromPoints(IlvPoint[] points)
Deprecated.
|
protected Shape |
shapeFromPoints(IlvPoint[] points,
IlvTransformer current)
Generates a shape from the given points.
|
boolean |
supportMultiline()
Returns
true if the label can be a multiline label;
false otherwise. |
void |
translate(double dx,
double dy)
Translates the object.
|
void |
updateLabelingModel(IlvSDMEngine engine,
IlvAnnealingLabelLayout layout,
ilog.views.sdm.internal.labellayout.IlvSDMLabelingModel model,
Object obj,
IlvGraphic graphic)
You should not call this method directly.
|
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream . |
boolean |
zoomable()
Returns always
false . |
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setCrossingEnabled, setGap, setGapZoomable, setMaximumLineWidth, setName, setToolTipText
draw, getAlpha, getCrossingMode, getDefaultLinkShapePolicy, isAlphaBufferEnabled, isBackOriented, isMultiLinkBundled, isOrthogonal, setAlpha, setAlphaBufferEnabled, setGraphicBag, setMultiLinkBundled
applyTransform, arrowBBox, backArrowBBox, boundingBox, boundingBoxCacheContains, boundingBoxCrossingGraphic, containsAtCrossingGraphic, drawBackArrow, drawCrossingGraphic, drawPolyline, getBoundingBoxCacheSize, getCrossingGraphic, getCrossingPolicy, getGap, getLayerOfCrossingGraphic, getStrokeShape, hasCrossings, insertPoint, invalidateBBoxCache, invalidateBoundingBoxCache, isGapZoomable, movePoint, removePoint, setBoundingBoxCacheSize, setCrossingGraphic, setCrossingGraphic, setIntermediateLinkPoints, setLayerOfCrossingGraphic, shouldOptimizeCache
getLinkPoints, getLinkShapePolicy, getPointAt, setLinkShapePolicy
allowsPointInsertion, allowsPointRemoval, getPointsCardinal
allowsPointMove, arrowContains, drawArrow, finalize, getConnectionPoints, getConnectionReferencePoint, getEndCap, getForeground, getFrom, getFromBoundingBox, getFromTransformer, getLineJoin, getLineStyle, getLineWidth, getLineWidth, getLinkConnectorConnectionPoint, getLinkPoints, getLocalTransformerOf, getMaximumLineWidth, getOpposite, getTo, getToBoundingBox, getToTransformer, getVisibleFrom, getVisibleTo, isOriented, isPersistent, makeSelection, pointsInBBox, setFrom, setLinkPoints, setTo
addActionListener, addNamedPropertyListener, allViewsRemoved, blinkingStateOn, boundingBox, callDraw, componentOrientationChanged, getAndAssociateObjectInteractor, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getToolTipBaseTextDirection, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getULocale, getZOrderIndex, hasProperty, inside, intersects, isBaseTextDirectionSensitive, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isSelectable, isVisible, localeChanged, move, move, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setInApplyToObject, setMovable, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setVisible, setZOrderIndex, toString, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGraphicBag
public static int ANIM_SPEED
public static final int MODE_TEXTURE
public static final int MODE_UNICOLOR
public static final int MODE_GRADIENT
public static final int MODE_NEON
public static final int ARROW_FILL
public static final int ARROW_OPEN
public static final int ARROW_GRADIENT
public static final int ARROW_DECORATION
public static final int DECORATION_NOTHING
public static final int DECORATION_ANIMATE
public static final int DECORATION_ROTATE
public static final int DECORATION_PROPORTIONAL_ANGLE
DECORATION_ROTATE
. This is useful for decorations
such as icons or arrowheads that must follow the slope of the link.
If the DECORATION_ROTATE
option is not set, this option
has no effect.public static final int DECORATION_RIGHT_SIDE_UP_ANGLE
DECORATION_ROTATE
. This is useful for decorations
such as labels that should not become upside down when being rotated
ca 180 degree.
If the DECORATION_ROTATE
option is not set, this option
has no effect.public static final int DECORATION_FIXED_SIZE
public static final int DECORATION_ANCHOR_TOP
public static final int DECORATION_ANCHOR_BOTTOM
public static final int DECORATION_ANCHOR_LEFT
public static final int DECORATION_ANCHOR_RIGHT
public static final int DECORATION_OVER
public static final int DECORATION_ABSOLUTE
public static final int DECORATION_FULL_RETRACT_AT_END
ARROW_DECORATION
, the
decoration position is 1
, and decoration options include
DECORATION_OVER
.public static final int DECORATION_HALF_RETRACT_AT_END
ARROW_DECORATION
, the decoration position is 1
,
and decoration options include DECORATION_OVER
.public static final int DECORATION_NO_RETRACT_AT_END
ARROW_DECORATION
, the decoration
position is 1
, and decoration options include
DECORATION_OVER
.public IlvGeneralLink()
public IlvGeneralLink(IlvGeneralLink source)
source
- The copied object.public IlvGeneralLink(IlvInputStream stream) throws IlvReadFileException
stream
- The input stream.IlvReadFileException
- if the format is not correct.public IlvGeneralLink(IlvGraphic from, IlvGraphic to)
IlvGeneralLink
.from
- The origin object.to
- The destination object.public IlvGeneralLink(IlvGraphic from, IlvGraphic to, boolean oriented)
IlvGeneralLink
.from
- The origin object.to
- The destination object.oriented
- Specifies whether an arrow is drawn at the end of the
link or not.public IlvGeneralLink(IlvGraphic from, IlvGraphic to, boolean oriented, IlvPoint[] points)
IlvGeneralLink
.from
- The origin object.to
- The destination object.oriented
- Specifies whether an arrow is drawn at the end of the
link or not.points
- The intermediate points of the link.public IlvGeneralLink(IlvGraphic from, IlvGraphic to, boolean backoriented, boolean oriented, IlvPoint[] points)
IlvGeneralLink
.from
- The origin object.to
- The destination object.backoriented
- Specifies whether an arrow is drawn at the start of
the link or not.oriented
- Specifies whether an arrow is drawn at the end of the
link or not.points
- The intermediate points of the link.public IlvGraphic copy()
copy
in class IlvSimpleLink
IlvGraphic
instance.IlvGraphic
public void setMode(int mode)
MODE_NEON
.mode
- The new mode, either MODE_TEXTURE
,
MODE_UNICOLOR
, MODE_GRADIENT
(default),
or MODE_NEON
.getMode()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public int getMode()
setMode(int)
public boolean zoomable()
false
.
For details about the purpose of this method, see
IlvGraphic.zoomable()
.
zoomable
in class IlvCrossingAwareLinkImage
IlvCrossingAwareLinkImage.isGapZoomable()
public static void setQualityLevel(int val)
val
- The quality level.
getQualityLevel()
public static int getQualityLevel()
setQualityLevel(int)
public void setOptimized(boolean optimized)
MODE_UNICOLOR
, or if the link is very thin
(link width less than 2 pixels after applying
the view's transformer). Painting is not optimized in
any of these cases:
ARROW_GRADIENT
.
Optimized mode is on by default.
In optimized mode, the actual look of the link may be slightly different in some cases, especially for thick links. If you need the links to look exactly the same as with JViews 6.0, you can turn optimized mode off.
optimized
- If true
, the code optimizations
are used, otherwise the behavior is the same as in JViews 6.0.setWave(String)
,
setCurved(double)
,
setMode(int)
,
setArrowMode(int)
,
setBorderWidth(double)
,
setCrossingMode(int)
public boolean isOptimized()
setOptimized(boolean)
public void setAlternateColor(Color c)
null
is passed, the link alternates foreground color
with this color value.
The lineStyle
property controls alternate color
dashes.
If lineStyle
is null
, alternate segments are
proportional to lineWidth
.
This property supports
IlvBlinkingColor
.
The method fires events when this property changes.
Warning: when the general link is in optimized mode (i.e
setOptimized(boolean)
is call with true
parameter), the alternating color can be ignored, depending on other
properties of the object.
c
- The new color.getAlternateColor()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public Color getAlternateColor()
setAlternateColor(java.awt.Color)
public void setArrowPosition(double value)
.5
is the middle of the link). The default position is at
the end of the link (value: 1.0
).
This method controls the position of the forward arrow, but not the
position of the backward arrow.
The method fires events when this property changes.value
- The new position.getArrowPosition()
,
setOriented(boolean)
,
setBackArrowPosition(double)
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public double getArrowPosition()
setArrowPosition(double)
public void setBackArrowPosition(double value)
.5
is the middle of the link). The default position is at
the beginning of the link (value: 0.
).
This method controls the position of the backward arrow, but not the
position of the forward arrow.
The method fires events when this property changes.value
- The new position.getBackArrowPosition()
,
setBackOriented(boolean)
,
setArrowPosition(double)
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public double getBackArrowPosition()
setArrowPosition(double)
public void setArrowRatio(double value)
1
is about twice the link width). The default value
is 1
.
This controls the size of the forward arrow and of the backward arrow,
if any.
The method fires events when this property changes.value
- The new ratio.getArrowRatio()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public double getArrowRatio()
setArrowRatio(double)
public void setInternalZoom(double value)
value
- The new internal zoom (default is 1.
).getInternalZoom()
public double getInternalZoom()
setInternalZoom(double)
public void setArrowMode(int style)
Note: the arrow is drawn only if the link is oriented. For more
information, see setOriented(boolean)
.
The backward arrow is only drawn if the link is backward oriented and
the arrow mode is ARROW_FILL
or ARROW_OPEN
.
For more information, see setBackOriented(boolean)
.
style
- The new style, either ARROW_FILL
,
ARROW_OPEN
, ARROW_GRADIENT
, or
ARROW_DECORATION
.getArrowMode()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
,
setOriented(boolean)
public int getArrowMode()
Note: the arrow is drawn only if the link is oriented. For more
information, see setOriented(boolean)
.
setArrowMode(int)
public void setArrowColor(Color value)
IlvBlinkingColor
.
The method fires events when this property changes.value
- The new color.getArrowColor()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public Color getArrowColor()
setArrowColor(java.awt.Color)
public void setBorderUpColor(Color value)
IlvBlinkingColor
.
The method fires events when this property changes.value
- The new color.setBorderDownColor(java.awt.Color)
,
getBorderUpColor()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public Color getBorderUpColor()
setBorderUpColor(java.awt.Color)
public void setBorderDownColor(Color value)
borderUpColor
, the border will be painted with both colors.
The default value is black.
This property supports
IlvBlinkingColor
.
The method fires events when this property changes.value
- The new color.getBorderDownColor()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public Color getBorderDownColor()
setBorderDownColor(java.awt.Color)
public void setBorderWidth(double value)
value
- The new width.getBorderWidth()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public double getBorderWidth()
setBorderWidth(double)
public String getWave()
setWave(java.lang.String)
public void setWave(String wave)
wave
- A formatted string describing the wave. The format
is "a/p", where "a" is an int representing the amplitude of the
wave in pixels; and "p" is an int representing the period (length)
of the wave in pixels.getWave()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void setDecorations(int index, IlvGraphic decoration)
IlvGraphic
(label, bitmap, and so on) that is drawn onto the link. It will not
zoom or receive any event. The IlvGraphic
location is ignored.
Internally, all decorations are stored in an array. The array will grow
if index
is greater than the current size.
index
- The location of the decoration.decoration
- The decoration. If null
, no decoration is added on
the link.getDecorations(int)
public IlvGraphic getDecorations(int index)
index
- The location of the decoration.setDecorations(int, IlvGraphic)
public void setDecorations(IlvGraphic[] decorations)
IlvGraphic
s
(label, bitmap, and so on) that are drawn onto the link. They will not
zoom or receive any event. The IlvGraphic
location is ignored.decorations
- The decorations. If null
, no decoration is added on
the link.getDecorations()
public IlvGraphic[] getDecorations()
setDecorations(IlvGraphic[])
public void setDecorationPositions(int index, double value)
index
- The location of the decoration.value
- The relative position. 0 means
the beginning of the link, 0.5 the middle, and 1 the end.
The default is 0.5.getDecorationPositions(int)
public double getDecorationPositions(int index)
index
- The location of the decoration.setDecorationPositions(int, double)
public void setDecorationPositions(double[] value)
value
- The relative position. 0 means
the beginning of the link, 0.5 the middle, and 1 the end. If
value is null
, then all positions are reset to the default.
The default is 0.5.getDecorationPositions()
public double[] getDecorationPositions()
setDecorationPositions(double[])
public void setDecorationOptions(int index, int value)
index
- The position of the decoration to display.value
- A bit set, composed of the following masks:
DECORATION_FIXED_SIZE
: If set, the decoration is not
zoomable.
DECORATION_ROTATE
: If set, the decoration rotates
along the link shape.
The behavior of the rotation angle depends on the options
DECORATION_PROPORTIONAL_ANGLE
and
DECORATION_RIGHT_SIDE_UP_ANGLE
.
If none of the two angle options is set, the decoration uses
rightside up angles when the option DECORATION_OVER
is
not set, and uses proportional angles when the option
DECORATION_OVER
is set.
If one of the angle options is set, the decoration uses the angle
as specified in that option.
DECORATION_PROPORTIONAL_ANGLE
:
If set in combination with DECORATION_ROTATE
,
the rotation angle is directly propertional to the slope of the link.
This is useful for decorations such as icons or arrowheads that must
follow the slope of the link.
If the DECORATION_ROTATE
option is not set, this option
has no effect.
DECORATION_RIGHT_SIDE_UP_ANGLE
:
If set in combination with DECORATION_ROTATE
,
the rotation angle keeps the decoration rightside up.
This is useful for decorations such as labels that should not become
upside down when being rotated ca 180 degree.
If the DECORATION_ROTATE
option is not set, this option
has no effect.
DECORATION_ANIMATE
: If set, and if the
animateSpeed
property is not zero, the decoration is
animated.
DECORATION_OVER
: The decoration is over the link
center.
DECORATION_ANCHOR_[LEFT|RIGHT|TOP|BOTTOM]
: Sets the
corner of the decoration to be at the middle of the link (works only
together with DECORATION_OVER
).
DECORATION_NOTHING
: Means default values (zoomable,
no rotation, no animation). This option should not be combined with
any other option.
DECORATION_ABSOLUTE
: The link no longer changes
decoration position.
DECORATION_FULL_RETRACT_AT_END
: When arrow mode is
ARROW_DECORATION
, the link stops at the decoration bounding
box (which acts as the arrow).
DECORATION_HALF_RETRACT_AT_END
: When arrow mode is
ARROW_DECORATION
, the link stops at the middle of the
decoration bounding box (which acts as the arrow).
DECORATION_NO_RETRACT_AT_END
: When arrow mode is
ARROW_DECORATION
, the link does not stop at the decoration
bounding box (which acts as the arrow).
getDecorationOptions(int)
public int getDecorationOptions(int index)
index
- The position of the decoration to return.setDecorationPositions(int, double)
public void setDecorationOptions(int[] value)
value
- The options array. If
value is null
, then all decoration options are reset to the default.
The default is 0 (no option).setDecorationOptions(int,int)
public int[] getDecorationOptions()
setDecorationOptions(int[])
public ComponentOrientation getComponentOrientation()
getComponentOrientation
in class IlvGraphic
IlvGraphic.isComponentOrientationSensitive()
public void setBaseTextDirection(int baseTextDirection)
IlvBidiUtil.INHERITED_DIRECTION
:
the base text direction is inherited from the
graphic bag that contains this object.
If this object is not contained in a graphic bag,
the base text direction is calculated from the
component orientation.
IlvBidiUtil.COMPONENT_DIRECTION
:
the base text direction is calculated from the
component orientation.
IlvBidiUtil.LEFT_TO_RIGHT
:
the base text direction is left-to-right.
IlvBidiUtil.RIGHT_TO_LEFT
:
the base text direction is right-to-left.
IlvBidiUtil.CONTEXTUAL_DIRECTION
:
the base test direction is determined from the text
that is displayed according to the standard Bidi
algorithm, if the text contains at least one character
with a strong left-to-right or right-to-left direction.
If the text doesn't contain any character with a strong
direction, the real text direction is determined from
the current component orientation of the object.
setBaseTextDirection
in interface IlvBaseTextDirectionInterface
setBaseTextDirection
in class IlvGraphic
baseTextDirection
- The base text directionIlvGraphic.baseTextDirectionChanged(int, int)
protected void setBaseTextDirectionDuringConstruction(int baseTextDirection)
setBaseTextDirectionDuringConstruction
in class IlvGraphic
baseTextDirection
- The base text directionpublic int getBaseTextDirection()
IlvBidiUtil.INHERITED_DIRECTION
:
the base text direction is inherited from the
graphic bag that contains this object.
If this object is not contained in a graphic bag,
the base text direction is calculated from the
component orientation.
IlvBidiUtil.COMPONENT_DIRECTION
:
the base text direction is calculated from the
component orientation.
IlvBidiUtil.LEFT_TO_RIGHT
:
the base text direction is left-to-right.
IlvBidiUtil.RIGHT_TO_LEFT
:
the base text direction is right-to-left.
IlvBidiUtil.CONTEXTUAL_DIRECTION
:
the base test direction is determined from the text
that is displayed according to the standard Bidi
algorithm, if the text contains at least one character
with a strong left-to-right or right-to-left direction.
If the text doesn't contain any character with a strong
direction, the real text direction is determined from
the current component orientation of the object.
getBaseTextDirection
in interface IlvBaseTextDirectionInterface
getBaseTextDirection
in class IlvGraphic
public int getResolvedBaseTextDirection()
This method is similar to getBaseTextDirection()
but determines
the value when it is inherited from a parent component
(IlvBidiUtil.INHERITED_DIRECTION
) or dependent on
the component orientation (IlvBidiUtil.COMPONENT_DIRECTION
).
Hence, there are only 3 possible return values:
IlvBidiUtil.LEFT_TO_RIGHT
:
the base text direction is left-to-right.
IlvBidiUtil.RIGHT_TO_LEFT
:
the base text direction is right-to-left.
IlvBidiUtil.CONTEXTUAL_DIRECTION
:
the base test direction is determined from the text
that is displayed according to the standard Bidi
algorithm, if the text contains at least one character
with a strong left-to-right or right-to-left direction.
If the text doesn't contain any character with a strong
direction, the real text direction is determined from
the current component orientation of the object.
getResolvedBaseTextDirection
in interface IlvBaseTextDirectionInterface
getResolvedBaseTextDirection
in class IlvGraphic
protected void invalidateBidiCache()
invalidateBidiCache
in class IlvGraphic
public void baseTextDirectionChanged(int oldBaseTextDirection, int newBaseTextDirection)
baseTextDirectionChanged
in class IlvGraphic
oldBaseTextDirection
- Resolved base text direction of this object before the change.newBaseTextDirection
- Resolved base text direction of this object after the change.IlvGraphic.isBaseTextDirectionSensitive()
public boolean isSpline()
isSpline
in class IlvLinkImage
true
if the radius
parameter of the link is 0
and the curved parameter is
not 0
.getRadius()
,
getCurved()
public void setCurved(double value)
The default value is 0.0
, that is, no curve at all.
The method fires events when this property changes.
Changing the smoothness influences the bounding box of the object.
Therefore it should be only done using an IlvApplyObject
passed to IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
.
value
- The smoothness value.getCurved()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public double getCurved()
0.0
) or curved (> 0.0
).setCurved(double)
public double getRadius()
setRadius(double)
public void setRadius(double radius)
radius
- the new radius value.public void setTexture(IlvTexture value)
MODE_TEXTURE
.
The method fires events when this property changes.value
- The texture.getTexture()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public IlvTexture getTexture()
setTexture(ilog.views.util.java2d.IlvTexture)
public void setOrthogonal(boolean orthogonal)
The orthogonal mode is disabled by default. The method fires events when this property changes.
setOrthogonal
in class IlvSimpleLink
IlvEnhancedPolylineLinkImage.isOrthogonal()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void setCrossingMode(int mode)
IlvEnhancedPolylineLinkImage.NO_CROSSINGS
-
crossings are not displayed in any particular way.
IlvEnhancedPolylineLinkImage.TUNNEL_CROSSINGS
-
crossings are displayed with a tunnel shape.
IlvEnhancedPolylineLinkImage.BRIDGE_CROSSINGS
-
crossings are displayed with a bridge shape.
IlvEnhancedPolylineLinkImage.NO_CROSSINGS
If the link is curved, waved or rounded by a radius, the crossing
mode is ignored, and no crossings are displayed.
The method fires events when this property changes.setCrossingMode
in class IlvSimpleLink
IlvEnhancedPolylineLinkImage.getCrossingMode()
,
setWave(java.lang.String)
,
setCurved(double)
,
setRadius(double)
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void setOriented(boolean oriented)
setOriented
in class IlvSimpleLink
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void setBackOriented(boolean oriented)
setBackOriented
in class IlvSimpleLink
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void setForeground(Color c)
setForeground
in class IlvSimpleLink
c
- The new color.IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void setEndCap(int endCap)
setEndCap
in class IlvSimpleLink
endCap
- The new decoration style. The values
are defined in the class IlvStroke
.
The default value is IlvStroke.CAP_SQUARE
.IlvStroke
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
,
setCrossingMode(int)
public void setLineJoin(int lineJoin)
setLineJoin
in class IlvSimpleLink
lineJoin
- The new decoration style. The values are defined
in the class IlvStroke
.
The default value is IlvStroke.JOIN_MITER
.IlvStroke
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
,
setCrossingMode(int)
public void setLineWidth(double val)
setLineWidth
in class IlvSimpleLink
val
- The new line width.IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void setLineStyle(float[] lineStyle)
setLineStyle
in class IlvSimpleLink
lineStyle
- The array of line styles.IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void setIntermediateLinkPoints(IlvPoint[] points)
PropertyEditor
with
which to specify the
array of IlvPoint
as a comma-separated list of float numbers
(that is, "x1,y1,x2,y2,x3,y3").points
- The new intermediate points.public IlvPoint[] getIntermediateLinkPoints()
null
.public void setLineStylePhase(float phase)
lineStyle
defined, the phase is proportional to lineWidth
(that is, multiplied by lineWidth*2
), so the phase should be
between 0 and 1.
The method fires events when this property changes.phase
- The phase.getLineStylePhase()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public float getLineStylePhase()
setLineStylePhase(float)
public void setBorderStyle(float[] lineStyle)
getLineStyle()
.
Alternate entries in the array represent the user space lengths
of the opaque and transparent segments of the dashes.
Note that dashed lines will only work on the Java 2 platform.
The method fires events when this property changes.lineStyle
- The array of line styles.getBorderStyle()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public float[] getBorderStyle()
setBorderStyle(float[])
public void setBorderStylePhase(float phase)
phase
- The phase.getBorderStylePhase()
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public float getBorderStylePhase()
setBorderStylePhase(float)
public void setMinimumLineWidth(double val)
val
- The new minimum width.getMinimumLineWidth()
,
setOptimized(boolean)
,
IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public double getMinimumLineWidth()
setMinimumLineWidth(double)
public void moveDecoration(int index, double x, double y, IlvTransformer t)
index
- index in the decoration array.x
- The new horizontal position of the decoration, in view coordinates.y
- The new vertical position of the decoration, in view coordinates.t
- The transformer of the view.public void moveLabel(double x, double y, IlvTransformer t)
x
- The new horizontal position of the label, in view coordinates.y
- The new vertical position of the label, in view coordinates.t
- The transformer of the view.moveDecoration(int, double, double, ilog.views.IlvTransformer)
public void translate(double dx, double dy)
applyTransform
method.translate
in class IlvGraphic
dx
- The horizontal translation factor.dy
- The vertical translation factor.IlvGraphic
,
IlvGraphic.applyTransform(IlvTransformer)
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.
Note that even if this is a public method, you should not
call it directly, you should use the write
methods of the manager.write
in interface IlvPersistentObject
write
in class IlvSimpleLink
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public IlvRect calcBoundingBox(IlvTransformer t)
IlvCrossingAwareLinkImage.boundingBox(ilog.views.IlvTransformer)
when the bounding box for the input
transformer is not internally cached.calcBoundingBox
in class IlvCrossingAwareLinkImage
protected IlvPoint[] getDrawingLinkPoints(IlvTransformer t)
IlvPolicyAwareLinkImage.getLinkPoints(ilog.views.IlvTransformer)
as the line must be shorter
to draw the end arrows correctly.getDrawingLinkPoints
in class IlvCrossingAwareLinkImage
t
- The transformer to draw the link.public double getRealLinkWidth(IlvTransformer t)
t
- The transformer.public boolean isCrossingEnabled()
true
if crossings are shown on the link.isCrossingEnabled
in class IlvCrossingAwareLinkImage
protected IlvGraphic createCrossingGraphic(int mode)
createCrossingGraphic
in class IlvEnhancedPolylineLinkImage
protected boolean mergeCrossings(double dist, double gap, double lineWidth, IlvTransformer t)
mergeCrossings
in class IlvCrossingAwareLinkImage
dist
- The distance between this crossing and the next crossing.gap
- The desired gap for the crossing.lineWidth
- The line width of the other link that crosses this link.t
- The transformer to draw the link;protected void drawCore(Graphics2D dst, IlvTransformer t)
IlvEnhancedPolylineLinkImage.draw(java.awt.Graphics, ilog.views.IlvTransformer)
after processing the
alpha transparency. It can be overridden in subclasses.drawCore
in class IlvEnhancedPolylineLinkImage
dst
- The destination Graphics
.t
- The transformation used to draw the object.IlvEnhancedPolylineLinkImage.setAlpha(float)
public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
setContainsMargin(double)
is obeyed.contains
in class IlvCrossingAwareLinkImage
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.IlvGraphic
@Deprecated public static void setContainsMargin(double margin)
IlvUtil.SetDeltaLine(double)
instead.IlvGeneralLink
to be used for contains(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)
.
The method contains(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)
returns true if the test point is within
the line shape of the link plus this margin. Enlarging this margin
has the effect that selecting the link with small line width is easier
possible when clicking near the line of the link instead of exactly on
the link. The margin is also obeyed when testing if the point
is within a link decoration.
The default margin is 1
.public int decorationHit(IlvPoint tp, IlvTransformer t)
setContainsMargin(double)
is obeyed.tp
- The point to be tested, transformed by the
transformer t
.t
- The transformer applied to the link when drawn.-1
if there is no decoration under this point.public IlvTransformer decorationTransformer(IlvTransformer t, int decorationIndex)
null
if the decoration
is null
, and throws an IllegalArgumentException
if the decoration index is outside the decoration array.t
- The transformer applied to the link.decorationIndex
- The index in the decoration array.t
is applied to the link.public IlvRect decorationBoundingBox(IlvTransformer t, int decorationIndex)
null
if the decoration is
null
, and throws an IllegalArgumentException
if
the decoration index is outside the decoration array.t
- The transformer applied to the link.decorationIndex
- The index in the decoration array.t
is applied to
the link.protected void drawArrow(Graphics dst, IlvPoint pos, double theta, IlvTransformer t)
dst
- The Graphics
on which the arrow is painted.pos
- The position where the arrow is to be painted.theta
- The direction of the arrow.t
- The current transformer.protected IlvRect arrowBBox(IlvPoint pos, double theta, IlvTransformer t)
pos
- The position of the arrow.theta
- The direction of the arrow.t
- The current transformer.protected double getArrowSize(double lineWidth, IlvTransformer t)
IlvTransformer
and lineWidth
.getArrowSize
in class IlvLinkImage
lineWidth
- The line width used to draw the object
in manager coordinates.t
- The transformer used to draw the object.t
and lineWidth
.IlvLinkImage.getLineWidth()
protected double getBackArrowSize(double lineWidth, IlvTransformer t)
IlvTransformer
and lineWidth
.getBackArrowSize
in class IlvCrossingAwareLinkImage
lineWidth
- The line width used to draw the object
in manager coordinates.t
- The transformer used to draw the object.IlvLinkImage.getLineWidth()
protected Shape createOpenArrowShape(IlvPoint pos, double theta, double length)
pos
- The position of the arrow.theta
- The rotation angle required to align the arrow with the link.length
- The size of the arrow arms.GeneralPath
.protected Shape createFillArrowShape(IlvPoint pos, double theta, double length)
pos
- The position of the arrow.theta
- The rotation angle required to align the arrow with the link.length
- The size of the arrow arms.GeneralPath
.protected Paint[] colorize(Color base, double fsize)
MODE_GRADIENT
.base
- The base color.fsize
- The real size of the link.protected Paint[] colorizeNeon(Color base, double fsize)
MODE_NEON
.base
- The base color.fsize
- The real size of the link.public IlvPoint getPolylinePosition(IlvPoint[] points, double ratio, double[] slope, IlvTransformer current)
points
- The shape, as straight lines linking the points.ratio
- The relative position in the shape. This should be
between 0 and 1. 0 means the start of the shape, 1 means the
end.slope
- If non-null
, this array of length 1 will receive the
angle of attack at the line position. This is useful to draw oriented
objects.current
- the current transformerratio
position of the shape.@Deprecated protected IlvPoint getPolylinePosition(IlvPoint[] points, double ratio, double[] slope)
getPolylinePosition(ilog.views.IlvPoint[], double,
double[], ilog.views.IlvTransformer)
points
- The shape, as straight lines linking the points.ratio
- The relative position in the shape. This should be
between 0 and 1. 0 means the start of the shape, 1 means the
end.slope
- slope If non-null
, this array of length 1 will receive the
angle of attack at the line position. This is useful to draw oriented
objects.@Deprecated public Shape getShape(IlvPoint[] points)
getShape(ilog.views.IlvPoint[], ilog.views.IlvTransformer)
points
- The points that define the link.public Shape getShape(IlvPoint[] points, IlvTransformer t)
points
- The points that define the link.t
- The transformer to draw the link.protected Shape getSimpleShape(IlvPoint[] points, IlvTransformer t)
getSimpleShape
in class IlvCrossingAwareLinkImage
points
- The transformed link points.t
- The transformer to draw the link.@Deprecated protected Shape shapeFromPoints(IlvPoint[] points)
shapeFromPoints(ilog.views.IlvPoint[], ilog.views.IlvTransformer)
points
- The points to generate the shape from.protected Shape shapeFromPoints(IlvPoint[] points, IlvTransformer current)
points
- The points to generate the shape from.current
- The current transformerprotected Shape curvedShapeFromManyPoints(IlvPoint[] points)
shapeFromPoints()
to generate a curved shape.points
- The points to generate the shape from.protected Shape roundedFromManyPoints(IlvPoint[] points, double radius, IlvTransformer current)
shapeFromPoints()
to generate a straight shape with rounded corners.points
- The points to generate the shape from.radius
- The radius of the cornercurrent
- The current transformer (to get the zoom factor)public void setAnimateSpeed(float speed)
ANIM_SPEED
. This method controls
only the threshold, that is, the part of the link reached at each
refresh speed. For example, a value of 0.1 moves a tenth of the
link length. 0.9 moves nine tenths of the link length. (This is
the same effect as one tenth backward.)
This method calls IlvGraphic.setBlinkingAction(ilog.views.java2d.IlvBlinkingAction)
to set a blinking
action on the link to implement the animation.
Note that animation works for dashes, alternate colors, and decorations. For decorations, the ratio is computed against the whole link length. For dashes and alternate colors, the line style period is used.
The method fires events when this property changes.
speed
- The new speed, between 0 and 1. 0 stops the animation.IlvSimpleLink.addPropertyChangeListener(java.beans.PropertyChangeListener)
public float getAnimateSpeed()
public IlvRect getLabelBBox(IlvTransformer t)
getLabelBBox
in interface IlvLabelInterface
t
- The transformer used to draw the graphic object.public boolean supportMultiline()
true
if the label can be a multiline label;
false
otherwise.supportMultiline
in interface IlvLabelInterface
public String getLabel()
getLabel
in interface IlvLabelInterface
public void setLabel(String label)
IlvLabelInterface
, use it. Otherwise an
IlvZoomableLabel
is created and set to slot 0 in the
decoration list.
Warning: Especially in CSS, don't specify decorations at slot 0
that do not implement the IlvLabelInterface
, or the label
may be lost.setLabel
in interface IlvLabelInterface
label
- The new label.public void addObject(IlvGraphic graphic, boolean redraw)
addObject
in interface IlvGraphicBag
graphic
- The graphic object.redraw
- If true
the object is redrawn.public void removeObject(IlvGraphic graphic, boolean redraw)
removeObject
in interface IlvGraphicBag
graphic
- The graphic object.redraw
- If true
the object is redrawn.public IlvGraphicEnumeration getObjects()
IlvGraphicBag
interface.
Do not call this method directly.getObjects
in interface IlvGraphicBag
IlvGraphic
objects, or
null
.public void reDrawObj(IlvGraphic graphic)
reDrawObj
in interface IlvGraphicBag
graphic
- The graphic object.public void reDrawRegion(IlvRegion region)
reDrawRegion
in interface IlvGraphicBag
region
- The region to redraw.public void reshapeObject(IlvGraphic graphic, IlvRect newrect, boolean redraw)
reshapeObject
in interface IlvGraphicBag
graphic
- The graphic object.newrect
- The new desired bounding rectangle.redraw
- If true
the object is redrawn.public void moveObject(IlvGraphic graphic, double x, double y, boolean redraw)
moveObject
in interface IlvGraphicBag
graphic
- The graphic object.x
- The new desired x position.y
- The new desired y position.redraw
- If true
the object is redrawn.public void applyToObject(IlvGraphic graphic, IlvApplyObject f, Object arg, boolean redraw)
applyToObject
in interface IlvGraphicBag
graphic
- The graphic object.f
- The method to apply.arg
- The arguments passed to the method f
.redraw
- If true
the object is redrawn.public boolean setObjectName(IlvGraphic graphic, String name)
setObjectName
in interface IlvGraphicBag
graphic
- The graphic object.name
- The new name.true
if the name can be changed.public IlvGraphic getObject(String name)
null
.getObject
in interface IlvGraphicBag
name
- The graphic object name.public void updateLabelingModel(IlvSDMEngine engine, IlvAnnealingLabelLayout layout, ilog.views.sdm.internal.labellayout.IlvSDMLabelingModel model, Object obj, IlvGraphic graphic)
updateLabelingModel
in interface ilog.views.sdm.internal.labellayout.IlvSDMLabeledNode
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.