public abstract class JIPipeGraphEditorUI extends JIPipeWorkbenchPanel implements MouseListener, MouseMotionListener
JIPipeGraphCanvasUI
that comes with scrolling/panning, properties panel,
and a menu barModifier and Type | Class and Description |
---|---|
static class |
JIPipeGraphEditorUI.NavigationRenderer
Renders items in the navigator
|
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static int |
FLAGS_NONE |
static int |
FLAGS_SPLIT_PANE_RATIO_1_1 |
static int |
FLAGS_SPLIT_PANE_SWITCH_CONTENT |
static int |
FLAGS_SPLIT_PANE_VERTICAL |
static KeyStroke |
KEY_STROKE_AUTO_LAYOUT |
static KeyStroke |
KEY_STROKE_NAVIGATE |
static KeyStroke |
KEY_STROKE_REDO |
static KeyStroke |
KEY_STROKE_UNDO |
static KeyStroke |
KEY_STROKE_ZOOM_IN |
static KeyStroke |
KEY_STROKE_ZOOM_OUT |
static KeyStroke |
KEY_STROKE_ZOOM_RESET |
protected JMenuBar |
menuBar |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
JIPipeGraphEditorUI(JIPipeWorkbench workbenchUI,
JIPipeGraph algorithmGraph,
UUID compartment,
JIPipeHistoryJournal historyJournal) |
JIPipeGraphEditorUI(JIPipeWorkbench workbenchUI,
JIPipeGraph algorithmGraph,
UUID compartment,
JIPipeHistoryJournal historyJournal,
GraphEditorUISettings settings,
int flags) |
getWorkbench
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, 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, 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, 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
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, 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, transferFocusUpCycle
public static final int FLAGS_NONE
public static final int FLAGS_SPLIT_PANE_VERTICAL
public static final int FLAGS_SPLIT_PANE_RATIO_1_1
public static final int FLAGS_SPLIT_PANE_SWITCH_CONTENT
public static final KeyStroke KEY_STROKE_UNDO
public static final KeyStroke KEY_STROKE_REDO
public static final KeyStroke KEY_STROKE_AUTO_LAYOUT
public static final KeyStroke KEY_STROKE_NAVIGATE
public static final KeyStroke KEY_STROKE_ZOOM_IN
public static final KeyStroke KEY_STROKE_ZOOM_OUT
public static final KeyStroke KEY_STROKE_ZOOM_RESET
protected JMenuBar menuBar
public JIPipeGraphEditorUI(JIPipeWorkbench workbenchUI, JIPipeGraph algorithmGraph, UUID compartment, JIPipeHistoryJournal historyJournal, GraphEditorUISettings settings, int flags)
workbenchUI
- the workbenchalgorithmGraph
- the algorithm graphcompartment
- the graph compartment to display. Set to null to display all compartmentshistoryJournal
- object that tracks the history of this graph. Set to null to disable the undo feature.flags
- additional flagspublic JIPipeGraphEditorUI(JIPipeWorkbench workbenchUI, JIPipeGraph algorithmGraph, UUID compartment, JIPipeHistoryJournal historyJournal)
workbenchUI
- the workbenchalgorithmGraph
- the algorithm graphcompartment
- the graph compartment to display. Set to null to display all compartmentshistoryJournal
- object that tracks the history of this graph. Set to null to disable the undo feature.public static void installContextActionsInto(JToolBar toolBar, Set<JIPipeNodeUI> selection, List<NodeUIContextAction> actionList, JIPipeGraphCanvasUI canvasUI)
public int getFlags()
public JMenu getGraphMenu()
public GraphEditorUISettings getGraphUISettings()
public JScrollPane getScrollPane()
public JIPipeGraphCanvasUI getCanvasUI()
public boolean isFlagSet(int flag)
public void onNavigatorNavigate(SearchBox.SelectedEvent<Object> event)
event
- the eventpublic Set<JIPipeNodeUI> getSelection()
public void reloadMenuBar()
protected void initializeCommonActions()
public void createScreenshotClipboard()
public JIPipeGraph getAlgorithmGraph()
protected void updateSelection()
public void onSelectionChanged(JIPipeGraphCanvasUI.AlgorithmSelectionChangedEvent event)
public void onAlgorithmRegistryChanged(JIPipe.NodeInfoRegisteredEvent event)
event
- Generated eventpublic void onAlgorithmSelected(JIPipeGraphCanvasUI.AlgorithmSelectedEvent event)
event
- The generated eventpublic void onAlgorithmEvent(JIPipeNodeUI.AlgorithmEvent event)
event
- generated eventpublic void scrollToAlgorithm(JIPipeNodeUI ui)
ui
- the algorithmpublic void clearSelection()
public void selectOnly(JIPipeNodeUI ui)
ui
- The algorithm UIpublic void removeFromSelection(JIPipeNodeUI ui)
ui
- The algorithm UIprotected Component getPropertyPanel()
protected void setPropertyPanel(Component content)
content
- the componentpublic void addToSelection(JIPipeNodeUI ui)
ui
- The algorithm UIpublic void onGraphChanged(JIPipeGraph.GraphChangedEvent event)
event
- The generated eventpublic void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public UUID getCompartment()
protected JMenuBar getMenuBar()
public Set<JIPipeNodeInfo> getAddableAlgorithms()
public void setAddableAlgorithms(Set<JIPipeNodeInfo> addableAlgorithms)
public void updateNavigation()
public JIPipeHistoryJournal getHistoryJournal()
Copyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.