ptolemy.vergil.gt
Class GTFrameController

java.lang.Object
  extended by ptolemy.vergil.gt.GTFrameController
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener, javax.swing.event.ChangeListener

public class GTFrameController
extends java.lang.Object
implements javax.swing.event.ChangeListener, java.awt.event.KeyListener

Since:
Ptolemy II 6.1
Version:
$Id: GTFrameController.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Thomas Huining Feng
Accepted Rating:
Red (tfeng)
Proposed Rating:
Red (tfeng)

Nested Class Summary
static class GTFrameController.GTActorGraphModel
           
static class GTFrameController.GTFSMGraphModel
           
static interface GTFrameController.UpdateController
           
 
Field Summary
private  int _activeTabIndex
           
private  GTFrame _frame
           
private  RunnableGraphController _graphController
           
private  java.util.List<GraphPane> _graphPanes
           
private  java.util.List<JGraph> _graphs
           
private  javax.swing.JTabbedPane _tabbedPane
           
 
Constructor Summary
protected GTFrameController(GTFrame frame)
           
 
Method Summary
private  JGraph _addTabbedPane(CompositeActorMatcher matcher, boolean newPane)
          Add a tabbed pane for the specified matcher.
protected  AbstractBasicGraphModel _createGraphModel(NamedObj entity)
           
protected  GraphPane _createGraphPane(NamedObj entity)
           
protected  javax.swing.JComponent _createRightComponent(NamedObj entity)
           
private  boolean _isFSM(NamedObj entity)
           
protected  void _removeListeners()
           
private  void _showTab(int tabIndex)
           
 CompositeEntity getActiveModel()
           
 int getActiveTabIndex()
           
 Configuration getConfiguration()
           
 RunnableGraphController getGraphController()
           
 java.util.List<GraphPane> getGraphPanes()
           
 JGraph getJGraph()
          Return the JGraph instance that this view uses to represent the ptolemy model.
 java.util.List<JGraph> getJGraphs()
           
 javax.swing.JTabbedPane getTabbedPane()
           
 TransformationRule getTransformationRule()
           
 boolean hasTabs()
           
 boolean isTableActive()
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void stateChanged(javax.swing.event.ChangeEvent event)
          React to a change in the state of the tabbed pane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_activeTabIndex

private int _activeTabIndex

_frame

private GTFrame _frame

_graphController

private RunnableGraphController _graphController

_graphPanes

private java.util.List<GraphPane> _graphPanes

_graphs

private java.util.List<JGraph> _graphs

_tabbedPane

private javax.swing.JTabbedPane _tabbedPane
Constructor Detail

GTFrameController

protected GTFrameController(GTFrame frame)
Method Detail

getActiveModel

public CompositeEntity getActiveModel()

getActiveTabIndex

public int getActiveTabIndex()

getConfiguration

public Configuration getConfiguration()

getGraphController

public RunnableGraphController getGraphController()

getGraphPanes

public java.util.List<GraphPane> getGraphPanes()

getJGraph

public JGraph getJGraph()
Return the JGraph instance that this view uses to represent the ptolemy model.

Returns:
the JGraph.
See Also:
BasicGraphFrame.getJGraph(), BasicGraphFrame.setJGraph(JGraph)

getJGraphs

public java.util.List<JGraph> getJGraphs()

getTabbedPane

public javax.swing.JTabbedPane getTabbedPane()

getTransformationRule

public TransformationRule getTransformationRule()

hasTabs

public boolean hasTabs()

isTableActive

public boolean isTableActive()

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent event)
React to a change in the state of the tabbed pane.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
event - The event.

_createGraphModel

protected AbstractBasicGraphModel _createGraphModel(NamedObj entity)

_createGraphPane

protected GraphPane _createGraphPane(NamedObj entity)

_createRightComponent

protected javax.swing.JComponent _createRightComponent(NamedObj entity)

_removeListeners

protected void _removeListeners()

_addTabbedPane

private JGraph _addTabbedPane(CompositeActorMatcher matcher,
                              boolean newPane)
Add a tabbed pane for the specified matcher.

Parameters:
matcher - The matcher
newPane - True to add the pane prior to the last pane.
Returns:
The pane.

_isFSM

private boolean _isFSM(NamedObj entity)

_showTab

private void _showTab(int tabIndex)