public class DefaultNetworkView extends GraphView<Node,Arc>
Node
and Arc
objects using the DefaultNetworkFactory
.GraphView
,
DefaultRNView
,
Serialized FormGraphView.CircleGraphLayout, GraphView.EdgeOffset, GraphView.SelectionType, GraphView.VisualEdge, GraphView.VisualVertex
javax.swing.JComponent.AccessibleJComponent
DEF_EDGECOLOR, DEF_EDGELINEWIDTH, DEF_VERTEXBACKGROUND, DEF_VERTEXEDGEWIDTH, DEF_VERTEXFOREGROUND, VISUALGRAPHFILE_EXT
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
DefaultNetworkView(java.lang.String title,
Network<Node,Arc> network)
Creates a new default network view.
|
DefaultNetworkView(java.lang.String title,
Network<Node,Arc> network,
GraphLayout graphLayout)
Creates a new default network view.
|
DefaultNetworkView(java.lang.String title,
Network<Node,Arc> network,
GraphLayout graphLayout,
boolean closable,
LanguageFile langFile,
java.lang.String langID)
Creates a new default network view.
|
DefaultNetworkView(java.lang.String title,
Network<Node,Arc> network,
GraphLayout graphLayout,
boolean closable,
java.lang.String langID)
Creates a new default network view.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyAdvancedEdgeProperties(PropertiesListModel plm,
Arc edge)
Applies the advanced properties of an edge to the given edge.
|
protected void |
applyKeyboardInput(Arc edge,
java.lang.String input)
Applies the keyboard input the user has entered to an edge.
|
protected void |
applyKeyboardInput(Node vertex,
java.lang.String input)
Applies the keyboard input the user has entered to a vertex.
|
boolean |
getApplyInputToExcess()
Indicates whether a keyboard input should be applied to the excess of a
Node . |
boolean |
getApplyInputToFlow()
Indicates whether a keyboard input should be applied to the flow of an
Arc . |
Network<Node,Arc> |
getGraph()
Gets the network of the network view.
|
protected void |
loadAdvancedEdgeProperties(PropertiesListModel plm,
Arc edge)
Loads the advanced properties of an edge that aren't elements of the super class
Edge and adds them to
the properties list model. |
void |
setApplyInputToExcess(boolean apply)
Sets whether a keyboard input should be applied to the excess of a
Node . |
void |
setApplyInputToFlow(boolean apply)
Sets whether a keyboard input should be applied to the flow of an
Arc . |
void |
setGraph(Graph<Node,Arc> network)
Sets the network of the network view.
|
addGraphViewListener, addToolbarButton, addVisualObject, afterPaint, afterVisualEdgeCreated, afterVisualVertexCreated, applyAdvancedVertexProperties, autoRepaint, beforePaint, beforeVisualEdgeCreated, beforeVisualVertexCreated, createCircleGraphLayout, createVisualEdge, createVisualEdge, createVisualVertex, deselectAll, deserialize, getAutoRepaint, getEdgeFromPosition, getEdgeOffsetDistance, getEdgeToolColor, getFont, getGraphFactory, getLastZoom, getScaledVertexRadius, getSelectedEdge, getSelectedEdgeCount, getSelectedVertex, getSelectedVertexCount, getSelectionColor, getSelectionType, getVertexFromPosition, getVisualEdge, getVisualEdge, getVisualEdgeByID, getVisualEdgeCount, getVisualObject, getVisualObjectCount, getVisualVertex, getVisualVertex, getVisualVertexByCaption, getVisualVertexByID, getVisualVertexCount, getVPASTolerance, getZoom, hasDynamicEdgeLabeling, hasRestorableEditMode, ignoreKeyboardInput, isEditable, layoutGraph, load, load, loadAdvancedVertexProperties, readConfigurationData, removeAllEdges, removeAllVertices, removeAllVisualObjects, removeGraphViewListener, removeVisualEdge, removeVisualObject, removeVisualVertex, repaintComponent, requestOffsetEdges, reset, resetVisualAppearance, save, save, saveAsPNG, saveAsPNG, selectEdge, selectEdges, selectTool, selectVertex, selectVertices, serialize, setAutoRepaint, setDynamicEdgeLabeling, setEdgeOffsetDistance, setEdgeRenderer, setEdgeToolColor, setEditable, setFont, setHideGraphToolsAlways, setRestorableEditMode, setSelectionColor, setSelectionType, setShowCursorToolAlways, setShowZoomToolsAlways, setVertexRenderer, setVPASTolerance, setZoom, transferGraph, writeConfigurationData, zoomIn, zoomOut
addHeaderBarComponent, addHeaderBarSeparator, addImpl, beforeRemove, close, extendTitle, getContentPanel, getTitle, highlight, highlight, isClosable, isVisible, loadConfiguration, loadConfiguration, removeAll, removeHeaderBarComponent, saveConfiguration, saveConfiguration, setBorder, setCloseButtonToolTip, setLayout, setVisible, toString
isRepaintDisabled, repaint, setRepaintDisabled
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, 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, paintComponent, paintImmediately, paintImmediately, paramString, 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, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, 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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public DefaultNetworkView(java.lang.String title, Network<Node,Arc> network) throws java.lang.IllegalArgumentException
title
- the title of the view which is displayed in the header barnetwork
- the networkjava.lang.IllegalArgumentException
- public DefaultNetworkView(java.lang.String title, Network<Node,Arc> network, GraphLayout graphLayout) throws java.lang.IllegalArgumentException
title
- the title of the view which is displayed in the header barnetwork
- the networkgraphLayout
- the graph layout to layout the nodes of the network automatically or null
for the default layoutjava.lang.IllegalArgumentException
- public DefaultNetworkView(java.lang.String title, Network<Node,Arc> network, GraphLayout graphLayout, boolean closable, java.lang.String langID) throws java.lang.IllegalArgumentException
title
- the title of the view which is displayed in the header barnetwork
- the networkgraphLayout
- the graph layout to layout the nodes of the network automatically or null
for the default layoutclosable
- true
if the network view can be closed by the user using the "X" in the header bar otherwise false
(if a network view is not closable he must be set invisible manually using View.setVisible(boolean)
if required)langID
- the language idjava.lang.IllegalArgumentException
- public DefaultNetworkView(java.lang.String title, Network<Node,Arc> network, GraphLayout graphLayout, boolean closable, LanguageFile langFile, java.lang.String langID) throws java.lang.IllegalArgumentException
title
- the title of the view which is displayed in the header barnetwork
- the networkgraphLayout
- the graph layout to layout the nodes of the network automatically or null
for the default layoutclosable
- true
if the network view can be closed by the user using the "X" in the header bar otherwise false
(if a network view is not closable he must be set invisible manually using View.setVisible(boolean)
if required)langFile
- the language file or null
if the default network view should not use language dependent labels, tooltips or messages (in this case the predefined labels, tooltips and messages are shown)langID
- the language idjava.lang.IllegalArgumentException
- public Network<Node,Arc> getGraph()
public void setGraph(Graph<Node,Arc> network) throws java.lang.IllegalArgumentException
GraphView.layoutGraph(GraphLayout)
otherwise existing vertices will be positioned at (0,0).
public boolean getApplyInputToFlow()
Arc
.
true
if the keyboard input changes the flow or false
if the keyboard input changes the weightpublic void setApplyInputToFlow(boolean apply)
Arc
.
apply
- true
if the keyboard input should change the flow or false
if the keyboard input should change the weightpublic boolean getApplyInputToExcess()
Node
.
true
if the keyboard input changes the excess or false
if the keyboard input changes the captionpublic void setApplyInputToExcess(boolean apply)
Node
.
apply
- true
if the keyboard input changes the excess or false
if the keyboard input changes the captionprotected void loadAdvancedEdgeProperties(PropertiesListModel plm, Arc edge)
GraphView
Edge
and adds them to
the properties list model.
Edge
are covered by the graph view.loadAdvancedEdgeProperties
in class GraphView<Node,Arc>
plm
- the properties list modeledge
- the edge which properties should be loadedprotected void applyAdvancedEdgeProperties(PropertiesListModel plm, Arc edge)
GraphView
Edge
are covered by the graph view.applyAdvancedEdgeProperties
in class GraphView<Node,Arc>
plm
- the properties list modeledge
- the edge which properties changedprotected void applyKeyboardInput(Arc edge, java.lang.String input)
GraphView
applyKeyboardInput
in class GraphView<Node,Arc>
edge
- the edgeinput
- the input stringprotected void applyKeyboardInput(Node vertex, java.lang.String input)
GraphView
applyKeyboardInput
in class GraphView<Node,Arc>
vertex
- the vertexinput
- the input string