public class NetGraph extends JGraph
JGraph.EmptySelectionModel, JGraph.GraphSelectionRedirector
javax.swing.JComponent.AccessibleJComponent
antiAliased, ANTIALIASED_PROPERTY, autoResizeGraph, backgroundComponent, backgroundImage, backgroundScaled, bendable, cloneable, connectable, CROSS_GRID_MODE, disconnectable, disconnectOnMove, DOT_GRID_MODE, dragEnabled, dropEnabled, edgeLabelsMovable, editable, EDITABLE_PROPERTY, editClickCount, enabled, GRAPH_LAYOUT_CACHE_PROPERTY, GRAPH_MODEL_PROPERTY, graphLayoutCache, graphModel, GRID_COLOR_PROPERTY, GRID_SIZE_PROPERTY, GRID_VISIBLE_PROPERTY, gridColor, gridEnabled, gridMode, gridSize, gridVisible, groupsEditable, HANDLE_COLOR_PROPERTY, HANDLE_SIZE_PROPERTY, handleColor, handleSize, highlightColor, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, IS_MAC, isJumpToDefaultPort, isMoveIntoGroups, isMoveOutOfGroups, lastBufferAllocated, LINE_GRID_MODE, LOCKED_HANDLE_COLOR_PROPERTY, lockedHandleColor, marquee, MARQUEE_HANDLER_PROPERTY, marqueeColor, minimumMove, moveable, moveBelowZero, moveBeyondGraphBounds, offgraphics, offscreen, offscreenBounds, offscreenBuffer, offscreenDirty, offscreenOffset, PORTS_SCALED_PROPERTY, PORTS_VISIBLE_PROPERTY, portsOnTop, portsScaled, portsVisible, previewInvalidNullPorts, PROPERTY_BACKGROUNDIMAGE, scale, SCALE_PROPERTY, SELECTION_MODEL_PROPERTY, selectionEnabled, SELECTIONENABLED_PROPERTY, selectionModel, selectionRedirector, sizeable, tolerance, VERSION, volatileOffscreen, xorEnabled
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
NetGraph() |
NetGraph(YDecomposition decomposition) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsIncomingFlows(YAWLCell cell) |
void |
addCellToCancellationSet(YAWLCell cell) |
void |
addElement(YAWLVertex element) |
void |
addSelectedCellsToVisibleCancellationSet() |
boolean |
areConnected(YAWLCell sourceCell,
YAWLCell targetCell) |
void |
buildNewGraphContent() |
void |
buildNewGraphContent(java.awt.Rectangle bounds) |
void |
changeCancellationSet(YAWLTask task) |
void |
changeCellBackground(GraphCell cell,
java.awt.Color color) |
void |
changeCellForeground(GraphCell cell,
java.awt.Color color) |
void |
changeLineWidth(YAWLVertex cell) |
void |
connect(YAWLFlowRelation flow,
YAWLPort source,
YAWLPort target) |
void |
connect(YAWLFlowRelation flow,
YAWLVertex source,
YAWLVertex target) |
YAWLFlowRelation |
connect(YAWLPort source,
YAWLPort target) |
boolean |
connectionAllowable(Port source,
Port target) |
void |
decreaseSelectedVertexSize() |
boolean |
generatesOutgoingFlows(YAWLCell cell) |
CancellationSetModel |
getCancellationSetModel() |
java.awt.Color |
getCellForeground(GraphCell cell) |
java.util.Set |
getEdges(YAWLCell[] cells) |
java.lang.String |
getElementLabel(GraphCell vertex) |
YAWLEditorNetPanel |
getFrame() |
java.lang.String |
getName() |
NetMarqueeHandler |
getNetMarqueeHandler() |
NetGraphModel |
getNetModel() |
java.awt.Dimension |
getPreferredSize() |
NetSelectionListener |
getSelectionListener() |
YAWLCell |
getSourceOf(Edge edge) |
YAWLCell |
getTargetOf(Edge edge) |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent event)
Overrides
JComponent 'sgetToolTipText
method in order to allow the graph to create a tooltip for the topmost
cell under the mousepointer. |
YAWLTask |
getTriggeringTaskOfCurrentCancellationSet() |
VertexView |
getVertexViewFor(GraphCell cell) |
CellView |
getViewFor(GraphCell cell) |
boolean |
hasIncomingFlow(YAWLCell cell) |
boolean |
hasOutgoingFlow(YAWLCell cell) |
void |
increaseSelectedVertexSize() |
boolean |
isGroup(java.lang.Object cell)
Returns true if
object is a vertex, that is, if it
is not an instance of Port or Edge, and all of its children are
ports, or it has no children. |
void |
moveElementBy(GraphCell cell,
double x,
double y) |
void |
moveElementsBy(java.lang.Object[] cells,
double x,
double y) |
void |
moveElementTo(GraphCell cell,
double x,
double y) |
void |
moveSelectedElementsDown() |
void |
moveSelectedElementsLeft() |
void |
moveSelectedElementsRight() |
void |
moveSelectedElementsUp() |
void |
removeCellFromCancellationSet(YAWLCell cell) |
void |
removeCellFromCancellationSetInsideUpdate(YAWLCell cell) |
java.util.Set<java.lang.Object> |
removeCellsAndTheirEdges(java.lang.Object[] cells) |
java.util.Set<java.lang.Object> |
removeSelectedCellsAndTheirEdges() |
void |
removeSelectedCellsFromVisibleCancellationSet() |
void |
resetCancellationSet() |
void |
setElementLabel(GraphCell vertex,
java.lang.String labelString) |
void |
setElementLabelInsideUpdate(GraphCell vertex,
java.lang.String labelString) |
void |
setFrame(YAWLEditorNetPanel frame) |
void |
setJoinDecorator(YAWLTask task,
int type,
int position) |
void |
setName(java.lang.String name) |
void |
setSplitDecorator(YAWLTask task,
int type,
int position) |
void |
setTaskDecomposition(YAWLTask task,
YDecomposition decomposition) |
void |
setUnfoldingNet(YAWLCompositeTask task,
NetGraph graph) |
void |
setVertexIcon(YAWLVertex vertex,
java.lang.String iconPath)
Sets an icon on a vertex that becomes an undoable action for the graph.
|
void |
startUndoableEdits() |
void |
stopUndoableEdits() |
void |
updateUI()
Notification from the
UIManager that the L&F has changed. |
YAWLTask |
viewingCancellationSetOf() |
addGraphSelectionListener, addOffscreenDirty, addSampleData, addSelectionCell, addSelectionCells, cancelEditing, clearOffscreen, clearOffscreenDirty, clearSelection, cloneCells, convertValueToString, createBounds, createBufferedImage, drawImage, drawImage, fireValueChanged, fromScreen, fromScreen, getAttributes, getBackgroundComponent, getBackgroundImage, getCellBounds, getCellBounds, getCenterPoint, getClipRectangle, getDefaultPortForCell, getDescendants, getEdgeLabelsMovable, getEditClickCount, getEditingCell, getFirstCellForLocation, getGraphLayoutCache, getGridColor, getGridMode, getGridSize, getHandleColor, getHandleSize, getHighlightColor, getImage, getInvokesStopCellEditing, getLeafViewAt, getLockedHandleColor, getMarqueeColor, getMarqueeHandler, getMinimumMove, getModel, getNextCellForLocation, getNextSelectableViewAt, getNextViewAt, getNextViewAt, getNextViewAt, getNextViewAt, getOffgraphics, getOffscreen, getOffscreenDirty, getOffscreenOffset, getPortForLocation, getPortViewAt, getPortViewAt, getPreferredScrollableViewportSize, getRoots, getRoots, getScale, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectionCell, getSelectionCellAt, getSelectionCells, getSelectionCells, getSelectionCount, getSelectionModel, getTolerance, getTopmostViewAt, getUI, getUIClassID, getViewPortBounds, graphDidChange, isAntiAliased, isAutoResizeGraph, isBackgroundScaled, isBendable, isCellEditable, isCellSelected, isCloneable, isConnectable, isDisconnectable, isDisconnectOnMove, isDragEnabled, isDropEnabled, isEditable, isEditing, isGridEnabled, isGridVisible, isGroupsEditable, isJumpToDefaultPort, isMoveable, isMoveBelowZero, isMoveBeyondGraphBounds, isMoveIntoGroups, isMoveOutOfGroups, isPortsOnTop, isPortsScaled, isPortsVisible, isPreviewInvalidNullPorts, isSelectionEmpty, isSelectionEnabled, isSizeable, isVolatileOffscreen, isXorEnabled, main, order, paramString, removeGraphSelectionListener, removeSelectionCell, scrollCellToVisible, scrollPointToVisible, setAntiAliased, setAutoResizeGraph, setBackground, setBackgroundComponent, setBackgroundImage, setBackgroundScaled, setBendable, setCloneable, setConnectable, setDisconnectable, setDisconnectOnMove, setDragEnabled, setDropEnabled, setEdgeLabelsMovable, setEditable, setEditClickCount, setGraphLayoutCache, setGridColor, setGridEnabled, setGridMode, setGridSize, setGridVisible, setGroupsEditable, setHandleColor, setHandleSize, setHighlightColor, setInvokesStopCellEditing, setJumpToDefaultPort, setLockedHandleColor, setMarqueeColor, setMarqueeHandler, setMinimumMove, setModel, setMoveable, setMoveBelowZero, setMoveBeyondGraphBounds, setMoveIntoGroups, setMoveOutOfGroups, setOffscreenOffset, setOpaque, setPortsOnTop, setPortsScaled, setPortsVisible, setPreviewInvalidNullPorts, setScale, setScale, setSelectionCell, setSelectionCells, setSelectionEnabled, setSelectionModel, setSizeable, setTolerance, setUI, setupOffScreen, setVolatileOffscreen, setXorEnabled, snap, snap, snap, startEditingAtCell, stopEditing, toScreen, toScreen, updateAutoSize
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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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
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, getAccessibleContext, 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, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public NetGraph()
public NetGraph(YDecomposition decomposition)
public void updateUI()
JGraph
UIManager
that the L&F has changed.
Replaces the current UI object with the latest version from the
UIManager
. Subclassers can override this to support
different GraphUIs.public void buildNewGraphContent()
public void buildNewGraphContent(java.awt.Rectangle bounds)
public void startUndoableEdits()
public void stopUndoableEdits()
public NetSelectionListener getSelectionListener()
public void addElement(YAWLVertex element)
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
JGraph
JComponent
'sgetToolTipText
method in order to allow the graph to create a tooltip for the topmost
cell under the mousepointer. This differs from JTree where the renderers
tooltip is used.
NOTE: For JGraph
to properly display tooltips of its
renderers, JGraph
must be a registered component with the
ToolTipManager
. This can be done by invoking
ToolTipManager.sharedInstance().registerComponent(graph)
.
This is not done automatically!
getToolTipText
in class JGraph
event
- the MouseEvent
that initiated the
ToolTip
displaynull
if
event
is nullpublic YAWLFlowRelation connect(YAWLPort source, YAWLPort target)
public void connect(YAWLFlowRelation flow, YAWLVertex source, YAWLVertex target)
public void connect(YAWLFlowRelation flow, YAWLPort source, YAWLPort target)
public boolean isGroup(java.lang.Object cell)
object
is a vertex, that is, if it
is not an instance of Port or Edge, and all of its children are
ports, or it has no children.public java.util.Set getEdges(YAWLCell[] cells)
public boolean acceptsIncomingFlows(YAWLCell cell)
public boolean hasIncomingFlow(YAWLCell cell)
public boolean generatesOutgoingFlows(YAWLCell cell)
public boolean hasOutgoingFlow(YAWLCell cell)
public void setJoinDecorator(YAWLTask task, int type, int position)
public void setSplitDecorator(YAWLTask task, int type, int position)
public java.util.Set<java.lang.Object> removeCellsAndTheirEdges(java.lang.Object[] cells)
public java.util.Set<java.lang.Object> removeSelectedCellsAndTheirEdges()
public void increaseSelectedVertexSize()
public void decreaseSelectedVertexSize()
public void moveSelectedElementsLeft()
public void moveSelectedElementsRight()
public void moveSelectedElementsUp()
public void moveSelectedElementsDown()
public void moveElementsBy(java.lang.Object[] cells, double x, double y)
public void moveElementBy(GraphCell cell, double x, double y)
public void moveElementTo(GraphCell cell, double x, double y)
public VertexView getVertexViewFor(GraphCell cell)
public java.lang.String getElementLabel(GraphCell vertex)
public void setElementLabel(GraphCell vertex, java.lang.String labelString)
public void setElementLabelInsideUpdate(GraphCell vertex, java.lang.String labelString)
public NetGraphModel getNetModel()
public CancellationSetModel getCancellationSetModel()
public void resetCancellationSet()
public void changeCancellationSet(YAWLTask task)
public YAWLTask viewingCancellationSetOf()
public YAWLTask getTriggeringTaskOfCurrentCancellationSet()
public void addSelectedCellsToVisibleCancellationSet()
public void removeSelectedCellsFromVisibleCancellationSet()
public void addCellToCancellationSet(YAWLCell cell)
public void removeCellFromCancellationSet(YAWLCell cell)
public void removeCellFromCancellationSetInsideUpdate(YAWLCell cell)
public void changeCellForeground(GraphCell cell, java.awt.Color color)
public java.awt.Color getCellForeground(GraphCell cell)
public void changeCellBackground(GraphCell cell, java.awt.Color color)
public void changeLineWidth(YAWLVertex cell)
public YAWLEditorNetPanel getFrame()
public void setFrame(YAWLEditorNetPanel frame)
public java.lang.String getName()
getName
in class java.awt.Component
public void setName(java.lang.String name)
setName
in class java.awt.Component
public void setUnfoldingNet(YAWLCompositeTask task, NetGraph graph)
public void setVertexIcon(YAWLVertex vertex, java.lang.String iconPath)
vertex
- The vertex to add the icon to.iconPath
- The file path to the icon needed.public void setTaskDecomposition(YAWLTask task, YDecomposition decomposition)
public NetMarqueeHandler getNetMarqueeHandler()