|
All Methods zio package context |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object zio.ZObject zio.ZKeyboard
Defines a area for user input.
This class may be used in two ways
action
method. This method is invoked and given the user's
input whenever the user presses the enter key.
getText
method from it. (Currently, this way will
require knowledge of Swing and a use of ZComponent
.)
An example
class MyKeyboard extends ZKeyboard {
public void action(String userin) {
Zio.show(userin);
}
}
creates a class whose objects will show an input area on the screen. When the user enters something, it will appear in the command window.
Constructor Summary | |
ZKeyboard()
Creates a ZKeyboard object. |
Method Summary | |
protected void |
action(java.lang.String userin)
Action taken when the user presses enter. |
ZKeyboard |
background(java.awt.Color c)
Suffix that determines the background color of the ZKeyboard . |
ZKeyboard |
canOverflow()
Suffix that enables user to type more text than can be displayed. |
ZKeyboard |
debug(java.lang.String debugId)
Suffix that creates debug output. |
ZKeyboard |
expandH()
Suffix that enables horizontal stretching. |
ZKeyboard |
foreground(java.awt.Color c)
Suffix that sets the foreground color. |
java.lang.String |
getText()
Returns the text which has been entered. |
ZKeyboard |
numCols(int numColumns)
Suffix that sets the approximate number of columns the user can enter without auto scrolling. |
ZKeyboard |
pointSize(int pointSize)
Suffix which alters the point size of the font. |
ZKeyboard |
setFont(java.awt.Font f)
Suffix which sets the font used when the user enters data in this object. |
ZKeyboard |
setText(java.lang.String text)
Overwrites the user input area. |
Methods inherited from class zio.ZObject |
getSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ZKeyboard()
ZKeyboard
object.
The default data entry area is approximately
25 characters.
Method Detail |
public final ZKeyboard setFont(java.awt.Font f)
f
- the desired fontpublic final ZKeyboard numCols(int numColumns)
numColumns
- the desired number of columnspublic final ZKeyboard background(java.awt.Color c)
ZKeyboard
. The background
color will be seen in the spaces.
c
- the desired colorpublic final ZKeyboard foreground(java.awt.Color c)
public final ZKeyboard debug(java.lang.String debugId)
debugId
- a string to identify this ZKeyboard
in the debug outputpublic final ZKeyboard canOverflow()
public final ZKeyboard expandH()
canOverflow()
modification.
public final ZKeyboard pointSize(int pointSize)
pointSize
- the desired point sizepublic final ZKeyboard setText(java.lang.String text)
text
- what you want to see in the
user input areapublic final java.lang.String getText()
protected void action(java.lang.String userin)
userin
- the text entered by the user
|
author context |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |