N
- The node class for the trees and graphsE
- The edge class for graph edgespublic class RadialDisplay<N,E> extends PrefuseTreeDisplay<N,E>
Display which arranges the graph or tree nodes radially around a selected node. By default, the most connected node is used as the center node. This results in a fairly well-distributed arrangement. *
The display also supports several interactive methods. When a node is single-clicked, it is selected. As the mouse moves over other nodes, the path from the selected node to the node the mouse is over is highlighted. This shows the path of connections between any two nodes. When a node is double-clicked, is it set as the central node in the display. The display will rearrange itself with the new center point. Clicking and holding the left mouse button when not over a node allows the user to pan the display. Holding the right mouse button and moving the mouse up and down, or using the middle mouse dial, will zoom the display in and out.
This class is an adaptation of the prefuse.demos.RadialGraphView class as a Prajna display, and includes significant code segments from the original class. The Prajna Project respects all rights of the original class.
javax.swing.JComponent.AccessibleJComponent
frameRate, m_bgpainter, m_bounders, m_bounds, m_clip, m_controls, m_customToolTip, m_damageRedraw, m_highQuality, m_itransform, m_offscreen, m_painters, m_predicate, m_queue, m_rclip, m_screen, m_tmpPoint, m_transact, m_transform, m_vis, m_visibleCount, nframes
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
RadialDisplay()
Build a RadialDisplay
|
Modifier and Type | Method and Description |
---|---|
void |
setZoom(float zoom)
Set the zoom factor for the display.
|
getPrefuseTree, getTree, setTree, updateTree
addHoverListener, addItemListener, displayGraph, fireHoverStateChanged, fireItemStateChanged, getConverter, getGraph, getPrefuseGraph, getSelectedEdge, getSelectedNode, getSelectedObjects, hasInteractiveEdges, highlight, pickItem, removeHoverListener, removeItemListener, selectEdge, selectNode, setConverter, setGraph, setRenderer, setVisible, updateGraph
addControlListener, addItemBoundsListener, addPaintListener, animatePan, animatePanAbs, animatePanAndZoomTo, animatePanAndZoomToAbs, animatePanTo, animatePanToAbs, animateZoom, animateZoomAbs, checkItemBoundsChanged, clearDamage, clearRegion, createToolTip, damageReport, damageReport, editText, editText, editText, findItem, firePostPaint, firePrePaint, getAbsoluteCoordinate, getCustomToolTip, getDisplayX, getDisplayY, getFrameRate, getInverseTransform, getItemBounds, getItemBounds, getItemSorter, getNewOffscreenBuffer, getOffscreenBuffer, getPredicate, getScale, getTextEditor, getTransform, getVisibleItemCount, getVisualization, invalidate, isDamageRedraw, isHighQuality, isTranformInProgress, paintBufferToScreen, paintComponent, paintDisplay, pan, panAbs, panTo, panToAbs, prepareGraphics, printComponent, registerDefaultCommands, removeControlListener, removeItemBoundsListener, removePaintListener, renderImmediate, repaintImmediate, rotate, rotateAbs, saveImage, setBackgroundImage, setBackgroundImage, setBounds, setCustomToolTip, setDamageRedraw, setFont, setHighQuality, setItemSorter, setPredicate, setPredicate, setRenderingHints, setSize, setSize, setTextEditor, setTransform, setVisualization, stopEditing, update, zoom, zoomAbs
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, 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, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateUI
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, 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
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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSelectedNode, selectNode
public void setZoom(float zoom)
setZoom
in class PrefuseGraphDisplay<N,E>
zoom
- the zoom factor