edu.jhu.ece.iacl.jist.pipeline.graph
Class PipeJGraph

java.lang.Object
  extended by JGraph
      extended by edu.jhu.ece.iacl.jist.pipeline.graph.PipeJGraph
All Implemented Interfaces:
PipeModule.PipeListener, PipePort.PortListener, java.awt.dnd.DropTargetListener, java.util.EventListener

public class PipeJGraph
extends JGraph
implements java.awt.dnd.DropTargetListener, PipeModule.PipeListener

MAPS customized graph.

Author:
Blake Lucas (bclucas@jhu.edu)

Field Summary
protected  PipePort portCheck
          The port check.
 
Constructor Summary
PipeJGraph(PipeInternalFrame parent)
          References the folding manager.
 
Method Summary
 void connectAction(PipePort owner)
          Connect action.
protected  DefaultGraphCell createDefaultGraphCell(DraggableNode node)
          Creates the default graph cell.
 PipeModuleCell createGraphNode(PipeModule mod)
          Creates the graph node.
 boolean createUniqueName(PipeModule pipe)
          Creates the unique name.
 void disconnectAction(PipePort owner, PipePort child, PipeConnector wire)
          Disconnect action.
 void dispose()
          Dispose.
 void dragEnter(java.awt.dnd.DropTargetDragEvent e)
           
 void dragExit(java.awt.dnd.DropTargetEvent e)
           
 void dragOver(java.awt.dnd.DropTargetDragEvent e)
          DropTaregetListener interface method.
 void drop(java.awt.dnd.DropTargetDropEvent e)
          DropTargetListener interface method - What we do when drag is released.
 void dropActionChanged(java.awt.dnd.DropTargetDragEvent arg0)
           
 java.awt.Point getCurrentLocation()
          Gets the current location.
 PipeLayout getPipelineLayout()
          Gets the pipeline layout.
 PipePort getPortToCheck()
          Get port to check for compatibility.
 void graphChanged(GraphModelEvent e)
           
 void insert(DraggableNode node, java.awt.Point cursorLocationBins)
          Insert.
 void refresh()
          Refresh.
 void setPipelineLayout(PipeLayout layout, javax.swing.ProgressMonitor monitor)
          Sets the pipeline layout.
 void setPortToCheck(PipePort port)
          Set port to check for compatibility.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portCheck

protected PipePort portCheck
The port check.

Constructor Detail

PipeJGraph

public PipeJGraph(PipeInternalFrame parent)
References the folding manager.

Parameters:
parent - the parent
Method Detail

connectAction

public void connectAction(PipePort owner)
Description copied from interface: PipePort.PortListener
Connect action.

Specified by:
connectAction in interface PipePort.PortListener
Parameters:
owner - the owner

createDefaultGraphCell

protected DefaultGraphCell createDefaultGraphCell(DraggableNode node)
Creates the default graph cell.

Parameters:
node - the node
Returns:
the default graph cell

createGraphNode

public PipeModuleCell createGraphNode(PipeModule mod)
Creates the graph node.

Parameters:
mod - the mod
Returns:
the pipe module cell

createUniqueName

public boolean createUniqueName(PipeModule pipe)
Creates the unique name.

Parameters:
pipe - the pipe
Returns:
true, if successful

disconnectAction

public void disconnectAction(PipePort owner,
                             PipePort child,
                             PipeConnector wire)
Description copied from interface: PipePort.PortListener
Disconnect action.

Specified by:
disconnectAction in interface PipePort.PortListener
Parameters:
owner - the owner
child - the child
wire - the wire

dispose

public void dispose()
Dispose.


dragEnter

public void dragEnter(java.awt.dnd.DropTargetDragEvent e)
Specified by:
dragEnter in interface java.awt.dnd.DropTargetListener

dragExit

public void dragExit(java.awt.dnd.DropTargetEvent e)
Specified by:
dragExit in interface java.awt.dnd.DropTargetListener

dragOver

public void dragOver(java.awt.dnd.DropTargetDragEvent e)
DropTaregetListener interface method.

Specified by:
dragOver in interface java.awt.dnd.DropTargetListener
Parameters:
e - the e

drop

public void drop(java.awt.dnd.DropTargetDropEvent e)
DropTargetListener interface method - What we do when drag is released.

Specified by:
drop in interface java.awt.dnd.DropTargetListener
Parameters:
e - the e

dropActionChanged

public void dropActionChanged(java.awt.dnd.DropTargetDragEvent arg0)
Specified by:
dropActionChanged in interface java.awt.dnd.DropTargetListener

getCurrentLocation

public java.awt.Point getCurrentLocation()
Gets the current location.

Returns:
the current location

getPipelineLayout

public PipeLayout getPipelineLayout()
Gets the pipeline layout.

Returns:
the pipeline layout

getPortToCheck

public PipePort getPortToCheck()
Get port to check for compatibility.

Returns:
the port to check

graphChanged

public void graphChanged(GraphModelEvent e)

insert

public void insert(DraggableNode node,
                   java.awt.Point cursorLocationBins)
Insert.

Parameters:
node - the node
cursorLocationBins - the cursor location bins

refresh

public void refresh()
Refresh.


setPipelineLayout

public void setPipelineLayout(PipeLayout layout,
                              javax.swing.ProgressMonitor monitor)
Sets the pipeline layout.

Parameters:
layout - the layout
monitor - the monitor

setPortToCheck

public void setPortToCheck(PipePort port)
Set port to check for compatibility.

Parameters:
port - the port