|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
jview.AbstractDisplayable
jview.JStatusField
public class JStatusField
This Class provides the status area.
It consists of a generally writable (but not editable!) textarea for
messages to the user. An JExitButton is added at the left edge. If
constructed with an array of buttons, flow layout them between the exit
button and the status field. The following properties are supported.
KEY_STATUSSIZE points to a minimum size of the status
message field. It's value is directly fueled to the
MyDimension.MyDimension(String) constructor and must therefore
consist of two integers combined with an 'x' char.
KEY_DEBUGCOLOR key refers to the color used for
drawing status messages. The string it points to is converted into a color
using Color.decode, Color.getColor, and the constructor of
MyColor. If all conversions fail or the key is not present,
DEFDEBUGCOLOR is used.KEY_INFOCOLOR key refers to the color used for
drawing command messages. The string it points to is converted into a color
using Color.decode, Color.getColor, and the constructor of
MyColor. If all conversions fail or the key is not present,
DEFINFOCOLOR is used.KEY_WARNINGCOLOR key refers to the color used for
drawing done messages. The string it points to is converted into a color
using Color.decode, Color.getColor, and the constructor of
MyColor. If all conversions fail or the key is not present,
DEFWARNINGCOLOR is used.KEY_ERRORCOLOR key refers to the color used for
drawing error messages. The string it points to is converted into a color
using Color.decode, Color.getColor, and the constructor of
MyColor. If all conversions fail or the key is not present,
DEFERRORCOLOR is used.KEY_FATALCOLOR key refers to the color used for
drawing acknowledge messages. The string it points
to is converted into a color
using Color.decode, Color.getColor, and the constructor of
MyColor. If all conversions fail or the key is not present,
DEFFATALCOLOR is used.
| Nested Class Summary | |
|---|---|
static class |
JStatusField.Test
Test purpose only. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private static String |
DEBUG
The name for the status text style. |
private static Color |
DEFDEBUGCOLOR
The default status color. |
private static Color |
DEFERRORCOLOR
The default error color. |
private static Color |
DEFFATALCOLOR
The default status color. |
private static Color |
DEFINFOCOLOR
The default status color. |
private static Dimension |
DEFSTATUSSIZE
The default dimension of the text pane. |
private static Color |
DEFWARNINGCOLOR
The default command color. |
private JPanel |
deliver
Initialized at first call to getRepresentation(). |
private static String |
ERROR
The name for the acknowledge text style. |
private static String |
FATAL
The name for the done text style. |
private static String |
INFO
The name for the status text style. |
static String |
KEY_DEBUGCOLOR
The key denoting the color of standard messages. |
static String |
KEY_ERRORCOLOR
The key denoting the color of error messages. |
static String |
KEY_FATALCOLOR
The key denoting the color of done messages. |
static String |
KEY_INFOCOLOR
The key denoting the color of standard messages. |
static String |
KEY_STATUSSIZE
The key denoting the minimum size of the text pane, MyDimension. |
static String |
KEY_WARNINGCOLOR
The key denoting the color of command messages. |
private JTextPane |
status
The text area of this status field. |
private static String |
WARNING
The name for the command text style. |
| Fields inherited from class jview.AbstractDisplayable |
|---|
KEY_COMPONENTNAME, KEY_ICON, KEY_INSETS |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
JStatusField(Map<String,String> prop)
Creates a Status Panel without any additional buttons. |
|
| Method Summary | |
|---|---|
protected void |
append(String text,
Style how)
Appends the given string to the end of the status text pane. |
void |
debug(String mess)
Displays the message mess in Status with STATUSTEXT Color. |
void |
error(String err)
Displays the error message err in Status with STATUSERROR Color. |
void |
error(Throwable err)
Displays the error message err in Status with STATUSERROR Color. |
void |
fatal(String done)
Displays the error message err in Status with STATUSERROR Color. |
Component |
getRepresentation()
Returns the previously prepared representation. |
protected JTextPane |
getStatus()
Returns the status text pane. |
protected Document |
getStatusDocument()
Returns the text of the status field contained in a document object. |
void |
info(String mess)
Displays the message mess in Status with STATUSTEXT Color. |
void |
init()
Initializes the status field. |
protected JPanel |
prepareRepresentation()
Prepares a panel that has the status field in its center. |
protected void |
setColor(Color textcol,
String who)
Sets the default color in which to draw messages. |
void |
warning(String mess)
Displays the command mess in Status with COMMANDTEXT Color. |
| Methods inherited from class jview.AbstractDisplayable |
|---|
getComponentName, getIcon, getIcon |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
public static final String KEY_DEBUGCOLOR
public static final String KEY_INFOCOLOR
public static final String KEY_WARNINGCOLOR
public static final String KEY_ERRORCOLOR
public static final String KEY_FATALCOLOR
public static final String KEY_STATUSSIZE
private static final Color DEFDEBUGCOLOR
private static final Color DEFINFOCOLOR
private static final Color DEFWARNINGCOLOR
private static final Color DEFERRORCOLOR
private static final Color DEFFATALCOLOR
private static final Dimension DEFSTATUSSIZE
private static final String DEBUG
private static final String INFO
private static final String WARNING
private static final String ERROR
private static final String FATAL
private JPanel deliver
getRepresentation().
private JTextPane status
| Constructor Detail |
|---|
public JStatusField(Map<String,String> prop)
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class PropertyResourcespublic Component getRepresentation()
public void debug(String mess)
mess - public void info(String mess)
mess - public void warning(String mess)
mess - public void error(String err)
err - The error message to printpublic void error(Throwable err)
err - The exception to printpublic void fatal(String done)
err - protected JPanel prepareRepresentation()
protected void setColor(Color textcol,
String who)
protected Document getStatusDocument()
protected JTextPane getStatus()
protected void append(String text,
Style how)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||