Package com.bc.ceres.swing.figure
Interface Handle
-
- All Superinterfaces:
Cloneable,Figure,Restorable,ShapeFigure
- All Known Implementing Classes:
AbstractHandle,PointHandle,RotateHandle,ScaleHandle,VertexHandle
public interface Handle extends ShapeFigure
Handles are shown on figures vertices or boundaries. Usually they when figures are selected. Various handle types may be used to modify a figure's geometry, e.g. resize, rotate or move figures or their vertices.Important note: The
shapeandboundsreturned by handles are in view coordinates. This is in contrast tofigures, which return these properties in model coordinates.Clients should not implement this interface directly, because it may change in the future. Instead they should derive their
Handleimplementation fromAbstractHandle.- Since:
- Ceres 0.10
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.bc.ceres.swing.figure.Figure
Figure.Rank
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Rectangle2DgetBounds()The bounds of the handle.CursorgetCursor()Point2DgetLocation()ShapegetShape()Gets the shape (geometry) for this figure.voidsetShape(Shape shape)Sets the shape (geometry) for this figure.-
Methods inherited from interface com.bc.ceres.swing.figure.Figure
addChangeListener, addFigure, addFigure, addFigures, addSegment, clone, contains, createHandles, dispose, draw, getChangeListeners, getEffectiveStyle, getFigure, getFigure, getFigureCount, getFigureIndex, getFigures, getFigures, getMaxSelectionStage, getNormalStyle, getRank, getSegment, getSelectedStyle, isCloseTo, isCollection, isSelectable, isSelected, move, removeAllFigures, removeChangeListener, removeFigure, removeFigures, removeSegment, rotate, scale, setNormalStyle, setSegment, setSelected, setSelectedStyle
-
Methods inherited from interface com.bc.ceres.swing.undo.Restorable
createMemento, setMemento
-
-
-
-
Method Detail
-
getLocation
Point2D getLocation()
- Returns:
- The current location in model coordinates.
-
getCursor
Cursor getCursor()
- Returns:
- The mouse cursor that will appear if users point the mouse over a handle.
-
getShape
Shape getShape()
Gets the shape (geometry) for this figure.- Specified by:
getShapein interfaceShapeFigure- Returns:
- The shape in view coordinates.
-
setShape
void setShape(Shape shape)
Sets the shape (geometry) for this figure.- Specified by:
setShapein interfaceShapeFigure- Parameters:
shape- The shape in view coordinates.
-
getBounds
Rectangle2D getBounds()
The bounds of the handle.
-
-