|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
jview.JExitFrame
jview.JConfirmExitFrame
jview.JBorderFrame
jview.JOpenFrame
jview.JClientFrame
stella.jview.JMasterFrame
public class JMasterFrame
A generic class that allows display of information messages from periheral
devices of STELLA. A JEnvironment may display the status of the roof
and some senor data, a JTelescope displays status information of the
telescope etc. This class provides a generic frame that might be populated
with a single additional component provided by the subclass. It allows
connecting to a underlying CommandReceiver and shows the status of
the connection in the lower left part of its display. A JStatusSave
panel is provided, as well as a menu bar that might be populated by
subclasses. A general help menu item is provided. The AIP logo is displayed.
The generic periheral looks like
| Nested Class Summary | |
|---|---|
static class |
JMasterFrame.Show
Class to create the frame and display it. |
static class |
JMasterFrame.Signal
We grab the unique-ID from the command line and signal it to a bound pick listener, after augmenting it to a 'real' pick event. |
| Nested classes/interfaces inherited from class jview.JClientFrame |
|---|
JClientFrame.ClientListener |
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private static long |
DEFINTERVAL
The default notification interval. |
static String |
KEY_ACKNOWLEDGECASTER
The acknowledge caster name we listener to, if any |
static String |
KEY_COMMANDCASTER
The command caster name we listener to, if any |
static String |
KEY_DATACASTER
The data caster name we listener to, if any |
static String |
KEY_DONECASTER
The done caster name we listener to, if any |
static String |
KEY_ERRORCASTER
The error caster name we listener to, if any |
static String |
KEY_INTERVAL
The interval at which we should get data from the repository. |
static String |
KEY_REPOSITORY
The repository generating weather data events. |
static String |
KEY_WEATHERCASTER
The weather caster name we listener to, if any |
private MasterListener |
listener
The listener checking connections to my master casters. |
| Fields inherited from class jview.JClientFrame |
|---|
CONNECTACTION, DISCONNECTACTION, KEY_CONNECTONINIT, KEY_ICONCONNECT, KEY_ICONDISCONNECT |
| Fields inherited from class jview.JOpenFrame |
|---|
EMPTYACTION, EXITACTION, EXPORTACTION, KEY_FILEACTIONS, KEY_FILEHOME, OPENACTION, PRINTACTION, SAVEACTION |
| Fields inherited from class jview.JBorderFrame |
|---|
DATACLEANSE, KEY_ABOUTURL, KEY_ACTIONCLASS, KEY_AIPLOGO, KEY_BIGGERSTRUT, KEY_DATAANALYSER, KEY_EASTALIGNMENT, KEY_FITTERS, KEY_FITTERTIPS, KEY_HELPSIZE, KEY_LESSERSTRUT, KEY_NOLOGO, KEY_NORTHALIGNMENT, KEY_SOUTHALIGNMENT, KEY_WESTALIGNMENT, MODELFITTER |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface jview.ClientLabels |
|---|
KEY_CONNECTERROR, KEY_CONNECTTITLE, KEY_DISCONNECTERROR |
| Fields inherited from interface jview.BorderLabels |
|---|
KEY_ABOUT, KEY_ABOUTACC, KEY_FILEACCS, KEY_FILEITEMS, KEY_FILEMENU, KEY_FILEMNEMONIC, KEY_HELPMENU, KEY_HELPMNEMONIC, KEY_HELPTITLE, KEY_NOHELP, KEY_NOURLACCESS, KEY_TITLE |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JMasterFrame(LocalizedSupplying prop)
Constructs a generic peripheral from a property container. |
|
JMasterFrame(Map<String,String> prop)
Constructs a generic peripheral from a property container. |
|
| Method Summary | |
|---|---|
boolean |
accepts(CommandEvent cmd)
Accepts no command events. |
boolean |
connect()
Called when connection to the casters is required. |
protected JStatusField |
createStatus()
Creates the status field or a subclass of it. |
boolean |
disconnect()
Called when deregistering from the casters is required. |
void |
disconnect(RmiCaster name)
Diverts to listener. |
String |
getListenerName()
Returns the listener name. |
void |
init()
Initializes the frame. |
boolean |
isConnected()
Diverts to listener. |
protected boolean |
openFile(File f)
Per default, we cannot open a file. |
void |
rmiCommand(CommandEvent ce)
The receiving edge of the command listener. |
void |
rmiDataAvailable(DataEvent de)
The receiving edge of the data listener. |
void |
rmiErrorOccured(ErrorEvent ee)
The receiving edge of the error listener. |
long |
rmiGetInterval()
Returns the previously set sampling period. |
void |
rmiGotAcknowledge(AcknowledgeEvent ae)
The receiving edge of the acknowledge listener. |
void |
rmiGotDone(DoneEvent de)
The receiving edge of the done listener. |
void |
rmiProcessData(Map readings,
boolean weather)
This method is per default empty. |
void |
rmiWeatherChanged(WeatherEvent we)
The receiving edge of weather events. |
void |
setComposedProperties(LocalizedSupplying prop)
Adds a default interval. |
| Methods inherited from class jview.JClientFrame |
|---|
abolishConnection, actionPerformed, createConnect, establishConnection, exit, getBottomItems |
| Methods inherited from class jview.JConfirmExitFrame |
|---|
disposeAndExit, disposeImmediately |
| Methods inherited from class jview.JExitFrame |
|---|
setVisible |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.LocalizedComposed |
|---|
getComposedProperties |
| Methods inherited from interface jview.Displayable |
|---|
getIcon, getRepresentation |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static final String KEY_COMMANDCASTER
public static final String KEY_ACKNOWLEDGECASTER
public static final String KEY_ERRORCASTER
public static final String KEY_DONECASTER
public static final String KEY_DATACASTER
public static final String KEY_WEATHERCASTER
public static final String KEY_REPOSITORY
public static final String KEY_INTERVAL
private static final long DEFINTERVAL
private MasterListener listener
| Constructor Detail |
|---|
public JMasterFrame(Map<String,String> prop)
throws RemoteException
RemoteException
public JMasterFrame(LocalizedSupplying prop)
throws RemoteException
RemoteException| Method Detail |
|---|
public void setComposedProperties(LocalizedSupplying prop)
setComposedProperties in interface LocalizedAwaresetComposedProperties in class JClientFramepublic void init()
JOpenFrame.getMenus() method that in the basic version delivers a 'File' menu
that allows connecting/disconnecting/save/print/exit. If additional help
is needed, the JOpenFrame.getHelpActions() method must be overridn which
delivers an empty list in the basic version. Right to the main area,
where the #deliverComponent return is placed, the AIP-logo is
displayed. Underneath the buttons are placed delivered by the
#getRightActions method, which in the basic version returns an
empty list.
init in interface Initializableinit in class JOpenFrame
public boolean isConnected()
throws RemoteException
listener.
isConnected in interface RmiListenerRemoteException
public void disconnect(RmiCaster name)
throws RemoteException
listener.
disconnect in interface RmiListenerRemoteException
public String getListenerName()
throws RemoteException
listener.
getListenerName in interface RmiEventListenerRemoteException
public boolean accepts(CommandEvent cmd)
throws RemoteException
accepts in interface RmiCommandListenerRemoteException
public void rmiCommand(CommandEvent ce)
throws RemoteException
rmiCommand in interface RmiCommandListenerRemoteException
public void rmiGotAcknowledge(AcknowledgeEvent ae)
throws RemoteException
rmiGotAcknowledge in interface RmiAcknowledgeListenerRemoteException
public void rmiGotDone(DoneEvent de)
throws RemoteException
rmiGotDone in interface RmiDoneListenerRemoteException
public void rmiErrorOccured(ErrorEvent ee)
throws RemoteException
rmiErrorOccured in interface RmiErrorListenerRemoteException
public void rmiDataAvailable(DataEvent de)
throws RemoteException
rmiDataAvailable in interface RmiDataListenerRemoteException
public void rmiWeatherChanged(WeatherEvent we)
throws RemoteException
rmiWeatherChanged in interface RmiWeatherListenerRemoteException
public long rmiGetInterval()
throws RemoteException
rmiGetInterval in interface RmiDataCollectingRemoteException
public void rmiProcessData(Map readings,
boolean weather)
throws RemoteException
rmiProcessData in interface RmiDataCollectingRemoteExceptionprotected JStatusField createStatus()
createStatus in class JBorderFramepublic boolean connect()
connect in interface ClientObjectconnect in class JClientFramepublic boolean disconnect()
disconnect in interface ClientObjectdisconnect in class JClientFrameprotected boolean openFile(File f)
openFile in class JOpenFrame
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||