public class IlvDefaultGraphicManagerFrame extends Object implements ilog.views.internal.IlvGraphicManagerFrame, IlvPersistentObject, IlvGraphicBag
IlvGrapher
objects that represent subgraphs. The graphic border takes a graphic
object and draws it around the manager.
This class is public only to allow saving in an IVL file the contents of a grapher associated with an SDM engine and containing expandable nodes.
Constructor and Description |
---|
IlvDefaultGraphicManagerFrame(IlvGraphic frameGraphic,
IlvGraphic minusGraphic,
int minusGraphicPosition,
double left,
double top,
double right,
double bottom,
boolean zoomable)
Creates a new instance of
IlvDefaultGraphicManagerFrame . |
IlvDefaultGraphicManagerFrame(IlvInputStream stream)
Reads the border from an IVL 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.
|
boolean |
contains(IlvManager manager,
IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the outline of the border.
|
IlvManagerFrame |
copy()
Creates a new border by copying this one.
|
void |
draw(IlvManager manager,
IlvRect bbox,
Graphics g,
IlvTransformer t)
Draws the border.
|
double |
getBottomMargin(IlvManager manager,
IlvTransformer t)
Returns the margin on the bottom of the specified manager.
|
IlvGraphic |
getFrameGraphic()
Returns the graphic object that this frame delegates to.
|
IlvGraphicBag |
getGraphicBag()
Returns the parent grapher.
|
double |
getLeftMargin(IlvManager manager,
IlvTransformer t)
Returns the margin on the left of the specified manager.
|
IlvGraphic |
getObject(String name)
Returns the graphic object with that name if exists in the bag,
otherwise returns
null . |
IlvGraphicEnumeration |
getObjects()
Implementation of the
IlvGraphicBag interface. |
double |
getRightMargin(IlvManager manager,
IlvTransformer t)
Returns the margin on the right of the specified manager.
|
double |
getTopMargin(IlvManager manager,
IlvTransformer t)
Returns the margin on top of the specified manager.
|
boolean |
isOpaque(IlvManager manager)
Returns
true . |
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.
|
void |
resizeGraphic(IlvTransformer t,
IlvRect bbox)
Resizes the graphic objects drawn by the frame according to
the bounding box of the manager.
|
boolean |
setObjectName(IlvGraphic graphic,
String name)
Changes the name of a graphic object.
|
void |
write(IlvOutputStream stream)
Writes the border to an IVL stream.
|
public IlvDefaultGraphicManagerFrame(IlvGraphic frameGraphic, IlvGraphic minusGraphic, int minusGraphicPosition, double left, double top, double right, double bottom, boolean zoomable)
IlvDefaultGraphicManagerFrame
.public IlvDefaultGraphicManagerFrame(IlvInputStream stream) throws IlvReadFileException, IOException
stream
- The input stream.IlvReadFileException
IOException
public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public IlvGraphic getFrameGraphic()
getFrameGraphic
in interface ilog.views.internal.IlvGraphicManagerFrame
public IlvManagerFrame copy()
copy
in interface IlvManagerFrame
public double getTopMargin(IlvManager manager, IlvTransformer t)
getTopMargin
in interface IlvManagerFrame
manager
- The manager.t
- The transformer used to draw the manager and the border.public double getBottomMargin(IlvManager manager, IlvTransformer t)
getBottomMargin
in interface IlvManagerFrame
manager
- The manager.t
- The transformer used to draw the manager and the border.public double getRightMargin(IlvManager manager, IlvTransformer t)
getRightMargin
in interface IlvManagerFrame
manager
- The manager.t
- The transformer used to draw the manager and the border.public double getLeftMargin(IlvManager manager, IlvTransformer t)
getLeftMargin
in interface IlvManagerFrame
manager
- The manager.t
- The transformer used to draw the manager and the border.public boolean isOpaque(IlvManager manager)
true
.isOpaque
in interface IlvManagerFrame
manager
- The manager.public void draw(IlvManager manager, IlvRect bbox, Graphics g, IlvTransformer t)
draw
in interface IlvManagerFrame
manager
- The manager.bbox
- The bounding box of the manager.g
- The Graphics
used to draw the border.t
- The transformer used to draw the border.public void resizeGraphic(IlvTransformer t, IlvRect bbox)
This method is normally called by the draw(ilog.views.IlvManager, ilog.views.IlvRect, java.awt.Graphics, ilog.views.IlvTransformer)
method,
it can be called directly to ensure that the frame graphic has the
correct size before it is drawn.
resizeGraphic
in interface ilog.views.internal.IlvGraphicManagerFrame
t
- The current transformer.bbox
- The bounding box of the manager.public boolean contains(IlvManager manager, IlvPoint p, IlvPoint tp, IlvTransformer t)
contains
in interface IlvManagerFrame
manager
- The manager.p
- The point to be tested.tp
- The point p
transformed by the transformer t
.t
- The transformation that is used to draw the border.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 IlvGraphicBag getGraphicBag()
getGraphicBag
in interface IlvGraphicBag
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.