Class PipelineVisualization

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PipelineVisualization extends JPanel
PipelineVisualization is the visualization of the vision system. This includes detectors, trackers, and all other image processors. Reference for some of this code was donahut's DIARC GUI - Nicholas Barris
See Also:
  • Method Details

    • initializeComponents

      public void initializeComponents()
      Initializes the adjacency list
    • createNodes

      public void createNodes(List<Long> displayedSearchManagers)
      Initializes the Nodes and populates the adjacency list from the set of all vision processors
    • toHighlight

      public void toHighlight(SearchManager selected)
      Highlights the nodes in a given search manager sequence
    • noOverlap

      public void noOverlap(edu.tufts.hrilab.vision.PipelineVisualization.Node check, Point location)
      Shifts a Node's location to ensure that it does not overlap with the surrounding nodes
      Parameters:
      check -
      location -
    • isHighlighted

      public boolean isHighlighted(SearchManager selected)
      Return true if the given manager's path has been highlighted
      Parameters:
      selected -
      Returns:
    • clearHighlight

      public void clearHighlight()
      Clears the highlighted path
    • clearDragNodes

      public void clearDragNodes()
      Clears all drag nodes
    • clearDragNodes

      public void clearDragNodes(SearchManager selected)
      Clears selected nodes from drag nodes
      Parameters:
      selected -
    • computeLayout

      public void computeLayout()
      Computes the placement of each search chain
    • windowCheck

      public void windowCheck()
      Checks to make sure that the nodes are within the bounds of the window
    • getNextIndex

      public int getNextIndex(Long id)
      Will find the node that connects to the ID provided
      Parameters:
      id - - Finds the location of the component id
      Returns:
    • displayNodeInfo

      public void displayNodeInfo(edu.tufts.hrilab.vision.PipelineVisualization.Node clickedNode, Point location)
      Will display info on Node that is double clicked in the location that the mouse is in when it clicks the node
      Parameters:
      clickedNode -
      location -
    • updateDisplayNodeInfo

      public void updateDisplayNodeInfo()
      Update the Node Info that exists on the screen If you are trying to update what is displayed for each node, here is the place to do it
    • paintComponent

      public void paintComponent(Graphics g)
      Calls the drawComponnentNode function and draws the lines in between connecting Nodes.
      Overrides:
      paintComponent in class JComponent
      Parameters:
      g -
    • getPreferredSize

      public Dimension getPreferredSize()
      Unsure if this function is necessary.
      Overrides:
      getPreferredSize in class JComponent
      Returns:
    • inSameSearch

      public boolean inSameSearch(edu.tufts.hrilab.vision.PipelineVisualization.Node first, edu.tufts.hrilab.vision.PipelineVisualization.Node second)
      Checks to see if two nodes are neighbors.
    • mousePress

      public void mousePress(MouseEvent evt)
      Initializes the dragging sequence
      Parameters:
      evt -
    • updateCurrentSearch

      public void updateCurrentSearch(SearchManager current)
      Will be updated with the searchmanager the user is currently clicking. This is called by the PipelineWindow class currently
      Parameters:
      current -
    • mouseRelease

      public void mouseRelease(MouseEvent evt)
      Places the node in the draggable node hashmap and updates the display
      Parameters:
      evt -
    • mouseDrag

      public void mouseDrag(MouseEvent evt)
      Handles the actual dragging of the nodes
      Parameters:
      evt -