uk.ac.ic.doc.y2002.tool.application
Class DisplayPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--uk.ac.ic.doc.y2002.tool.application.DisplayPane
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class DisplayPane
extends javax.swing.JPanel

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
 PNAnimator animator
           
 ClassManager classman
           
 EditorFrame eframe
           
 SelectionBox mySelection
           
 org.jdom.Namespace ns
           
 java.util.HashMap refLinkTable
           
 java.util.List refPairs
           
 org.jdom.Element root
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DisplayPane(EditorFrame eframe, org.jdom.Element root)
          On creation, the DisplayPane, should be passed the or element which it is to display.
 
Method Summary
 void addArc(org.jdom.Element e)
          Pastes a copied arc into DisplayPane
 void addNode(org.jdom.Element e)
           
 void calcPreferredSize()
          Can be called to calculate the required size to display all the objects in the net.
 void closeSubnetInstances()
           
 void connectLabels(ArcLabel arclabel)
           
 Clipboard getClipboard()
           
 PNLabel getLabel(java.lang.String id)
           
 java.awt.Dimension getPreferredSize()
           
 void highlightEnabled(boolean highlight)
           
 void highlightFire()
           
protected  void instantiateSubnets()
           
 boolean isModule()
           
 void linkSubnet(SubnetImportLabel importLabel, SubnetExportLabel exportLabel)
           
 void loadClassManager(org.jdom.Element root)
           
 void makeLabels()
           
 void newArc()
           
 void newImmediateTransition(int x, int y)
           
 void newPlace(int x, int y)
           
 void newReferencePlace(int x, int y)
           
 void newRefLink()
           
 void newSubnet(int x, int y, java.lang.String moduleRef, java.lang.String importParam, java.lang.String exportParam)
           
 void newTimedTransition(int x, int y)
           
protected  TransitionLabel newTransition(int x, int y)
           
 void notify(PNLabel label)
           
 void paintComponent(java.awt.Graphics g)
           
 java.lang.String pasteArcLabel(org.jdom.Element clone)
          Pastes a copied arclabel into DisplayPane @return new id of label.
 java.lang.String pastePlace(org.jdom.Element clone)
          Pastes a copied placeLabel into DisplayPane @return new id of label.
 java.lang.String pasteReferencePlace(org.jdom.Element clone)
          Pastes a copied ReferencePlacelabel into DisplayPane @return new id of label.
 java.lang.String pasteSubnetPlace(org.jdom.Element clone)
          Pastes a copied Subnetlabel into DisplayPane @return new id of label.
 java.lang.String pasteTransition(org.jdom.Element clone)
          Pastes a copied Transitionlabel into DisplayPane @return new id of label.
 void removeLabel(PNLabel label)
           
 void removeSelectionBox()
           
 void showContextMenu(java.awt.event.MouseEvent e)
          Brings up the right-click popup menu.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

eframe

public EditorFrame eframe

root

public org.jdom.Element root

ns

public org.jdom.Namespace ns

classman

public ClassManager classman

animator

public PNAnimator animator

refLinkTable

public java.util.HashMap refLinkTable

mySelection

public SelectionBox mySelection

refPairs

public java.util.List refPairs
Constructor Detail

DisplayPane

public DisplayPane(EditorFrame eframe,
                   org.jdom.Element root)
On creation, the DisplayPane, should be passed the or element which it is to display.
Method Detail

loadClassManager

public void loadClassManager(org.jdom.Element root)

makeLabels

public void makeLabels()

getClipboard

public Clipboard getClipboard()

connectLabels

public void connectLabels(ArcLabel arclabel)

getLabel

public PNLabel getLabel(java.lang.String id)

notify

public void notify(PNLabel label)

newPlace

public void newPlace(int x,
                     int y)

newReferencePlace

public void newReferencePlace(int x,
                              int y)

newTimedTransition

public void newTimedTransition(int x,
                               int y)

newImmediateTransition

public void newImmediateTransition(int x,
                                   int y)

newTransition

protected TransitionLabel newTransition(int x,
                                        int y)

newSubnet

public void newSubnet(int x,
                      int y,
                      java.lang.String moduleRef,
                      java.lang.String importParam,
                      java.lang.String exportParam)

newRefLink

public void newRefLink()

newArc

public void newArc()

pastePlace

public java.lang.String pastePlace(org.jdom.Element clone)
Pastes a copied placeLabel into DisplayPane @return new id of label.

pasteTransition

public java.lang.String pasteTransition(org.jdom.Element clone)
Pastes a copied Transitionlabel into DisplayPane @return new id of label.

pasteReferencePlace

public java.lang.String pasteReferencePlace(org.jdom.Element clone)
Pastes a copied ReferencePlacelabel into DisplayPane @return new id of label.

pasteSubnetPlace

public java.lang.String pasteSubnetPlace(org.jdom.Element clone)
Pastes a copied Subnetlabel into DisplayPane @return new id of label.

pasteArcLabel

public java.lang.String pasteArcLabel(org.jdom.Element clone)
Pastes a copied arclabel into DisplayPane @return new id of label.

removeLabel

public void removeLabel(PNLabel label)

removeSelectionBox

public void removeSelectionBox()

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

calcPreferredSize

public void calcPreferredSize()
Can be called to calculate the required size to display all the objects in the net. The net must be already loaded in, as the positions of the PNLabels are examined to determine the size.
See Also:
EditorFrame.EditorFrameListener

isModule

public boolean isModule()

paintComponent

public void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class javax.swing.JComponent

addNode

public void addNode(org.jdom.Element e)

addArc

public void addArc(org.jdom.Element e)
Pastes a copied arc into DisplayPane

showContextMenu

public void showContextMenu(java.awt.event.MouseEvent e)
Brings up the right-click popup menu. The class is determined by the local variable propertiesbox.

instantiateSubnets

protected void instantiateSubnets()

closeSubnetInstances

public void closeSubnetInstances()

linkSubnet

public void linkSubnet(SubnetImportLabel importLabel,
                       SubnetExportLabel exportLabel)

highlightEnabled

public void highlightEnabled(boolean highlight)

highlightFire

public void highlightFire()