|
Basic Methods zio package context |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object zio.Zio
The Zio
class is a method defining class that
contains a potpourri of methods. Some
of these aid the other classes in the zio package.
Others provide a one stop shopping place for beginners looking
for a few simple actions to use in conjunction with the
zio package.
Constructor Summary | |
Zio()
|
Method Summary | |
static void |
abort(java.lang.String message)
Writes a message in the command window, starts a new line, and aborts the program. |
static boolean |
ask(java.lang.String question)
Pops a window up that asks a yes/no question. |
static char[] |
extractChars(java.lang.String str)
Splits a String into a character array. |
static java.lang.String[] |
extractLines(java.lang.String str)
Splits a String into an array of lines. |
static java.lang.String[] |
extractTokens(java.lang.String str)
Splits a String into an array of tokens. |
static java.awt.Dimension |
getLargestZObject()
Finds the size of the largest ZObject that will
fit on this screen with this motif. |
static java.awt.Dimension |
getScreenSize()
Finds the size in pixels of the current moniter. |
static void |
setGlobalBackground(java.awt.Color bg)
Set the global background color. |
static void |
setGlobalForeground(java.awt.Color fg)
Sets the global foreground color. |
static void |
show(java.lang.String str)
Writes a string in the command window and starts a new line. |
static void |
stop()
Stops the program. |
static void |
tell(java.lang.String message)
Pops a window up that tells the user something. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Zio()
Method Detail |
public static final java.awt.Dimension getLargestZObject()
ZObject
that will
fit on this screen with this motif.
ZObject
public static final java.awt.Dimension getScreenSize()
Dimension
giving the screen sizepublic static final void setGlobalForeground(java.awt.Color fg)
fg
- a new global foreground colorpublic static final void setGlobalBackground(java.awt.Color bg)
bg
- a new global background colorpublic static final void show(java.lang.String str)
str
- the string to be writtenpublic static final void abort(java.lang.String message)
message
- the string to be writtenpublic static final void stop()
public static final char[] extractChars(java.lang.String str)
String
into a character array.
This method included for the convenience of beginners
using the InOut.readText()
method. All characters
including end of line symbols will be placed into the
returned character array.
str
- a string
public static final java.lang.String[] extractLines(java.lang.String str)
String
into an array of lines.
Lines are returned in an array of String
s
without their end of line symbols.
Note an empty file or a file containing one empty
line will produce an array with one empty string in it.
str
- a string
public static boolean ask(java.lang.String question)
question
- the question to ask the user
public static void tell(java.lang.String message)
message
- a warning messagepublic static final java.lang.String[] extractTokens(java.lang.String str)
String
into an array of tokens.
Think of a token as a word. (Actually a token can contain
punctuation characters as well as letters) This method
is included for the convenience of beginners using
InOut.readText()
.
str
- a string
|
author context |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |