All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.awt.draw.TextInput
java.lang.Object
|
+----ncsa.awt.draw.DrawingPrimitive
|
+----ncsa.awt.draw.TextInput
- public class TextInput
- extends DrawingPrimitive
A class that implements a TextInput string DrawingPrimitive
-
text
-
-
TextInput()
-
-
describe()
-
-
drawPoints(Graphics)
- Draws the TextInput string in the given graphics context
-
keyDownAction(int)
- Add this key stroke to the text string
-
keyTypedAction(KeyEvent)
-
-
mouseDownAction(int, int)
-
Initializes the data structures for this primitive on mouse down
-
mouseDragAction(int, int)
-
Updates the data structures for this primitive during a mouse drag
-
mouseUpAction(int, int)
-
Updates the data structures for this primitive during a mouse up
-
move(Point, int, int)
- Move this primitive from the current location to a new (x,y)
-
setBoundingBox(Graphics, Vector)
- Set the bounding box for this primitive.
-
setBoundingBox(Vector)
- Initialize a bounding_box which contains this set of points
text
protected String text
TextInput
public TextInput()
drawPoints
public void drawPoints(Graphics g)
- Draws the TextInput string in the given graphics context
- Parameters:
- g - the graphics context
- Overrides:
- drawPoints in class DrawingPrimitive
setBoundingBox
public void setBoundingBox(Vector pnts)
- Initialize a bounding_box which contains this set of points
- Overrides:
- setBoundingBox in class DrawingPrimitive
setBoundingBox
public void setBoundingBox(Graphics g,
Vector pnts)
- Set the bounding box for this primitive. The Graphics context
is required to obtain the FontMetrics for this DrawingPrimitive.
- Parameters:
- g - the graphics context
- pnts - the vector containing the DrawingPrimitive location
mouseDownAction
public void mouseDownAction(int x,
int y)
- Initializes the data structures for this primitive on mouse down
- Parameters:
- x - the x coordinate
- y - the y coordinate
- Overrides:
- mouseDownAction in class DrawingPrimitive
mouseDragAction
public void mouseDragAction(int x,
int y)
- Updates the data structures for this primitive during a mouse drag
- Parameters:
- x - the x coordinate
- y - the y coordinate
- Overrides:
- mouseDragAction in class DrawingPrimitive
mouseUpAction
public void mouseUpAction(int x,
int y)
- Updates the data structures for this primitive during a mouse up
- Parameters:
- x - the x coordinate
- y - the y coordinate
- Overrides:
- mouseUpAction in class DrawingPrimitive
move
public void move(Point start,
int x,
int y)
- Move this primitive from the current location to a new (x,y)
- Parameters:
- start - the reference Point at which this move started
- x - the x coordinate
- y - the y coordinate
- Overrides:
- move in class DrawingPrimitive
keyDownAction
public void keyDownAction(int key)
- Add this key stroke to the text string
- Overrides:
- keyDownAction in class DrawingPrimitive
keyTypedAction
public void keyTypedAction(KeyEvent e)
describe
public String describe()
- Returns:
- a string describing this text
- Overrides:
- describe in class DrawingPrimitive
All Packages Class Hierarchy This Package Previous Next Index