Package com.bc.ceres.swing.figure
Interface Handle
- All Superinterfaces:
Cloneable
,Figure
,Restorable
,ShapeFigure
- All Known Implementing Classes:
AbstractHandle
,PointHandle
,RotateHandle
,ScaleHandle
,VertexHandle
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 shape
and bounds
returned by handles are in view coordinates. This is in contrast to
figures
, 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 Handle
implementation from AbstractHandle
.
- Since:
- Ceres 0.10
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.bc.ceres.swing.figure.Figure
Figure.Rank
-
Method Summary
Modifier and TypeMethodDescriptionThe bounds of the handle.getShape()
Gets the shape (geometry) for this figure.void
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 Details
-
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:
getShape
in interfaceShapeFigure
- Returns:
- The shape in view coordinates.
-
setShape
Sets the shape (geometry) for this figure.- Specified by:
setShape
in interfaceShapeFigure
- Parameters:
shape
- The shape in view coordinates.
-
getBounds
Rectangle2D getBounds()The bounds of the handle.
-