|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.frame4j.util.App
de.frame4j.AskAlert
@MinDoc(copyright="Copyright 2004, 2009 A. Weinert",
author="Albrecht Weinert",
version="V.51",
lastModified="21.05.2010",
lastModifiedBy="A. Weinert",
usage="start as Java application (-? for help)",
purpose="report or question on Window with timeout")
public class AskAlert
Report and / or question with timeout.
This application shows alarm, error or status reports, to be acknowledged,
on a window or asks a question. The timeout to acknowledge or respond as
well as the default answer are settable.
The window shown is simply structured (from top to bottom):
java AskAlert -helpverbosity determines, what is
logged:AppHelper.SILENT (option -silent) :
no log output, AppHelper.NORMAL (default) :
the report text,AppHelper.VERBOSE (Option -v) : also
the question and the response.AskAlert the window is made visible
and it is now waited for a limited time for a user reaction. This time
until answering or pressing a button is settable in 1/10s units in the
range 5 to 90000 seconds.| Value | Meaning | |
|---|---|---|
| >5 | problems | The application had startup proplems; the window was not shown. |
| 5 | cancel | Cancel button / middle button |
| 4 | closed | window was explicitly closed (by X or icon menu). |
| 3 | time out | No response, waiting time over *1). |
| 1 | no | No button / right button |
| 0 | yes | Yes button / left button |
@Echo and @Pause). java AskAlert "Onwards with WWW server update" -v
"Stop and cancel" -wa -wp if ERRORLEVEL 1 goto :endeframe4j.jar", that
should be an installed extension in directory ...jre\lib\ext.
Therefore AskAlert is the start application of the .jar file
frame4j.jar. Byjava -jar frame4j.jar or by double clicking the .jar file this
application AskAlert is started in this info mode. Exit codes
0, 5 (buttons), 4 (close) as well as 3 (time-out) are returned also in
this mode.AskAlert
(source) belongs
(as integral part) a .properties file named
AskAlert.properties. It's part of the
documentation.
de.frame4j,
App,
de.frame4j.graf,
AskDialog| Field Summary | |
|---|---|
protected Color |
bg
Dialouege's background colour.. |
String |
cancel
Middle Cancel-button, text. |
String |
cancelKey
Middle Cancel-button, key. |
String |
lower
The question / text below the buttons. |
String |
no
Right No button, text. |
String |
noKey
Right No button, key. |
int |
timeOutCode
Return code for timeout. |
String |
upper
The report / text above buttons. |
boolean |
upperMonospaced
Font of upper text non proportional. |
protected int |
waitMax
Maximal wait time in tenth (1/10) of seconds. |
String |
yes
Left Yes-button, text. |
String |
yesKey
Left Yes-button, key. |
| Fields inherited from class de.frame4j.util.App |
|---|
ano, appBase, appIO, appStartTime, args, bgColor, err, fullClassName, help, icon, INIT_ERROR, jmxRemoteNote, JOB_DONE_OK, log, LOG_OUT_ERROR, MAIN_THREAD_EXC, mainThread, myClass, myFrame, name, NO_PARS_ERROR, objectName, out, outMode, packName, prop, retCode, runFlag, shortClassName, title, verbose, verbosity |
| Fields inherited from interface de.frame4j.net.AttrSettable |
|---|
ILLEGAL_TYPE, ILLEGAL_VALUE, NO_ATTRIBUTE, NO_KNOWN_ATTRIBUTE, NO_VALUE, OK |
| Constructor Summary | |
|---|---|
AskAlert()
|
|
| Method Summary | |
|---|---|
int |
doIt()
AskAlert's working method. |
static void |
main(String[] args)
AskAlert's start method. |
void |
setBg(CharSequence bg)
Set dialogoue's background colour. |
void |
setCancel(String cancel)
Setter. |
void |
setCancelKey(String cancelKey)
Setter. |
void |
setLower(String lower)
Set the question / text below the buttons. |
void |
setNo(String no)
Setter. |
void |
setNoKey(String noKey)
Setter. |
void |
setUpper(String upper)
Set the report / text above buttons. |
void |
setWaitMax(int waitMax)
Set maximal wait time in tenth (1/10) of seconds. |
void |
setYes(String yes)
Setter for yes. |
void |
setYesKey(String yesKey)
Setter for yesKey. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int waitMax
public String upper
public boolean upperMonospaced
public String lower
public String yes
yesKey) is empty.
public String yesKey
yes value is null or empty, this is the key to a
(inter) nationalised, user language dependent value fetched by
(@link App#valueLang(CharSequence) valueLang(yesKey)}.
AppLangMappublic String cancel
yes and yesKey.
public String cancelKey
yes and yesKey.
public String no
yes and yesKey.
public String noKey
yes and yesKey.
protected Color bg
setBg(CharSequence)public int timeOutCode
| Constructor Detail |
|---|
public AskAlert()
| Method Detail |
|---|
public void setWaitMax(int waitMax)
public void setUpper(String upper)
public void setLower(String lower)
public void setYes(String yes)
yes. yes according to the parameter and leaves yesKey
unchanged.
setYesKey(String)public void setYesKey(String yesKey)
yesKey. yesKey according to parameter and leaves yes (text)
unchanged.
yesKey - the key, will be stripped from surrounding white space;
(then) empty acts like nullsetYes(String)public void setCancel(String cancel)
yes and yesKey.
public void setCancelKey(String cancelKey)
yes and yesKey.
public void setNo(String no)
yes and yesKey.
public void setNoKey(String noKey)
yes and yesKey.
public void setBg(CharSequence bg)
bg as colour by
GrafHelper.getColor(CharSequence). If this is not possible null is
set or left.
public static void main(String[] args)
args - command line parameterspublic int doIt()
doIt in class AppProp,
App.go(String[], boolean),
App.go(String[], String, boolean, CharSequence),
App.mainThread
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||