edu.williams.cs.ljil.finitizer.ui
Class ProcessViewPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTabbedPane
                  extended by edu.williams.cs.ljil.finitizer.ui.ProcessViewPane
All Implemented Interfaces:
DiagramChangeListener, TransformationListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants

public class ProcessViewPane
extends javax.swing.JTabbedPane
implements TransformationListener, DiagramChangeListener

UI Pane component for viewing (and light editing) of a process within the FSP Builder.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListener
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  java.util.Map diagramToTabcomponent
          A mapping from diagrams to the tabs they are displayed on.
protected  java.util.Vector highlighted
          The list of all highlighted steps.
protected  java.util.Map stepToTabcomponent
          A mapping from steps to the tabs they are displayed on.
 
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
 
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 javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ProcessViewPane(FSPBuilder fspb)
          Create a JTabbedPane and a display a process in it.
 
Method Summary
protected  void addTabForDiagram(laser.littlejil.Diagram d)
          Add a tab to the pane for a diagram.
 void applied(Transformation t)
          Highlights steps that have had resolutions selected.
 javax.swing.JComponent getViewForStep(laser.littlejil.AbstractStep s)
          Get views for a given step from its first diagram.
 void highlight(Issue i)
          Highlight the steps and references relevant to the given issue.
protected  void highlightStep(laser.littlejil.AbstractStep step, java.awt.Color color, boolean trackHighlight)
          Highlight an individual step.
 void refreshDiagramViewsForStep(laser.littlejil.AbstractStep s)
          Refresh Diagram for the given step
 void stepAdded(laser.littlejil.AbstractStep step, laser.littlejil.AbstractBinding parentBinding, laser.littlejil.Diagram stepDiagram)
          Adds a step to a diagram.
 void stepRemoved(laser.littlejil.AbstractStep step, laser.littlejil.AbstractBinding parentBinding, laser.littlejil.Diagram olddiagram)
          Removes a step from a diagram
 void unapplied(Transformation t)
          Unhighlights steps that no longer have resolutions pending.
protected  void unhighlightAll()
          Unhighlight all steps.
 
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, 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, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, 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, hide, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stepToTabcomponent

protected final java.util.Map stepToTabcomponent
A mapping from steps to the tabs they are displayed on.


diagramToTabcomponent

protected final java.util.Map diagramToTabcomponent
A mapping from diagrams to the tabs they are displayed on.


highlighted

protected final java.util.Vector highlighted
The list of all highlighted steps.

Constructor Detail

ProcessViewPane

public ProcessViewPane(FSPBuilder fspb)
Create a JTabbedPane and a display a process in it. Each diagram in the process has a tab associated with it.

Method Detail

addTabForDiagram

protected void addTabForDiagram(laser.littlejil.Diagram d)
Add a tab to the pane for a diagram.

Parameters:
d - The diagram to add a tab for. It may not be null.

refreshDiagramViewsForStep

public void refreshDiagramViewsForStep(laser.littlejil.AbstractStep s)
Refresh Diagram for the given step

Parameters:
s - the step whose diagram should be redrawn. s may not be null and must be on some diagram.

getViewForStep

public javax.swing.JComponent getViewForStep(laser.littlejil.AbstractStep s)
Get views for a given step from its first diagram. Is there ever more than one view for a step???? Why does it make sense to only look at one diagram???

Parameters:
s - the step whose views are returned. s may not be null and must be on some diagram.

unhighlightAll

protected void unhighlightAll()
Unhighlight all steps.


highlight

public void highlight(Issue i)
Highlight the steps and references relevant to the given issue.

Parameters:
i - the issue whose relevant steps are highlighted.

highlightStep

protected void highlightStep(laser.littlejil.AbstractStep step,
                             java.awt.Color color,
                             boolean trackHighlight)
Highlight an individual step.

Parameters:
step - the step to highlight
color - the color to use for the background
trackHighlight - remember that the step is highlighted.

applied

public void applied(Transformation t)
Highlights steps that have had resolutions selected.

Specified by:
applied in interface TransformationListener
Parameters:
t - A transformation that was used to apply a resolution.
See Also:
fspbuilder.TransformationListener#applied(fspbuilder.PendingTransformation)

unapplied

public void unapplied(Transformation t)
Unhighlights steps that no longer have resolutions pending.

Specified by:
unapplied in interface TransformationListener
Parameters:
t -
See Also:
fspbuilder.TransformationListener#unapplied(fspbuilder.PendingTransformation)

stepAdded

public void stepAdded(laser.littlejil.AbstractStep step,
                      laser.littlejil.AbstractBinding parentBinding,
                      laser.littlejil.Diagram stepDiagram)
Adds a step to a diagram.

Specified by:
stepAdded in interface DiagramChangeListener
Parameters:
step - the step that was added
parentBinding - the binding from the step to its parent that was added
stepDiagram - the diagram that was modified
See Also:
fspbuilder.DiagramChangeListener#stepAdded(laser.littlejil.Step)

stepRemoved

public void stepRemoved(laser.littlejil.AbstractStep step,
                        laser.littlejil.AbstractBinding parentBinding,
                        laser.littlejil.Diagram olddiagram)
Removes a step from a diagram

Specified by:
stepRemoved in interface DiagramChangeListener
Parameters:
step - the step to remove
olddiagram - the diagram the step is on
See Also:
fspbuilder.DiagramChangeListener#stepWillBeRemoved(laser.littlejil.Step)