|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.gatech.cs2335.lemmings.gui.LComponent
edu.gatech.cs2335.lemmings.gui.LLeafComponent
edu.gatech.cs2335.lemmings.gui.LColoredComponent
edu.gatech.cs2335.lemmings.gui.LTextField
Class LTextField: This guy basically allows one to type in some text.
Revision History:
v1.0 (Apr. 14, 2004) - Created the LTextField class
| Field Summary | |
static java.awt.Dimension |
CHARACTER_DIMENSION
The dimensions of one character. |
| Fields inherited from class edu.gatech.cs2335.lemmings.gui.LColoredComponent |
DEFAULT_BACKGROUND_COLOR, DEFAULT_FOREGROUND_COLOR |
| Constructor Summary | |
LTextField()
Creates a new LTextField instance. |
|
LTextField(java.lang.String initialText)
Creates a new LTextLabel instance. |
|
| Method Summary | |
void |
backSpace()
Does a backspace. |
protected void |
copy(LComponent component)
Deep-copies self into the component passed in. |
void |
delete()
Does a delete. |
void |
end()
Does an END. |
int |
getCaretPosition()
Returns the caret position. |
int |
getNumColumns()
Get the value of numColumns. |
java.lang.String |
getText()
Returns the text of this label. |
void |
home()
Does a HOME. |
void |
moveCaretLeft()
Moves the caret one to the left if possible. |
void |
moveCaretRight()
Moves the caret one to the right is possible. |
protected boolean |
paint(java.awt.Graphics g)
Performs all of the necessary drawing for this control only. |
void |
processKeyTyped(char key,
int modifiers)
Processes the key type event. |
void |
registerMouseClick(int button,
java.awt.Point coords)
Registers the click of a mouse button at the specified coordinates. |
void |
setCaretPosition(int newPosition)
Sets the new caret position if possible. |
void |
setNumColumns(int v)
Set the value of numColumns. |
void |
setText(java.lang.String t)
Gives this label new text. |
protected void |
updateDimensions()
Updates the bounds of the button. |
| Methods inherited from class edu.gatech.cs2335.lemmings.gui.LColoredComponent |
getBackground, getForeground, setBackground, setBackground, setForeground, setForeground |
| Methods inherited from class edu.gatech.cs2335.lemmings.gui.LLeafComponent |
makeDirty, move, renderAll |
| Methods inherited from class edu.gatech.cs2335.lemmings.gui.LComponent |
bringToTop, cleanUp, getBounds, getParent, initialize, isActive, isComponentDirty, isShown, setBounds, setDirty, setParent, setPosition, setShown, setSize, setSize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.awt.Dimension CHARACTER_DIMENSION
| Constructor Detail |
public LTextField()
LTextField instance.
public LTextField(java.lang.String initialText)
LTextLabel instance.
initialText - a String value| Method Detail |
public java.lang.String getText()
String valuepublic void setText(java.lang.String t)
t - a String valuepublic int getNumColumns()
public void setNumColumns(int v)
v - Value to assign to numColumns.protected void updateDimensions()
updateDimensions in class LComponentpublic final void setCaretPosition(int newPosition)
newPosition - an int valuepublic final int getCaretPosition()
int valuepublic final void moveCaretLeft()
public final void moveCaretRight()
public final void home()
public final void end()
public final void backSpace()
public final void delete()
public void registerMouseClick(int button,
java.awt.Point coords)
registerMouseClick in interface IClickablebutton - an int valuecoords - a Point value
public void processKeyTyped(char key,
int modifiers)
processKeyTyped in interface ITypablekey - The key that was typed.modifiers - The modifiers that accompanied the
key-type. This is a collection of ORed flags, like SHIFT, ALT,
etc.protected void copy(LComponent component)
copy in class LComponentcomponent - a LComponent valueprotected boolean paint(java.awt.Graphics g)
paint in class LComponentg - a Graphics value
boolean value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||