public class IlvDefaultLinkBundleFrame extends Object implements IlvLinkBundleFrame, Serializable, IlvPersistentObject
IlvLinkBundle
.
The IlvDefaultLinkBundleFrame
class defines
the default frame that is drawn around an IlvLinkBundle
when
this link bundle is added into another link bundle or into a grapher.IlvLinkBundle.setFrame(ilog.views.graphic.linkbundle.IlvLinkBundleFrame)
,
setBackground(java.awt.Paint)
,
setMargin(double)
,
Serialized FormConstructor and Description |
---|
IlvDefaultLinkBundleFrame()
Creates a default link bundle frame.
|
IlvDefaultLinkBundleFrame(IlvDefaultLinkBundleFrame source)
Creates an
IlvDefaultLinkBundleFrame
by copying the specified one. |
IlvDefaultLinkBundleFrame(IlvInputStream stream)
Reads an
IlvDefaultLinkBundleFrame from an
IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
IlvRect |
boundingBox(IlvLinkBundle linkBundle,
IlvTransformer transformer)
Returns the bounding rectangle of the frame for a given link bundle
and transformer.
|
IlvRect |
boundingBoxExpandCollapseIcon(IlvLinkBundle linkBundle,
IlvTransformer t)
Returns the bounding box of the expand/collapse icon for a given
link bundle.
|
boolean |
contains(IlvLinkBundle linkBundle,
IlvPoint p,
IlvPoint tp,
IlvTransformer transformer)
Tests if a point lies within the outline of the frame.
|
IlvLinkBundleFrame |
copy()
Creates an
IlvDefaultLinkBundleFrame by copying
this one. |
void |
draw(IlvLinkBundle linkBundle,
Graphics g,
IlvTransformer t)
Draws the frame for a given link bundle.
|
void |
drawExpandCollapseIcon(IlvLinkBundle linkBundle,
Graphics g,
IlvTransformer t)
Draws the expand/collapse icon for a given link bundle.
|
void |
drawSelected(IlvLinkBundle linkBundle,
Graphics g,
IlvTransformer t,
IlvLinkBundleSelection sel)
Draws the frame for a given link bundle.
|
IlvPoint |
getAbsoluteExpandCollapseIconPosition()
Returns the absolute position of the icon that represents
the expand or collapse state of the frame.
|
Paint |
getBackground()
Returns the
Paint object used to draw the background of the
link bundle when it is not selected. |
IlvGraphic |
getExpandCollapseIcon()
Returns the icon that represents the expand or collapse state of the
frame.
|
protected IlvPoint |
getExpandCollapseIconPosition(IlvLinkBundle linkBundle,
IlvTransformer t)
Calculates the position of the expand/collapse icon at the link bundle.
|
double |
getMargin()
Returns the margin.
|
double |
getMargin(IlvLinkBundle linkBundle,
IlvTransformer t)
Returns the margin of the specified link bundle.
|
IlvPoint |
getRelativeExpandCollapseIconPosition()
Returns the relative position of the icon that represents
the expand or collapse state of the frame.
|
boolean |
isShowingExpandCollapseIcon()
Returns whether the icon that represents the expand or collapse state
of the frame is shown.
|
void |
setAbsoluteExpandCollapseIconPosition(IlvPoint p)
Sets the absolute position of the icon that represents
the expand or collapse state of the frame.
|
void |
setBackground(Paint p)
Changes the
Paint object used to draw the background of the
link bundle. |
void |
setExpandCollapseIcon(IlvGraphic g)
Sets the icon that represents the expand or collapse state of the
frame.
|
void |
setExpandCollapseIconPosition(double parallelRelative,
double perpendicularRelative,
double parallelAbsolute,
double perpendicularAbsolute)
Sets the position of the icon that represents the expand or collapse
state of the frame.
|
void |
setMargin(double margin)
Sets the margin.
|
void |
setRelativeExpandCollapseIconPosition(IlvPoint p)
Sets the relative position of the icon that represents
the expand or collapse state of the frame.
|
void |
setShowingExpandCollapseIcon(boolean show)
Sets whether the icon that represents the expand or collapse state
of the frame is shown.
|
void |
write(IlvOutputStream stream)
Writes the frame to an
IlvOutputStream . |
public IlvDefaultLinkBundleFrame()
public IlvDefaultLinkBundleFrame(IlvDefaultLinkBundleFrame source)
IlvDefaultLinkBundleFrame
by copying the specified one.source
- The origin of the copy.copy()
public IlvDefaultLinkBundleFrame(IlvInputStream stream) throws IOException, IlvReadFileException
IlvDefaultLinkBundleFrame
from an
IlvInputStream
.stream
- The input stream.IOException
IlvReadFileException
public IlvLinkBundleFrame copy()
IlvDefaultLinkBundleFrame
by copying
this one.copy
in interface IlvLinkBundleFrame
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public double getMargin(IlvLinkBundle linkBundle, IlvTransformer t)
getMargin
in interface IlvLinkBundleFrame
linkBundle
- The link bundle.t
- The transformer used to draw the link bundle and the frame.public IlvRect boundingBox(IlvLinkBundle linkBundle, IlvTransformer transformer)
boundingBox
in interface IlvLinkBundleFrame
linkBundle
- The link bundle.transformer
- The transformer used to draw the link bundle.public double getMargin()
public void setMargin(double margin)
public Paint getBackground()
Paint
object used to draw the background of the
link bundle when it is not selected.setBackground(java.awt.Paint)
public void setBackground(Paint p)
Paint
object used to draw the background of the
link bundle.getBackground()
public void setExpandCollapseIcon(IlvGraphic g)
public IlvGraphic getExpandCollapseIcon()
public boolean isShowingExpandCollapseIcon()
public void setShowingExpandCollapseIcon(boolean show)
setExpandCollapseIcon(ilog.views.IlvGraphic)
to install or deinstall the icon.public void setExpandCollapseIconPosition(double parallelRelative, double perpendicularRelative, double parallelAbsolute, double perpendicularAbsolute)
parallelRelative
- The relative position parallel to the link flow.perpendicularRelative
- The relative position perpendicular to the
link flow.parallelAbsolute
- The absolute position parallel to the link flow.perpendicularAbsolute
- The absolute position perpendicular to the
link flow.public final IlvPoint getRelativeExpandCollapseIconPosition()
setExpandCollapseIconPosition(double, double, double, double)
public void setRelativeExpandCollapseIconPosition(IlvPoint p)
setExpandCollapseIconPosition(double, double, double, double)
public final IlvPoint getAbsoluteExpandCollapseIconPosition()
setExpandCollapseIconPosition(double, double, double, double)
public void setAbsoluteExpandCollapseIconPosition(IlvPoint p)
setExpandCollapseIconPosition(double, double, double, double)
public void draw(IlvLinkBundle linkBundle, Graphics g, IlvTransformer t)
draw
in interface IlvLinkBundleFrame
linkBundle
- The link bundle.g
- The Graphics used to draw the frame.t
- The transformer used to draw the frame.public void drawSelected(IlvLinkBundle linkBundle, Graphics g, IlvTransformer t, IlvLinkBundleSelection sel)
IlvLinkBundleSelection
.drawSelected
in interface IlvLinkBundleFrame
linkBundle
- The link bundle.g
- The Graphics used to draw the frame.t
- The transformer used to draw the frame.sel
- The selection object of the link bundle.public void drawExpandCollapseIcon(IlvLinkBundle linkBundle, Graphics g, IlvTransformer t)
drawExpandCollapseIcon
in interface IlvLinkBundleFrame
linkBundle
- The link bundle.g
- The Graphics used to draw the frame.t
- The transformer used to draw the frame.public IlvRect boundingBoxExpandCollapseIcon(IlvLinkBundle linkBundle, IlvTransformer t)
null
if there is not
expand/collapse icon.boundingBoxExpandCollapseIcon
in interface IlvLinkBundleFrame
linkBundle
- The link bundle.t
- The transformer used to draw the frame.protected IlvPoint getExpandCollapseIconPosition(IlvLinkBundle linkBundle, IlvTransformer t)
linkBundle
- The link bundle.t
- The transformer used to draw the frame.public boolean contains(IlvLinkBundle linkBundle, IlvPoint p, IlvPoint tp, IlvTransformer transformer)
contains
in interface IlvLinkBundleFrame
linkBundle
- The link bundle.p
- The point to be tested.tp
- The point p
transformed by the transformer t
.transformer
- The transformation that is used to draw the frame.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.