|
||||||||||
| 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
public abstract class JClientFrame
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 | |
|---|---|
protected static class |
JClientFrame.ClientListener
A helper class to listen to connect events. |
| Nested classes/interfaces inherited from class jview.JOpenFrame |
|---|
JOpenFrame.Show |
| 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 | |
|---|---|
static String |
CONNECTACTION
The connect action. |
private JToggleButton |
connected
The label changing its icon according to the connection status. |
private static boolean |
DEFCONNECTONINIT
If true, the connection is established on start-up. |
private static String |
DEFFILEACTIONS
The action commands used for identfiying file menu actions. |
private static String |
DEFICONCONNECT
The default connect resource. |
private static String |
DEFICONDISCONNECT
The default connect resource. |
private static String |
DEFRESOURCEBUNDLES
The resource bundles for localized labels and text. |
static String |
DISCONNECTACTION
The disconnect action. |
static String |
KEY_CONNECTONINIT
If true, the connection is established on start-up. |
static String |
KEY_ICONCONNECT
The connected icon as an image file. |
static String |
KEY_ICONDISCONNECT
The disconnected icon as an image file. |
| 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 | |
|---|---|
JClientFrame(Map<String,String> prop)
Constructs a generic peripheral from a property container. |
|
JClientFrame(PropertyBearing prop)
Constructs a generic peripheral from a property container. |
|
| Method Summary | |
|---|---|
static boolean |
abolishConnection(JToggleButton connected,
ClientObject client)
Tries to abolish a connection. |
void |
actionPerformed(ActionEvent ae)
Trace actions delivered to this component. |
boolean |
connect()
Called when connection to the casters is required. |
static JToggleButton |
createConnect(URL active,
URL passive,
ClientObject client)
Creates a connected/disconnected toggle button. |
boolean |
disconnect()
Called when deregistering from the casters is required. |
static boolean |
establishConnection(JToggleButton connected,
ClientObject client)
Tries to establish a connection. |
void |
exit()
On exit, we deregister from the casters. |
protected List |
getBottomItems()
Returns the list of bottom items, which is the status panel plus the connect button. |
void |
setComposedProperties(PropertyBearing prop)
Sets a PropertyBearing object as a composite of the canvas. |
| Methods inherited from class jview.JOpenFrame |
|---|
createCheckBoxMenuItem, createLocalizedCheckBoxMenuItem, exportCenter, getExportRepresentation, getHelpActions, getMenus, getOpenFilter, getPrintRepresentation, getSaveFilter, getSaveRepresentation, init, openFile, populateMenu, printCenter, saveFile |
| Methods inherited from class jview.JConfirmExitFrame |
|---|
disposeAndExit |
| 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.PropertyComposed |
|---|
getComposedProperties |
| Methods inherited from interface jview.Displayable |
|---|
getIcon, getRepresentation |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static final String CONNECTACTION
public static final String DISCONNECTACTION
public static final String KEY_CONNECTONINIT
public static final String KEY_ICONCONNECT
public static final String KEY_ICONDISCONNECT
private static final String DEFRESOURCEBUNDLES
private static final boolean DEFCONNECTONINIT
private static final String DEFICONCONNECT
private static final String DEFICONDISCONNECT
private static final String DEFFILEACTIONS
private JToggleButton connected
| Constructor Detail |
|---|
public JClientFrame(PropertyBearing prop)
public JClientFrame(Map<String,String> prop)
| Method Detail |
|---|
public void setComposedProperties(PropertyBearing prop)
PropertyBearing object as a composite of the canvas.
Defaults the necessary parameter.
setComposedProperties in interface PropertyAwaresetComposedProperties in class JOpenFramepublic void exit()
exit in interface ExitCleaningpublic void actionPerformed(ActionEvent ae)
actionPerformed in interface ActionListeneractionPerformed in class JOpenFrameprotected List getBottomItems()
getBottomItems in class JBorderFramepublic boolean connect()
connect in interface ClientObjectpublic boolean disconnect()
disconnect in interface ClientObject
public static JToggleButton createConnect(URL active,
URL passive,
ClientObject client)
public static boolean establishConnection(JToggleButton connected,
ClientObject client)
connect()
method which should return fast, as we are in the event queue. If
connection fails, i.e. if connect() returns false, an error
dialog is displayed.
public static boolean abolishConnection(JToggleButton connected,
ClientObject client)
disconnect()
method which should return fast, as we are in the event queue. If
disconnection fails, i.e. if disconnect() returns false, an error
dialog is displayed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||