public class TangoSynopticHandler extends JDrawEditor implements IStateListener, IStatusListener, INumberScalarListener, IDevStateScalarListener, IBooleanScalarListener, IDevStateSpectrumListener, java.awt.event.WindowListener
In addition to the animation a default interaction behaviour is provided (reaction to mouse clicks). Here are the default interactions :
javax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
static int |
TOOL_TIP_NAME
Displays the attribute name within tooltip
|
static int |
TOOL_TIP_NONE
Does not display tooltip
|
static int |
TOOL_TIP_STATE
Displays device state within tooltip only for Device objects
|
static int |
TOOL_TIP_STATUS
Displays device status within tooltip only for Device objects
|
CREATE_AXIS, CREATE_BAR, CREATE_CLIPBOARD, CREATE_ELLIPSE, CREATE_IMAGE, CREATE_LABEL, CREATE_LINE, CREATE_POLYLINE, CREATE_RECTANGLE, CREATE_RRECTANGLE, CREATE_SLIDER, CREATE_SPLINE, CREATE_SWINGOBJECT, MODE_EDIT, MODE_EDIT_GROUP, MODE_LIB, MODE_PLAYaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
TangoSynopticHandler()
Construct a TangoSynopticHandler (A JDrawEditor in MODE_PLAY).
|
TangoSynopticHandler(java.lang.String jdFileName)
Construct a TangoSynopticHandler (A JDrawEditor in MODE_PLAY).
|
TangoSynopticHandler(java.lang.String jdFileName,
ErrorHistory errh)
Construct a TangoSynopticHandler (A JDrawEditor in MODE_PLAY).
|
TangoSynopticHandler(java.lang.String jdFileName,
int ttMode)
Construct a TangoSynopticHandler (A JDrawEditor in MODE_PLAY).
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAttribute(JDObject jddg,
java.lang.String s) |
void |
booleanScalarChange(BooleanScalarEvent evt) |
void |
clearSynopticFileModel() |
void |
devStateScalarChange(DevStateScalarEvent event) |
void |
devStateSpectrumChange(DevStateSpectrumEvent evt) |
void |
errorChange(ErrorEvent event) |
AttributeList |
getAttributeList()
Returns a Handle to the global attribute list which is used
internaly to monitor attributes.
|
ErrorHistory |
getErrorHistoryWindow()
Returns the current error history window
|
java.lang.String |
getSynopticFileName()
Returns the current synoptic filename.
|
int |
getToolTipMode()
Returns the current Tooltip Mode
|
protected boolean |
isAttribute(java.lang.String s)
Return true only if the given name matches a Tango attribute name.
|
protected boolean |
isCommand(java.lang.String s)
Return true only if the given name matches a Tango command name.
|
protected boolean |
isDevice(java.lang.String devName)
Return true only if the given name matches a Tango device name.
|
protected boolean |
isSpectrumAttElement(java.lang.String s)
Return true only if the given name matches a Tango attribute name followed by [index].
|
void |
loadSynopticFromStream(java.io.InputStreamReader inp)
Load a jdraw grpahics input stream into the drawing area.The JLoox and Loox files formats are not supported.
|
static void |
main(java.lang.String[] args) |
void |
numberScalarChange(NumberScalarEvent evt) |
protected void |
parseJdrawComponents()
Parses JDraw components , detects tango entity name and attatch a model.
|
void |
refreshDisabled(java.awt.Color disabledColor)
Update background color of disabled objects, it restore the state color if the JDObject
is no longer disabled.
|
void |
setErrorHistoryWindow(ErrorHistory errh)
Sets the current error history window.
|
void |
setProgressListener(SynopticProgressListener p)
Sets tje loading progress listener
|
void |
setSynopticFileName(java.lang.String jdFileName)
Reads the Jdraw file, browses and parses the synoptic components.
|
void |
setToolTipMode(int ttMode)
Sets the current tooltip mode (device object only)
|
void |
stateChange(AttributeStateEvent evt)
change the color of the jdobj (bg or fg) according to the quality factor
of the attribute If and Only If the JDobject is not a JDBar, or JDSlider
and no color mapper is set for the JDobject
and the "extension" QualityFactor is true
|
void |
stateChange(StateEvent event) |
void |
statusChange(StatusEvent event) |
void |
windowActivated(java.awt.event.WindowEvent e) |
void |
windowClosed(java.awt.event.WindowEvent e) |
void |
windowClosing(java.awt.event.WindowEvent e) |
void |
windowDeactivated(java.awt.event.WindowEvent e) |
void |
windowDeiconified(java.awt.event.WindowEvent e) |
void |
windowIconified(java.awt.event.WindowEvent e) |
void |
windowOpened(java.awt.event.WindowEvent e) |
actionPerformed, addEditorListener, addObject, addToMenu, alignbottomSelection, alignleftSelection, alignrightSelection, aligntopSelection, backSelection, canPaste, canRedo, canUndo, clearEditorListener, clearObjects, clearUndo, componentHidden, componentMoved, componentResized, componentShown, computePreferredSize, convertToPolyline, copySelection, create, create, cutSelection, deleteSelection, dragEnter, dragExit, dragOver, drop, dropActionChanged, frontSelection, generateJavaClasses, getFileName, getGridSize, getInteractiveObjects, getLastActionName, getMinimumSize, getMode, getNeedToSaveState, getNextActionName, getObjectAt, getObjectNumber, getObjects, getObjectsByName, getObjectsOfClass, getPreferredSize, getRootPaths, getSaveString, getSelectedObjects, getSelectionLength, getZoomFactor, getZoomFactorPercent, groupSelection, initPlayer, instantSave, isAlignToGrid, isAutoZoom, isGridVisible, isSelected, keyPressed, keyReleased, keyTyped, loadFile, loadFile, loadFromStream, lowerObject, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mousePressedEditorB1, mousePressedEditorB3, mousePressedPlayerB1, mousePressedPlayerB3, mouseReleased, paint, paintObjects, paintSelection, pasteClipboard, raiseObject, redo, removeEditorListener, repaint, resetNeedToSave, saveFile, scaleSelection, selectAll, selectNotVisible, selectObject, selectObjects, setAlignToGrid, setAutoZoom, setAutoZoomFactor, setGridSize, setGridVisible, setPreferredSize, setRootPaths, setStatusLabel, setTranslation, setZoomFactor, showBrowserWindow, showGroupEditorWindow, showGroupJavaWindow, showOpenDialog, showPropertyWindow, showSaveDialog, showTransformWindow, translateSelection, undo, ungroupSelection, unselectAll, unselectObject, zoomIn, zoomOutaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final int TOOL_TIP_NONE
public static final int TOOL_TIP_STATE
public static final int TOOL_TIP_STATUS
public static final int TOOL_TIP_NAME
public TangoSynopticHandler()
JDrawEditor.MODE_PLAYpublic TangoSynopticHandler(java.lang.String jdFileName)
throws java.util.MissingResourceException,
java.io.FileNotFoundException,
java.lang.IllegalArgumentException
jdFileName - Filename of the JDraw (jdw) synptic to load.java.util.MissingResourceExceptionjava.io.FileNotFoundExceptionjava.lang.IllegalArgumentExceptionsetSynopticFileName(java.lang.String)public TangoSynopticHandler(java.lang.String jdFileName,
ErrorHistory errh)
throws java.util.MissingResourceException,
java.io.FileNotFoundException,
java.lang.IllegalArgumentException
jdFileName - Filename of the JDraw (jdw) synptic to load.errh - ErrorHistory window which will receive errors.java.util.MissingResourceExceptionjava.io.FileNotFoundExceptionjava.lang.IllegalArgumentExceptionsetSynopticFileName(java.lang.String),
ErrorHistorypublic TangoSynopticHandler(java.lang.String jdFileName,
int ttMode)
throws java.util.MissingResourceException,
java.io.FileNotFoundException,
java.lang.IllegalArgumentException
jdFileName - Filename of the JDraw (jdw) synptic to load.ttMode - Tooltip modejava.util.MissingResourceExceptionjava.io.FileNotFoundExceptionjava.lang.IllegalArgumentExceptionTOOL_TIP_NONE,
TOOL_TIP_STATE,
TOOL_TIP_STATUS,
TOOL_TIP_NAMEpublic void setProgressListener(SynopticProgressListener p)
p - Handle to the progress listenerpublic int getToolTipMode()
setToolTipMode(int)public void setToolTipMode(int ttMode)
ttMode - Tooltip modeTOOL_TIP_NONE,
TOOL_TIP_STATE,
TOOL_TIP_STATUS,
TOOL_TIP_NAMEpublic ErrorHistory getErrorHistoryWindow()
public void setErrorHistoryWindow(ErrorHistory errh)
public java.lang.String getSynopticFileName()
getSynopticFileName()public AttributeList getAttributeList()
public void loadSynopticFromStream(java.io.InputStreamReader inp)
throws java.io.IOException,
java.util.MissingResourceException
inp - An InputStreamReader should be created by the application and passed to this methodjava.io.IOException - Exception when the inputStream cannot be accessed.java.util.MissingResourceException - when the "jdraw" inputStream cannot be parsed.public void setSynopticFileName(java.lang.String jdFileName)
throws java.util.MissingResourceException,
java.io.FileNotFoundException,
java.lang.IllegalArgumentException
jdFileName - Filename of the JDraw (jdw) synptic to load.java.util.MissingResourceExceptionjava.io.FileNotFoundExceptionjava.lang.IllegalArgumentExceptionpublic void clearSynopticFileModel()
protected void parseJdrawComponents()
protected boolean isAttribute(java.lang.String s)
Attribute name allowed syntax ( Can be preceded by tango: ):
Full syntax: //hostName:portNumber/domain/family/member/attName Full syntax: //ipAddress:portNumber/domain/family/member/attName Short syntax: domain/family/member/attName
s - Attribute nameprotected boolean isSpectrumAttElement(java.lang.String s)
Spectrum Attribute element allowed syntax ( Can be preceded by tango: ):
Full syntax: //hostName:portNumber/domain/family/member/attName[xx] Full syntax: //ipAddress:portNumber/domain/family/member/attName[xx] Short syntax: domain/family/member/attName[xx]
s - Spectrum Attribute elementprotected boolean isCommand(java.lang.String s)
Command name allowed syntax ( Can be preceded by tango: ):
Full syntax: //hostName:portNumber/domain/family/member/cmdName Full syntax: //ipAddress:portNumber/domain/family/member/cmdName Short syntax: domain/family/member/cmdName
s - Command nameprotected boolean isDevice(java.lang.String devName)
Device name allowed syntax ( Can be preceded by tango: ):
Full syntax: //hostName:portNumber/domain/family/member Full syntax: //ipAddress:portNumber/domain/family/member Short syntax: domain/family/member
devName - Device namepublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed in interface java.awt.event.WindowListenerpublic void windowOpened(java.awt.event.WindowEvent e)
windowOpened in interface java.awt.event.WindowListenerpublic void windowClosing(java.awt.event.WindowEvent e)
windowClosing in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowActivated(java.awt.event.WindowEvent e)
windowActivated in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated in interface java.awt.event.WindowListenerprotected void addAttribute(JDObject jddg, java.lang.String s)
public void numberScalarChange(NumberScalarEvent evt)
numberScalarChange in interface INumberScalarListenerpublic void booleanScalarChange(BooleanScalarEvent evt)
booleanScalarChange in interface IBooleanScalarListenerpublic void devStateSpectrumChange(DevStateSpectrumEvent evt)
devStateSpectrumChange in interface IDevStateSpectrumListenerpublic void stateChange(AttributeStateEvent evt)
stateChange in interface IAttributeStateListenerpublic void errorChange(ErrorEvent event)
errorChange in interface IErrorListenerpublic void refreshDisabled(java.awt.Color disabledColor)
disabledColor - public void devStateScalarChange(DevStateScalarEvent event)
devStateScalarChange in interface IDevStateScalarListenerpublic void stateChange(StateEvent event)
stateChange in interface IStateListenerpublic void statusChange(StatusEvent event)
statusChange in interface IStatusListenerpublic static void main(java.lang.String[] args)