org.jplot2d.element
Interface MovableComponent
-
- All Superinterfaces:
- Element, PComponent
- All Known Subinterfaces:
- Annotation, AnnotationEx, CoordinateAnnotation, CoordinateAnnotationEx, HLineAnnotation, HLineAnnotationEx, HStripAnnotation, HStripAnnotationEx, Legend, LegendEx, LineAnnotation, PointAnnotation, PointAnnotationEx, RectangleAnnotation, RectangleAnnotationEx, StripAnnotation, SymbolAnnotation, SymbolAnnotationEx, Title, TitleEx, VLineAnnotation, VLineAnnotationEx, VStripAnnotation, VStripAnnotationEx
- All Known Implementing Classes:
- AnnotationImpl, CoordinateAnnotationImpl, HLineAnnotationImpl, HStripAnnotationImpl, LegendImpl, PointAnnotationImpl, RectangleAnnotationImpl, SymbolAnnotationImpl, TitleImpl, VLineAnnotationImpl, VStripAnnotationImpl
public interface MovableComponent extends PComponent
Defines some methods for movable component.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleanisMovable()Returnstrueif the component is movable by mouse dragging.voidsetLocation(double x, double y)Moves this component to a new location.voidsetLocation(java.awt.geom.Point2D loc)Moves this component to a new location.voidsetMovable(boolean movable)Set if the component is movable by mouse dragging.-
Methods inherited from interface org.jplot2d.element.PComponent
getBounds, getColor, getEffectiveFont, getFontName, getFontScale, getFontSize, getFontStyle, getLocation, getPaperTransform, getParent, getSelectableBounds, getSize, getZOrder, isCacheable, isSelectable, isVisible, setCacheable, setColor, setFont, setFontName, setFontScale, setFontSize, setFontStyle, setSelectable, setVisible, setZOrder
-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId
-
-
-
-
Method Detail
-
isMovable
boolean isMovable()
Returnstrueif the component is movable by mouse dragging. Only selectable component can be movable.- Returns:
trueif movable
-
setMovable
void setMovable(boolean movable)
Set if the component is movable by mouse dragging.- Parameters:
movable-trueif movable
-
setLocation
void setLocation(java.awt.geom.Point2D loc)
Moves this component to a new location. The location is specified by point in the parent's paper coordinate space.- Parameters:
loc- the base point given in the paper coordinate space
-
setLocation
void setLocation(double x, double y)Moves this component to a new location.- Parameters:
x- the x-coordinate of the new locationy- the y-coordinate of the new location
-
-
DMelt 3.0 © DataMelt by jWork.ORG