Package edu.macalester.graphics.ui
Class TextField
java.lang.Object
edu.macalester.graphics.GraphicsObject
edu.macalester.graphics.ui.TextField
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidchanged()Triggers a notifications to observers that this object's appearance has changed.protected voidFor internal use.Returns the bounding box of this graphics object in its local coordinates.For internal use only.protected ObjectFor internal use only.getText()voidvoidsetBackground(Color color) voidbooleantestHitInLocalCoordinates(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, getParent, 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:GraphicsObjectFor internal use only. Supports UI components.- Overrides:
getEmbeddedComponentin classGraphicsObject
-
changed
protected void changed()Description copied from class:GraphicsObjectTriggers 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:
changedin classGraphicsObject
-
drawInLocalCoordinates
Description copied from class:GraphicsObjectFor internal use. Draws this graphics object on the screen in its local coordinates, without rotation or scaling.- Specified by:
drawInLocalCoordinatesin classGraphicsObject
-
testHitInLocalCoordinates
public boolean testHitInLocalCoordinates(double x, double y) Description copied from class:GraphicsObjectTests 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:
testHitInLocalCoordinatesin classGraphicsObject
-
getBounds
Description copied from class:GraphicsObjectReturns the bounding box of this graphics object in its local coordinates.- Specified by:
getBoundsin classGraphicsObject
-
getEqualityAttributes
Description copied from class:GraphicsObjectFor 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:
getEqualityAttributesin classGraphicsObject
-