ptolemy.vergil.toolbox
Class AttributeBoundsManipulator
java.lang.Object
diva.canvas.AbstractFigure
diva.canvas.AbstractFigureContainer
diva.canvas.FigureDecorator
diva.canvas.interactor.Manipulator
diva.canvas.interactor.BoundsManipulator
ptolemy.vergil.toolbox.AttributeBoundsManipulator
- All Implemented Interfaces:
- CanvasComponent, Figure, FigureContainer, FigureSet, VisibleComponent, UserObjectContainer
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 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Edward A. Lee
- Accepted Rating:
- Proposed Rating:
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.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 |
_instanceDecorator
private FigureDecorator _instanceDecorator
_container
private NamedObj _container
_resizer
private AttributeBoundsManipulator.Resizer _resizer
AttributeBoundsManipulator
public AttributeBoundsManipulator(NamedObj container)
- Construct a new bounds manipulator.
- Parameters:
container
- The container of the icon to be manipulated.
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.