Package edu.macalester.graphics.ui
Class TextField
java.lang.Object
edu.macalester.graphics.GraphicsObject
edu.macalester.graphics.ui.TextField
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
changed()
Triggers a notifications to observers that this object's appearance has changed.protected void
For internal use.Returns the bounding box of this graphics object in its local coordinates.For internal use only.protected Object
For internal use only.getText()
void
void
setBackground
(Color color) void
boolean
testHitInLocalCoordinates
(double x, double y) Tests whether the given point is inside the boundary or interior of this object’s shape.toString()
Methods inherited from class edu.macalester.graphics.GraphicsObject
addObserver, equals, getAnchor, getBoundsInParent, getCanvas, getCenter, getElementAt, getElementAtLocalCoordinates, getHeight, getPosition, getRotation, getScale, getScaleX, getScaleY, getSize, getSizeInParent, getWidth, getX, getY, hashCode, isInBounds, moveBy, moveBy, removeObserver, renderToBuffer, rotateBy, setAnchor, setAnchor, setCenter, setCenter, setPosition, setPosition, setRotation, setScale, setScale, setScale, setX, setY, testHit
-
Constructor Details
-
TextField
public TextField()
-
-
Method Details
-
getText
-
setText
-
onChange
-
toString
-
setBackground
-
getEmbeddedComponent
Description copied from class:GraphicsObject
For internal use only. Supports UI components.- Overrides:
getEmbeddedComponent
in classGraphicsObject
-
changed
protected void changed()Description copied from class:GraphicsObject
Triggers a notifications to observers that this object's appearance has changed. Subclasses should call this whenever anything changes that would alter this object's appearance.- Overrides:
changed
in classGraphicsObject
-
drawInLocalCoordinates
Description copied from class:GraphicsObject
For internal use. Draws this graphics object on the screen in its local coordinates, without rotation or scaling.- Specified by:
drawInLocalCoordinates
in classGraphicsObject
-
testHitInLocalCoordinates
public boolean testHitInLocalCoordinates(double x, double y) Description copied from class:GraphicsObject
Tests whether the given point is inside the boundary or interior of this object’s shape. The point is in this object’s local coordinates.- Specified by:
testHitInLocalCoordinates
in classGraphicsObject
-
getBounds
Description copied from class:GraphicsObject
Returns the bounding box of this graphics object in its local coordinates.- Specified by:
getBounds
in classGraphicsObject
-
getEqualityAttributes
Description copied from class:GraphicsObject
For internal use only. Used to compute equals() and hashCode(). Returns an object whose equals() and hashCode() methods encompass the subclass-specific values that should be used to compute equality for the whole GraphicsObject.- Specified by:
getEqualityAttributes
in classGraphicsObject
-