Package org.opensourcephysics.display
Class BoundedImage
java.lang.Object
org.opensourcephysics.display.AbstractInteractive
org.opensourcephysics.display.InteractiveShape
org.opensourcephysics.display.BoundedShape
org.opensourcephysics.display.BoundedImage
- All Implemented Interfaces:
ImageObserver,Drawable,Interactive,Measurable,Selectable
- Direct Known Subclasses:
BoundedTextLine
An image is bounded by hot spots for dragging and resizing.
- Version:
- 1.0
- Author:
- W. Christian
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensourcephysics.display.BoundedShape
BoundedShape.BoundedShapeLoaderNested classes/interfaces inherited from class org.opensourcephysics.display.InteractiveShape
InteractiveShape.InteractiveShapeLoader -
Field Summary
FieldsFields inherited from class org.opensourcephysics.display.InteractiveShape
edgeColor, height, pixelPt, pixelSized, shape, shapeClass, theta, toPixels, trIS, width, xoff, yoffFields inherited from class org.opensourcephysics.display.AbstractInteractive
color, x, yFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionBoundedImage(Image image, double x, double y) Constructs a bounded image centered at the given location. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(DrawingPanel panel, Graphics g) Draws the image.booleanimageUpdate(Image img, int infoflags, int x, int y, int width, int height) Methods inherited from class org.opensourcephysics.display.BoundedShape
createBoundedArrow, createBoundedCenteredArrow, createBoundedCircle, createBoundedEllipse, createBoundedImage, createBoundedRectangle, createBoundedTriangle, findInteractive, getBounds2D, getLoader, getPreferredCursor, isHeightDrag, isInside, isRotateDrag, isSelected, isWidthDrag, isXYDrag, setHeightDrag, setRotateDrag, setSelected, setWidthDrag, setXYDrag, toggleSelected, toStringMethods inherited from class org.opensourcephysics.display.InteractiveShape
contains, createArrow, createCenteredArrow, createCircle, createEllipse, createImage, createRectangle, createSquare, createTextLine, createTriangle, getHeight, getPixelPt, getRotateInstance, getRotateInstance, getScaleInstance, getShape, getTranslateInstance, getWidth, getXMax, getXMin, getYMax, getYMin, isMeasured, setHeight, setMarkerColor, setMeasured, setOffset, setPixelSized, setTheta, setWidth, setX, setXY, setY, tranform, transformMethods inherited from class org.opensourcephysics.display.AbstractInteractive
getX, getY, isEnabled, setEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.Interactive
getX, getY, isEnabled, isInteractive, setEnabled, setX, setXY, setYMethods inherited from interface org.opensourcephysics.display.Measurable
getXMax, getXMin, getYMax, getYMin, isMeasured
-
Field Details
-
image
-
-
Constructor Details
-
BoundedImage
Constructs a bounded image centered at the given location.- Parameters:
x- doubley- doubleimage- Image
-
-
Method Details
-
draw
Draws the image.- Specified by:
drawin interfaceDrawable- Overrides:
drawin classBoundedShape- Parameters:
panel- the world in which the arrow is viewedg- the graphics context upon which to draw
-
imageUpdate
- Specified by:
imageUpdatein interfaceImageObserver
-