ilog.views.prototypes
Class IlvGroupFrame

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.prototypes.IlvGroupFrame
All Implemented Interfaces:
IlvPersistentObject, Transferable, Serializable
Direct Known Subclasses:
IlvExpandCollapseRenderer.ExpandableNode

public class IlvGroupFrame
extends IlvGraphic

Instances of the class IlvGroupFrame are graphic objects used to display a rectangle around an IlvGroup object inside a manager. When a group frame is moved or resized, the transformation is applied to all the elements belonging to the group.

The main purpose of IlvGroupFrame objects is to provide visual feedback when IlvGroup objects are selected. The select interactor creates instances of this class to show that a group is selected. It is also possible for an application to explicitly create an IlvGroupFrame object so that groups are surrounded with a rectangle each time they are selected.

See Also:
IlvGroup, IlvGroupBag.selectGroup(ilog.views.prototypes.IlvGroup, boolean), Serialized Form

Constructor Summary
IlvGroupFrame(IlvGroup group)
          Creates a new IlvGroupFrame.
IlvGroupFrame(IlvInputStream in)
          Reads the group frame from an IlvInputStream stream.
 
Method Summary
 void applyTransform(IlvTransformer t)
          Applies a transformer to this group frame by setting the transformation value for the group.
 IlvRect boundingBox(IlvTransformer t)
          The bounding box of an IlvGroupGraphic is the union of all the bounding boxes of the graphic elements in the group.
 IlvGraphic copy()
          Returns a copy of the group frame.
 void draw(Graphics dst, IlvTransformer t)
          Draws a rectangle around the group.
 IlvGroup getGroup()
          Returns the group to which the group frame is associated.
 void setGraphicBag(IlvGraphicBag bag)
          Changes the bag that contains the object.
 void write(IlvOutputStream out)
          Writes the group frame to an IlvOutputStream.
 boolean zoomable()
          The IlvGroupFrame objects are not zoomable.
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, contains, getAndAssociateObjectInteractor, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, hasProperty, inside, intersects, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isPersistent, isSelectable, isVisible, makeSelection, move, move, moveResize, notifyObjectInteractorToManager, processActionEvent, reDraw, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setEditable, setFillOn, setForeground, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipText, setVisible, toString, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvGroupFrame

public IlvGroupFrame(IlvGroup group)
Creates a new IlvGroupFrame.

Parameters:
group - the group to which the group frame is associated.

IlvGroupFrame

public IlvGroupFrame(IlvInputStream in)
              throws IlvReadFileException
Reads the group frame from an IlvInputStream stream. This constructor must be called by the input constructors of subclasses.

Parameters:
in - The input stream.
Throws:
IlvReadFileException - if the stream format is not correct.
Method Detail

write

public void write(IlvOutputStream out)
           throws IOException
Writes the group frame to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvGraphic
Parameters:
out - The output stream.
Throws:
IOException - thrown when an exception occurs during the write operation for this object.

copy

public IlvGraphic copy()
Returns a copy of the group frame.

Specified by:
copy in class IlvGraphic
Returns:
A copy of this IlvGraphic instance.
See Also:
IlvGraphic

draw

public void draw(Graphics dst,
                 IlvTransformer t)
Draws a rectangle around the group. This method does not draw the graphic elements in the group. They are drawn directly by the manager.

Specified by:
draw in class IlvGraphic
Parameters:
dst - The destination Graphics.
t - The transformation used to draw the object.
See Also:
IlvGraphic.boundingBox(ilog.views.IlvTransformer), IlvGraphic.zoomable(), IlvGraphic

boundingBox

public IlvRect boundingBox(IlvTransformer t)
The bounding box of an IlvGroupGraphic is the union of all the bounding boxes of the graphic elements in the group.

Specified by:
boundingBox in class IlvGraphic
Parameters:
t - The transformer used to draw the object. If the transformer is null, the bounding box for the identity transformer is returned.
See Also:
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer), IlvGraphic.zoomable(), IlvGraphic

applyTransform

public void applyTransform(IlvTransformer t)
Applies a transformer to this group frame by setting the transformation value for the group. This value is recursively propagated to all the graphic elements belonging to the group.

Specified by:
applyTransform in class IlvGraphic
Parameters:
t - The transformation to be applied.
See Also:
IlvGraphic

setGraphicBag

public void setGraphicBag(IlvGraphicBag bag)
Changes the bag that contains the object. For example, this method is used when the object is added to, or removed from an IlvGraphicBag such as an IlvManager. You should not call this method directly unless you are creating a new type of bag.

Overrides:
setGraphicBag in class IlvGraphic
Parameters:
bag - The graphic bag.
See Also:
IlvGraphic

getGroup

public IlvGroup getGroup()
Returns the group to which the group frame is associated.


zoomable

public boolean zoomable()
The IlvGroupFrame objects are not zoomable.

Overrides:
zoomable in class IlvGraphic
Returns:
false.
See Also:
IlvGraphic, IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer), IlvGraphic.boundingBox(IlvTransformer), IlvManager


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.