|
|||||||||||
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
com.jagacy.ui.AbstractSwing
Implements a Jagacy Swing GUI.
Nested Class Summary |
Nested classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
protected static java.awt.Font |
CONTROL_FONT
|
protected static int |
FAST_SPEED
|
protected static int |
MEDIUM_SPEED
|
protected static int |
SLOW_SPEED
|
protected static java.awt.Font |
TEXT_FONT
|
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 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 | |
protected |
AbstractSwing(AbstractSession session)
Creates an AbstractSwing object. |
protected |
AbstractSwing(java.lang.String name)
Creates an AbstractSwing object. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
|
protected abstract javax.swing.JButton |
addButton(javax.swing.JButton button)
Adds a button to the toolbar (created using createButton). |
protected abstract javax.swing.JMenu |
addMenu(javax.swing.JMenu menu)
Adds a menu (created using createMenu). |
protected abstract javax.swing.JMenuItem |
addMenuItem(javax.swing.JMenuItem menuItem)
Adds a menu item (created using createMenuItem). |
protected abstract javax.swing.JComponent |
addUserComponent(int index)
Adds a user component to the status bar. |
void |
checkLocked()
Notifies the UI to check if the screen is locked. |
void |
close()
Closes the UI. |
protected abstract boolean |
connect()
Connects a Jagacy session. |
protected javax.swing.JButton |
createButton(java.lang.Class clazz,
java.lang.String image,
java.lang.String action,
java.lang.String tip)
Creates a toolbar button. |
protected javax.swing.JComponent |
createEmptyComponent()
Creates an empty component (filler) for use on the status bar. |
protected javax.swing.JLabel |
createLabelComponent(java.lang.String msg)
Creates a label component for use on the status bar. |
protected javax.swing.JMenu |
createMenu(java.lang.String action,
int key)
Creates a menu. |
protected javax.swing.JMenuItem |
createMenuItem(java.lang.String action,
int key)
Creates a menu item. |
protected abstract AbstractPanel |
createPanel()
Creates a Jagacy JPanel. |
protected abstract AbstractSession |
createSession(java.lang.String name)
Creates a Jagacy session. |
protected void |
disconnect()
Disconnects a session. |
protected void |
finalize()
|
protected javax.swing.JComponent |
getCursorComponent()
Returns the cursor location indicator for use on the status bar. |
protected javax.swing.ImageIcon |
getIcon()
Returns the GUI icon. |
protected AbstractPanel |
getPanel()
Returns the JPanel. |
protected javax.swing.JComponent |
getPauseComponent()
Returns the pause indicator for use on the status bar. |
protected java.lang.String |
getProductName()
Returns the product name. |
protected AbstractSession |
getSession()
Returns the Jagacy session. |
protected int |
getSpeed()
Returns the update speed. |
protected javax.swing.JComponent |
getTimeComponent()
Returns the time indicator for use on the status bar. |
protected void |
init()
Initializes the GUI. |
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
|
protected abstract boolean |
processAction(java.awt.event.ActionEvent event)
Processes an ActionEvent. |
void |
setBeginTime(boolean isClearField)
Notifies the UI that a screen has been requested. |
void |
setCursor(int row,
int column)
Sets the cursor indicator. |
void |
setEndTime()
Notifies the UI that a screen has been received. |
void |
setLocked(boolean isLocked)
Indicates whether or not the keyboard is locked. |
void |
update()
Notifies the UI that the screen has been updated. |
Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
protected static final java.awt.Font CONTROL_FONT
protected static final java.awt.Font TEXT_FONT
protected static final int SLOW_SPEED
protected static final int MEDIUM_SPEED
protected static final int FAST_SPEED
Constructor Detail |
protected AbstractSwing(java.lang.String name) throws JagacyException
name
- Session name.
JagacyException
- If an error occurs.protected AbstractSwing(AbstractSession session) throws JagacyException
session
- A jagacy session.
JagacyException
- If an error occurs.Method Detail |
protected abstract AbstractSession createSession(java.lang.String name) throws JagacyException
name
- Session name.
JagacyException
- If an error occurs.protected abstract AbstractPanel createPanel() throws JagacyException
JagacyException
- If an error occurs.protected void disconnect()
protected int getSpeed()
protected javax.swing.ImageIcon getIcon()
protected AbstractSession getSession()
protected AbstractPanel getPanel()
protected java.lang.String getProductName()
protected javax.swing.JComponent getPauseComponent()
protected javax.swing.JComponent getTimeComponent()
protected javax.swing.JComponent getCursorComponent()
public void setLocked(boolean isLocked)
UserInterface
setLocked
in interface UserInterface
isLocked
- true if locked; false otherwise.public void checkLocked()
UserInterface
checkLocked
in interface UserInterface
public void setEndTime()
UserInterface
setEndTime
in interface UserInterface
public void setBeginTime(boolean isClearField)
UserInterface
setBeginTime
in interface UserInterface
isClearField
- true if the time field should be cleared; false
otherwise.public void setCursor(int row, int column)
row
- The cursor row.column
- The cursor column.protected abstract boolean connect()
protected javax.swing.JMenu createMenu(java.lang.String action, int key)
action
- Menu action name.key
- Accelerator key.
protected javax.swing.JMenuItem createMenuItem(java.lang.String action, int key)
action
- Menu item action name.key
- Accelerator key.
protected javax.swing.JButton createButton(java.lang.Class clazz, java.lang.String image, java.lang.String action, java.lang.String tip)
clazz
- Class to from which to load the icon image.image
- Icon image name.action
- Action name.tip
- Tooltip.
protected javax.swing.JLabel createLabelComponent(java.lang.String msg)
msg
- Message to display.
protected javax.swing.JComponent createEmptyComponent()
protected abstract javax.swing.JMenu addMenu(javax.swing.JMenu menu)
menu
- The menu.
protected abstract javax.swing.JMenuItem addMenuItem(javax.swing.JMenuItem menuItem)
menuItem
- The menu item.
protected abstract javax.swing.JButton addButton(javax.swing.JButton button)
button
- The button.
protected abstract javax.swing.JComponent addUserComponent(int index)
index
- Index from right to left (starting from 0). Currently, three
user components can be added.
protected void init() throws JagacyException
JagacyException
- If an error occurs.public void update() throws JagacyException
UserInterface
update
in interface UserInterface
JagacyException
- If an error occurs.public void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
protected abstract boolean processAction(java.awt.event.ActionEvent event)
event
- The event.
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
public void close()
UserInterface
close
in interface UserInterface
protected void finalize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |