Package edu.tufts.hrilab.vision
Class PipelineVisualization
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
edu.tufts.hrilab.vision.PipelineVisualization
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears all drag nodesvoid
clearDragNodes
(SearchManager selected) Clears selected nodes from drag nodesvoid
Clears the highlighted pathvoid
Computes the placement of each search chainvoid
createNodes
(List<Long> displayedSearchManagers) Initializes the Nodes and populates the adjacency list from the set of all vision processorsvoid
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 nodeint
getNextIndex
(Long id) Will find the node that connects to the ID providedUnsure if this function is necessary.void
Initializes the adjacency listboolean
inSameSearch
(edu.tufts.hrilab.vision.PipelineVisualization.Node first, edu.tufts.hrilab.vision.PipelineVisualization.Node second) Checks to see if two nodes are neighbors.boolean
isHighlighted
(SearchManager selected) Return true if the given manager's path has been highlightedvoid
mouseDrag
(MouseEvent evt) Handles the actual dragging of the nodesvoid
mousePress
(MouseEvent evt) Initializes the dragging sequencevoid
mouseRelease
(MouseEvent evt) Places the node in the draggable node hashmap and updates the displayvoid
Shifts a Node's location to ensure that it does not overlap with the surrounding nodesvoid
Calls the drawComponnentNode function and draws the lines in between connecting Nodes.void
toHighlight
(SearchManager selected) Highlights the nodes in a given search manager sequencevoid
updateCurrentSearch
(SearchManager current) Will be updated with the searchmanager the user is currently clicking.void
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 itvoid
Checks to make sure that the nodes are within the bounds of the windowMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, 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, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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
add, add, add, add, add, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Method Details
-
initializeComponents
public void initializeComponents()Initializes the adjacency list -
createNodes
Initializes the Nodes and populates the adjacency list from the set of all vision processors -
toHighlight
Highlights the nodes in a given search manager sequence -
noOverlap
Shifts a Node's location to ensure that it does not overlap with the surrounding nodes- Parameters:
check
-location
-
-
isHighlighted
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
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
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
Calls the drawComponnentNode function and draws the lines in between connecting Nodes.- Overrides:
paintComponent
in classJComponent
- Parameters:
g
-
-
getPreferredSize
Unsure if this function is necessary.- Overrides:
getPreferredSize
in classJComponent
- 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
Initializes the dragging sequence- Parameters:
evt
-
-
updateCurrentSearch
Will be updated with the searchmanager the user is currently clicking. This is called by the PipelineWindow class currently- Parameters:
current
-
-
mouseRelease
Places the node in the draggable node hashmap and updates the display- Parameters:
evt
-
-
mouseDrag
Handles the actual dragging of the nodes- Parameters:
evt
-
-