public class IOGraphPanel<V extends Comparable,E> extends JPanel implements TreeSelectionListener, MouseListener, MouseMotionListener, MouseWheelListener, ActionListener
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected Vector<Vector<Color>> |
edge_colors |
protected Vector<Vector<String>> |
edge_strings |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
IOGraphPanel()
Class constructor.
|
IOGraphPanel(IOGraph<V,E> iograph,
int rings)
Class constructor.
|
IOGraphPanel(IOGraph<V,E> iograph,
int width,
int height,
int rings)
Class constructor.
|
IOGraphPanel(IOGraph<V,E> iograph,
int width,
int height,
int rings,
String edges_alias)
Class constructor.
|
IOGraphPanel(IOGraph<V,E> iograph,
int rings,
String edges_alias)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e)
The action listener used to handle menu events.
|
void |
addPopupMenu(JMenuItem item)
Add a new item to the popup menu.
|
static void |
arrangePointsInRings(Vector<PolyglotAuxiliary.Point2D> vertices,
Vector<Boolean> active_vertices,
int width,
int height,
int rings,
double theta0)
Set vertex positions to form a circular graph.
|
void |
computePath() |
JSplitPane |
getAuxiliaryInterfacePane()
Return an auxiliary interface pane.
|
static void |
main(String[] args)
The main starting point for this program.
|
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent e)
The mouse dragged listener used to select edges.
|
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e)
The mouse pressed listener used to open the popup menu.
|
void |
mouseReleased(MouseEvent e)
The mouse released listener used to de-select edges.
|
void |
mouseWheelMoved(MouseWheelEvent e)
Handle mouse wheel events.
|
void |
paint(Graphics g)
Draw the graph to the given graphics context.
|
void |
paintComponent(Graphics g)
Draw this component (called during resizing!)
|
void |
setEdgeColor(int color)
Set the edge color.
|
void |
setEnableWeightedPaths(boolean b)
Enable/disable the use of weighted paths when searching for conversions in the graph.
|
void |
setOutputPanelHeight(int height)
Set the height of the output panel.
|
void |
setSidePaneWidth(int width)
Set the width of the auxiliary side pane.
|
void |
setVertexColor(int color)
Set the vertex color.
|
void |
setViewEdgeQuality(boolean b)
Enable/disable the display of edge quality information in the graph.
|
void |
valueChanged(TreeSelectionEvent e)
The tree selection listener used to handle selections in the side tree.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, getPreferredSize, 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, 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, updateadd, 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, validateTreeaction, 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, 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, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic IOGraphPanel()
public IOGraphPanel(IOGraph<V,E> iograph, int rings)
iograph - the I/O-Graphrings - the number of rings used when displaying the graphpublic IOGraphPanel(IOGraph<V,E> iograph, int rings, String edges_alias)
iograph - the I/O-Graphrings - the number of rings used when displaying the graphedges_alias - the alias to use for edgespublic IOGraphPanel(IOGraph<V,E> iograph, int width, int height, int rings)
iograph - the I/O-Graphwidth - the width of the panelheight - the height of the panelrings - the number of rings used when displaying the graphpublic IOGraphPanel(IOGraph<V,E> iograph, int width, int height, int rings, String edges_alias)
iograph - the I/O-Graphwidth - the width of the panelheight - the height of the panelrings - the number of rings used when displaying the graphedges_alias - the alias to use for edgespublic void addPopupMenu(JMenuItem item)
item - the item to be added.public void setSidePaneWidth(int width)
width - the desired width of the auxiliary side panepublic void setOutputPanelHeight(int height)
height - the desired height of the output panelpublic void setVertexColor(int color)
color - the color to use for verticespublic void setEdgeColor(int color)
color - the color to use for edgespublic void setViewEdgeQuality(boolean b)
b - enable/disable edge quality valuespublic void setEnableWeightedPaths(boolean b)
b - enable/disable weighted pathspublic JSplitPane getAuxiliaryInterfacePane()
public void paintComponent(Graphics g)
paintComponent in class JComponentg - the graphics context to draw topublic void paint(Graphics g)
paint in class JComponentg - the graphics context to draw topublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenere - the action eventpublic void computePath()
public void valueChanged(TreeSelectionEvent e)
valueChanged in interface TreeSelectionListenere - the tree selection eventpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenere - the mouse eventpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenere - the mouse eventpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenere - the mouse eventpublic void mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved in interface MouseWheelListenere - a mouse wheel eventpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenerpublic static void arrangePointsInRings(Vector<PolyglotAuxiliary.Point2D> vertices, Vector<Boolean> active_vertices, int width, int height, int rings, double theta0)
vertices - the verticesactive_vertices - a list of currently active verticeswidth - the width of the panel graph will be displayed inheight - the height of the panel graph will be displayed inrings - the number of ringstheta0 - the initial offset angle to start placing vertices (in degrees)public static void main(String[] args)
args - command line argumentsCopyright © 2014. All rights reserved.