Package dataModelFX.connectionNodes
Class ModuleConnectionNode
java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.Group
pamViewFX.fxNodes.connectionPane.StandardConnectionNode
dataModelFX.connectionNodes.ModuleConnectionNode
- All Implemented Interfaces:
PAMConnectionNode
,javafx.css.Styleable
,javafx.event.EventTarget
,ConnectionNode
- Direct Known Subclasses:
DBConnectionNode
,DisplayConnectionNode
A connection node which represents a PAMGuard PamControlledUnit.
- Author:
- Jamie Macaulay
-
Property Summary
Properties inherited from class pamViewFX.fxNodes.connectionPane.StandardConnectionNode
plugX, plugY, socketX, socketY
Properties inherited from class javafx.scene.Group
autoSizeChildren
Properties inherited from class javafx.scene.Parent
needsLayout
Properties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
-
Field Summary
Fields inherited from class pamViewFX.fxNodes.connectionPane.StandardConnectionNode
CONNECTION_PANE_CLICK, cornerRadius, DEFUALT_PREF_HEIGHT, DEFUALT_PREF_WIDTH, DRAG_DROP, DRAGGING, DRAGGING_CHNAGED, plugBodyHeight, plugBodyWidth, plugEndHeight, plugEndWidth
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
Constructor Summary
ConstructorDescriptionModuleConnectionNode
(DataModelConnectPane connectionPane) Create a module node.ModuleConnectionNode
(DataModelConnectPane connectionPane, boolean core) Create a module node. -
Method Summary
Modifier and TypeMethodDescriptionInfo to save the nodejavafx.scene.paint.Color
Get the circle colour for a core module.Get all other nodes core lines should connect to.javafx.scene.paint.Color
Get the line colour of core lines.Get the PAMControlledUnit associated with the ModuleConnectionNode.getPrefferedParent
(PamControlledUnit parentControlledUnit) Say a this connection node has a parent with multiple compatible output data blocks.boolean
Check whether the module attempts to connect automatically to a parent when added to pane.boolean
isCore()
Check whether this is a core module node.boolean
Check whether the module is a CoreOutput or CorInput module.boolean
Check whether connection listeners are enabledboolean
Check whether the top settings pane is showing or not.void
Called whenever settings are first loaded in PAMGuard.void
setAutoConnect
(boolean autoConnect) Set whether the module attempts to connect automatically to a parent when added to pane.void
setConnectionNodeParams
(ConnectionNodeParams usedStructInfo) Set the used structure info.void
setCore
(boolean core) Set whether the module is a core modules.void
setCoreCircleColour
(javafx.scene.paint.Color circleColour) Set the circle colour for a core module.void
setCoreLineColour
(javafx.scene.paint.Color coreLineColour) Set the line colour of core lines.void
setCoreOutput
(boolean coreOutput) Set whether the module is a CoreOutput or CorInput module.void
setEnableConnectListeners
(boolean enableConnectListeners) Set whether the connection listeners are enabled.void
setPamControlledUnit
(PamControlledUnit pamControlledUnit) Set the PamControlledUnit associated with the ModuleConnectionNode.void
Update parameters the paramters to from current node position etc.Methods inherited from class pamViewFX.fxNodes.connectionPane.StandardConnectionNode
addConnectionListener, addConnectorNodeListener, addDefaultPlug, addDefaultSocket, checkWithinPane, connectNode, createNodeBody, createPlug, disconnectNode, getBranchConnectionSockets, getChildConnectionNodes, getConnectionGroup, getConnectionNodeBody, getConnectionPane, getConnectionPlugs, getConnectionSockets, getNodeId, getNumConnectionListeners, getOrientation, getParentConnectionNodes, getPlugConnectionLines, getSocketConnectionLines, initDefaultPlugLayout, initDefaultSocketLayout, isAllowBranchSockets, isMouseDisable, notifyChange, notifyConnectionListeners, plugXProperty, plugYProperty, removeAllBranchSockets, removeAllConnectionPlugs, removeAllConnectionSockets, removeConnectionListener, removeConnectionSocket, removeConnectorNodeListener, setAllowBranchSocket, setAllowBranchSockets, setCollisionShapesNull, setCollisionShapesNull, setConnectionPane, setDisableMouseInteraction, setPlugX, setPlugY, socketXProperty, socketYProperty
Methods inherited from class javafx.scene.Group
autoSizeChildrenProperty, getChildren, isAutoSizeChildren, minHeight, minWidth, prefHeight, prefWidth, setAutoSizeChildren
Methods inherited from class javafx.scene.Parent
getBaselineOffset, getChildrenUnmodifiable, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClassCssMetaData, getClip, getContentBias, getCssMetaData, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, maxHeight, maxWidth, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setEffect, setEventDispatcher, setFocusTraversable, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javafx.css.Styleable
getStyleableNode
-
Constructor Details
-
ModuleConnectionNode
Create a module node.- Parameters:
connectionPane
- - the connection pane the module node sits in.core
- - true if a special module. Special modules are modules which connect to all or none of the other modules.
-
ModuleConnectionNode
Create a module node.- Parameters:
connectionPane
- - the connection pane the module node sits in.
-
-
Method Details
-
setPamControlledUnit
Set the PamControlledUnit associated with the ModuleConnectionNode.- Parameters:
pamControlledUnit
- - the pamControlledUnit to associate with the ModuleConnectionNode.
-
getPamControlledUnit
Get the PAMControlledUnit associated with the ModuleConnectionNode.- Returns:
- the connectionNode.
-
setCore
public void setCore(boolean core) Set whether the module is a core modules. Core modules do not allow uses to connect manually to other modules and instead connect automatically themselves. There are very few core modules e.g. database, binary storage, array manager.- Parameters:
core
- - true if a core module.
-
getCoreConnectionNodes
Get all other nodes core lines should connect to. Override this function to connect core lines to specific nodes.- Returns:
- list of ConnectionNodes to connect to.
-
isCoreOutput
public boolean isCoreOutput()Check whether the module is a CoreOutput or CorInput module. If core output then the module is assumed to connect to all inputs for all other modules. For CoreInput then all other modules are connected to input of module.- Returns:
- true if CoreOutput.
-
setCoreOutput
public void setCoreOutput(boolean coreOutput) Set whether the module is a CoreOutput or CorInput module. If core output then the module is assumed to connect to all inputs for all other modules. For CoreInput then all other modules are connected to input of module.- Parameters:
coreOutput
- - true if CoreOutput.
-
getCoreLineColour
public javafx.scene.paint.Color getCoreLineColour()Get the line colour of core lines. Note this is not the same as ConnectionLines.- Returns:
- the Colour of core lines
-
setCoreLineColour
public void setCoreLineColour(javafx.scene.paint.Color coreLineColour) Set the line colour of core lines. Note this is not the same as ConnectionLines.- Parameters:
the
- colour to set core lines to.
-
getCoreCircleColour
public javafx.scene.paint.Color getCoreCircleColour()Get the circle colour for a core module. Note this is not the same as ConnectionLines.- Returns:
- the colour of core circle
-
setCoreCircleColour
public void setCoreCircleColour(javafx.scene.paint.Color circleColour) Set the circle colour for a core module. Note this is not the same as ConnectionLines.- Parameters:
the
- Colour of core circle
-
isCore
public boolean isCore()Check whether this is a core module node. Core modules cannot be manullay connected- Returns:
- true if a core module
-
isAutoConnect
public boolean isAutoConnect()Check whether the module attempts to connect automatically to a parent when added to pane.- Returns:
- true if automatically tries to connect to parent when added to a pane
-
setAutoConnect
public void setAutoConnect(boolean autoConnect) Set whether the module attempts to connect automatically to a parent when added to pane.- Parameters:
autoConnect
- - true if automatically tries to connect to parent when added to a pane
-
getDataModelPane
-
getPrefferedParent
Say a this connection node has a parent with multiple compatible output data blocks. Which to set as it's parent data block? This returns the preferred data block in this case.- Parameters:
parentControlledUnit
- - the parent controlled unit.- Returns:
- the preferred output data block from the parent. Can be null.
-
isEnableConnectListeners
public boolean isEnableConnectListeners()Check whether connection listeners are enabled- Returns:
- true if enabled.
-
setEnableConnectListeners
public void setEnableConnectListeners(boolean enableConnectListeners) Set whether the connection listeners are enabled. Only set to false if the connections are not being made by the user in the GUI- Parameters:
enableConnectListeners
- - true to enable listeners
-
isSettingsShowing
public boolean isSettingsShowing()Check whether the top settings pane is showing or not.- Returns:
- true if top pane is showing.
-
getConnectionNodeParams
Info to save the node- Specified by:
getConnectionNodeParams
in interfacePAMConnectionNode
- Returns:
- the used structure information
-
setConnectionNodeParams
Description copied from interface:PAMConnectionNode
Set the used structure info.- Specified by:
setConnectionNodeParams
in interfacePAMConnectionNode
-
loadsettings
public void loadsettings()Description copied from interface:PAMConnectionNode
Called whenever settings are first loaded in PAMGuard.- Specified by:
loadsettings
in interfacePAMConnectionNode
-
updateParams
public void updateParams()Description copied from interface:PAMConnectionNode
Update parameters the paramters to from current node position etc.- Specified by:
updateParams
in interfacePAMConnectionNode
-
getDataModelConnectionPane
-