|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
stella.parameter.AbstractParameter
stella.parameter.AbstractRemoteParameter
stella.parameter.AbstractRemoteTrigger
stella.parameter.AbstractRemoteSwitch
stella.jview.JFrameParameter
public class JFrameParameter
A special parameter used as a dirty trick to get a parameter display. This
parameter serves a top-level frame, where other parameters can register to
using the registerParameter(stella.Parameter) method. If the added parameter
implements
the Displayable interface, its layout is queried with
the appropriate method and it is added to the top level
frame, using a slot defined by this parameters KEY_COMPONENTLIST
property. Only Displayable parameters might be added.
As a parameter, this class delivers the number of registered parameters to
it.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyContainer |
|---|
PropertyContainer.URLResource |
| Field Summary | |
|---|---|
private List |
added
The list of parameters added successfully to this frame. |
private List |
all
The list of parameters to add to this frame. |
private static int |
DEFCOLUMN
The default number of columns. |
private static String |
DEFNAME
The default name of the frame parameter. |
private static long |
DEFREFRESH
The default refresh rate. |
private TimerTask |
forcedoff
This timer task is used to switch off after a certain time-out. |
private Trigger |
help
Some properties are simple rayed to this instance. |
static String |
KEY_COLUMN
The key to the number of columns in the frame. |
static String |
KEY_COMPONENTLIST
The list of slot-positions where specific parameter should be shown. |
static String |
KEY_REFRESH
The key to the refresh intervall, in ms. |
static String |
NONE
The string toi display for undefined parameter values. |
private JFrame |
show
The top-level display frame. |
private Map |
textfields
The lookup-table matching parameter names to their textfields. |
| Fields inherited from class stella.parameter.AbstractRemoteParameter |
|---|
DEFBIND, KEY_BIND |
| Fields inherited from class stella.parameter.AbstractParameter |
|---|
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES |
| Fields inherited from interface util.PropertyBearing |
|---|
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface stella.rmi.RemoteTrigger |
|---|
NAMING_EXTENSION |
| Constructor Summary | |
|---|---|
JFrameParameter(Map info)
Constructs a new frame parameter. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent ae)
Handles updates in non- Displayable parameters. |
void |
afterAll()
The second half of the display process. |
Object |
get()
Returns the number of components that had been successfully added to the frame. |
long |
getElapsedToggleTime()
Returns the toggle time of the internale helpter trigger. |
Date |
getLastToggleTime()
Returns the toggle time of the internale helpter trigger. |
long |
getRefreshInterval()
Returns the refresh interval. |
Boolean |
getTrigger()
Returns true if we are showing and not null. |
void |
init()
Initializes the frame and the parameter list. |
boolean |
isFixedRate()
Returns false. |
boolean |
isRefreshNeeded()
Returns true if the testfields are non-null. |
boolean |
isTrue()
Returns true if we are showing and not null. |
void |
refresh()
Scans through all non- Displayable
parameters found in
the frame's look-up table. |
void |
registerParameter(Parameter add)
Adds an parameter to the frame for displaying. |
Object |
set(Object to)
Setting the number of actual components is not allowed. |
Boolean |
setTrigger(Boolean to)
Returns true if we are showing and not null. |
Boolean |
toggleTrigger()
If frame is showing, hide it, if frame is hiding, show it. |
boolean |
turnOff()
Turns the switch off. |
boolean |
turnOn(long timeout)
Turning the switch on means (re)showing of the frame. |
| Methods inherited from class stella.parameter.AbstractRemoteSwitch |
|---|
switchOff, switchOn |
| Methods inherited from class stella.parameter.AbstractRemoteTrigger |
|---|
remoteGetTrigger, remoteIsTrue, remoteToggleTime |
| Methods inherited from class stella.parameter.AbstractRemoteParameter |
|---|
addRmiListener, bindToRegistry, exit, isValid, remoteGet, removeRmiListener, rescanned, unbindFromRegistry |
| Methods inherited from class stella.parameter.AbstractParameter |
|---|
createParameter, delivers, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface stella.Parameter |
|---|
getFormatted, getName, getString |
| Methods inherited from interface util.PropertyBearing |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getLocalized, getProperties, getProperty, getResource, getResourceAsStream, getResources, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Methods inherited from interface stella.rmi.RemoteTrigger |
|---|
remoteGetTrigger, remoteIsTrue, remoteToggleTime |
| Methods inherited from interface stella.rmi.RemoteParameter |
|---|
addRmiListener, remoteGet, removeRmiListener |
| Methods inherited from interface util.rmi.RmiCaster |
|---|
bindToRegistry, isValid, unbindFromRegistry |
| Field Detail |
|---|
public static final String NONE
public static final String KEY_COMPONENTLIST
public static final String KEY_COLUMN
public static final String KEY_REFRESH
private static final String DEFNAME
private static final int DEFCOLUMN
private static final long DEFREFRESH
private List all
private List added
private Map textfields
private JFrame show
private Trigger help
private TimerTask forcedoff
| Constructor Detail |
|---|
public JFrameParameter(Map info)
throws RemoteException
registerParameter(stella.Parameter) method. The KEY_COMPONENTLIST
determines the number of components to add.
RemoteException| Method Detail |
|---|
public void init()
init in interface Initializableinit in class AbstractRemoteParameterpublic Object get()
KEY_COMPONENTLIST.
get in interface Parameterpublic Object set(Object to)
set in interface Parameterpublic long getElapsedToggleTime()
getElapsedToggleTime in interface Triggerpublic Date getLastToggleTime()
getLastToggleTime in interface Triggerpublic Boolean toggleTrigger()
toggleTrigger in interface Triggerpublic Boolean getTrigger()
getTrigger in interface Triggerpublic boolean isTrue()
isTrue in interface Triggerpublic Boolean setTrigger(Boolean to)
setTrigger in interface Triggerpublic boolean turnOn(long timeout)
turnOn in interface Switchtimeout - The maximum time the switch should be on (ms), zero for
unlimited.
public boolean turnOff()
#off for
actual switching. If a switch-off timer task was active, it is canceled.
turnOff in interface Switchpublic void registerParameter(Parameter add)
KEY_COMPONENTLIST, it is ignored.KEY_COMPONENTLIST and from the number of
columns, KEY_COLUMN.Displayable instance, its
Displayable.getRepresentation() method is called and
the component returned is added at the appropriate position.Parameter.getString().
Displayable
parameters for their value at a regular time interval, given by
KEY_REFRESH.
registerParameter in interface ParameterDependingpublic void afterAll()
afterAll in interface AfterRegisteringpublic void actionPerformed(ActionEvent ae)
Displayable parameters. In this
case, the editable textfield associated with the parameter under
question
fires an action event as return is pressed. This method roams through
its list of parameters using the firing textfield as the value to look
for in the frame's lookup-table. If a parameter was found, the new
value found in the textfield is set to this parameter.
actionPerformed in interface ActionListenerpublic boolean isRefreshNeeded()
isRefreshNeeded in interface ConditionalRefreshingpublic long getRefreshInterval()
getRefreshInterval in interface Refreshingpublic boolean isFixedRate()
isFixedRate in interface RefreshingTimerpublic void refresh()
Displayable
parameters found in
the frame's look-up table. The corresponding textfields (the values
in the look-up table) are updated to the new values.
refresh in interface Refreshing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||