ptolemy.vergil.toolbox
Class AttributeBoundsManipulator

java.lang.Object
  extended bydiva.canvas.AbstractFigure
      extended bydiva.canvas.AbstractFigureContainer
          extended bydiva.canvas.FigureDecorator
              extended bydiva.canvas.interactor.Manipulator
                  extended bydiva.canvas.interactor.BoundsManipulator
                      extended byptolemy.vergil.toolbox.AttributeBoundsManipulator
All Implemented Interfaces:
CanvasComponent, Figure, FigureContainer, FigureSet, UserObjectContainer, VisibleComponent

public class AttributeBoundsManipulator
extends BoundsManipulator

This is a bounds manipulator supporting resizable icons. It records the new size when the mouse is released, and supports snap to grid.

Since:
Ptolemy II 4.0
Version:
$Id: AttributeBoundsManipulator.java,v 1.9.2.1 2004/07/19 04:43:54 cxh Exp $
Author:
Edward A. Lee
Accepted Rating:
Red (johnr)
Proposed Rating:
Red (eal)

Constructor Summary
AttributeBoundsManipulator(NamedObj container)
          Construct a new bounds manipulator.
 
Method Summary
 void mouseReleased(LayerEvent e)
          Make a persistent record of the new size by issuing a change request.
 FigureDecorator newInstance(Figure f)
          Create a new instance of this manipulator.
 void setSnapResolution(double resolution)
          Set the snap resolution.
 
Methods inherited from class diva.canvas.interactor.BoundsManipulator
getDragInteractor, getGeometry, refresh, setChild, setDragInteractor
 
Methods inherited from class diva.canvas.interactor.Manipulator
addGrabHandle, clearGrabHandles, getBounds, getGrabHandleFactory, getHandleInteractor, isRepainting, paint, pick, relocateGrabHandles, removeGrabHandle, repaint, repaint, repaintAlready, setGrabHandleFactory, setHandleFilter, setHandleInteractor, setRepainting
 
Methods inherited from class diva.canvas.FigureDecorator
add, contains, figures, figuresFromBack, figuresFromFront, getChild, getContainer, getDecoratedFigure, getFigureCount, getShape, hit, remove, replaceChild, transform, translate
 
Methods inherited from class diva.canvas.AbstractFigureContainer
decorate, pick, undecorate
 
Methods inherited from class diva.canvas.AbstractFigure
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, setInteractor, setParent, setToolTipText, setUserObject, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface diva.canvas.VisibleComponent
isVisible, paint, setVisible
 
Methods inherited from interface diva.canvas.CanvasComponent
getParent, getTransformContext
 

Constructor Detail

AttributeBoundsManipulator

public AttributeBoundsManipulator(NamedObj container)
Construct a new bounds manipulator.

Parameters:
container - The container of the icon to be manipulated.
Method Detail

mouseReleased

public void mouseReleased(LayerEvent e)
Make a persistent record of the new size by issuing a change request.

Overrides:
mouseReleased in class BoundsManipulator
Parameters:
e - The mouse event.

newInstance

public FigureDecorator newInstance(Figure f)
Create a new instance of this manipulator. The new instance will have the same grab handle, and interactor for grab-handles. This is typically called on the prototype to yield a decorator that gets displayed while the object is selected.

Overrides:
newInstance in class BoundsManipulator

setSnapResolution

public void setSnapResolution(double resolution)
Set the snap resolution.

Parameters:
resolution - The snap resolution.