Package pamViewFX.fxNodes.utilityPanes
Class SourcePaneFX
java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
javafx.scene.layout.BorderPane
pamViewFX.fxNodes.PamBorderPane
pamViewFX.fxNodes.utilityPanes.SourcePaneFX
- All Implemented Interfaces:
 javafx.css.Styleable,javafx.event.EventTarget
- Direct Known Subclasses:
 GroupedSourcePaneFX,PlaybackSourcePane
Standard panel for dialogs that shows a list of
 available data sources and, optionally a list of data channels.
 
This is for general use within other dialog panels.
- Author:
 - Doug Gillespie, Jamie Macaulay
 
- 
Property Summary
Properties inherited from class javafx.scene.layout.BorderPane
bottom, center, left, right, topProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties 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 - 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected javafx.scene.control.CheckBox[]List of cehck boxes for each channel up to the maximum number of PAM_CHANNELS.protected PamValidatorValidator for channelsprotected ArrayList<PamDataBlock> protected javafx.scene.control.CheckBoxSelect all check box.protected javafx.scene.control.ComboBox<PamDataBlock> Combo Box which holds a list of data blocksprotected javafx.scene.control.LabelThe title labe.Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT - 
Constructor Summary
ConstructorsConstructorDescriptionSourcePaneFX(Class sourceType, boolean hasChannels, boolean includeSubClasses) Construct a panel without a borderSourcePaneFX(String borderTitle, Class sourceType, boolean hasChannels, boolean includeSubClasses) Construct a panel with a titles borderSourcePaneFX(String borderTitle, PamConfiguration pamConfiguration, Class sourceType, boolean hasChannels, boolean includeSubClasses) Construct a panel with a titles border - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddSelectionListener(javafx.beans.value.ChangeListener listener) Add a listener to the data source drop down listvoidaddSource(PamDataBlock pamDataBlock) Add an additional source to the list of available datas.voidvoidaddSourceType(Class sourceType, boolean includeSubClasses) Set the source type for this SourcePanelvoidClear the list of excluded data blocks.voidClear the source types.protected voidvoidexcludeDataBlock(PamDataBlock block, boolean exclude) Exclude specific data blocks from the source list.javafx.scene.control.CheckBox[]javafx.scene.control.LabelintGet a list of selected channelsGet the channel validator for the source pane.javafx.scene.control.ComboBox<PamDataBlock> Get the combo box which holds the datablocksintPamDataBlock<?> Return the selected data sourceintGet the number of items in the list.protected List<PamDataBlock> intGet the currently selected source indexget the data source type for this SourcePaneljavafx.scene.control.LabelGet the title label.booleanCheck if a single channel is selected.booleanbooleanremoveSource(PamDataBlock pamDataBlock) Remove an source from the list of available datas.voidprotected voidrePackOwner(int channelsMap) Repack the owner window if the number of channels has changedprotected voidprotected voidselectionChanged(int channel) protected voidvoidsetBorderTitle(String borderTitle) voidsetChannelList(int channelList) Set the current channel selectionvoidsetDataBlockClassType(Class classType) Set a required class type, e.g.voidsetEnabled(boolean enabled) voidsetEnabledWithChannels(boolean enabled) voidsetHasChannels(boolean hasChannels) voidsetLocalisationRequirements(int localisationRequirements) booleanSet the current data source using the data source namevoidsetSource(PamDataBlock sourceBlock) Set the current data source by block referencevoidsetSourceIndex(int sourceIndex) booleanFill the list of available data sources, taking into account the list of excluded sourcesbooleansetSourceList(boolean replaceChosen) voidsetSourceToolTip(String toolTip) Set a tooltip text for the source panel.voidsetTitleFont(javafx.scene.text.Font titleFont) // * Set the font of the title label whihc sits above the datablock ComboBoxvoidsetTitleText(String titleString) Set the title.protected voidvoidTell the pane the source has changed.Methods inherited from class pamViewFX.fxNodes.PamBorderPane
setBottomSpace, setLeftSpace, setRightSpace, setTopSpaceMethods inherited from class javafx.scene.layout.BorderPane
bottomProperty, centerProperty, clearConstraints, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getAlignment, getBottom, getCenter, getContentBias, getLeft, getMargin, getRight, getTop, layoutChildren, leftProperty, rightProperty, setAlignment, setBottom, setCenter, setLeft, setMargin, setRight, setTop, topPropertyMethods inherited from class javafx.scene.layout.Pane
getChildrenMethods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthPropertyMethods inherited from class javafx.scene.Parent
getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods 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, getClip, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, 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, 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, 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, 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, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, 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, setPressed, 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, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode 
- 
Field Details
- 
sourceList
Combo Box which holds a list of data blocks - 
channelBoxes
protected javafx.scene.control.CheckBox[] channelBoxesList of cehck boxes for each channel up to the maximum number of PAM_CHANNELS. - 
excludedBlocks
 - 
selectAll
protected javafx.scene.control.CheckBox selectAllSelect all check box. - 
titleLabel
protected javafx.scene.control.Label titleLabelThe title labe. Sits above the combo box. - 
channelValidator
Validator for channels 
 - 
 - 
Constructor Details
- 
SourcePaneFX
public SourcePaneFX(String borderTitle, Class sourceType, boolean hasChannels, boolean includeSubClasses) Construct a panel with a titles border- Parameters:
 borderTitle- Title to go in bordersourceType- Data Source typehasChannels- Include a set of checkboxes to list available channelsincludeSubClasses- include all subclasses of sourceType in the list.
 - 
SourcePaneFX
public SourcePaneFX(String borderTitle, PamConfiguration pamConfiguration, Class sourceType, boolean hasChannels, boolean includeSubClasses) Construct a panel with a titles border- Parameters:
 borderTitle- Title to go in bordersourceType- Data Source typehasChannels- Include a set of checkboxes to list available channelsincludeSubClasses- include all subclasses of sourceType in the list.
 - 
SourcePaneFX
Construct a panel without a border- Parameters:
 sourceType- Data Source typehasChannels- Include a set of checkboxes to list available channelsinclude- subclasses of the sourceType
 
 - 
 - 
Method Details
- 
setEnabled
public void setEnabled(boolean enabled)  - 
setEnabledWithChannels
public void setEnabledWithChannels(boolean enabled)  - 
addSelectionListener
public void addSelectionListener(javafx.beans.value.ChangeListener listener) Add a listener to the data source drop down list- Parameters:
 listener- listener
 - 
selectionChanged
protected void selectionChanged(int channel)  - 
createPanel
protected void createPanel() - 
getChannelLabel
public javafx.scene.control.Label getChannelLabel() - 
isAChannelSelected
public boolean isAChannelSelected()Check if a single channel is selected.- Returns:
 - true if at least one channel is selected.
 
 - 
selectNoChannels
protected void selectNoChannels() - 
selectAllChannels
protected void selectAllChannels() - 
sourceChanged
public void sourceChanged()Tell the pane the source has changed. - 
showChannels
protected void showChannels() - 
rePackOwner
protected void rePackOwner(int channelsMap) Repack the owner window if the number of channels has changed- Parameters:
 channelsMap- bitmap of used channels.
 - 
setSource
Set the current data source using the data source name- Parameters:
 sourceName-- Returns:
 - true if OK
 
 - 
setSource
Set the current data source by block reference- Parameters:
 sourceBlock-
 - 
setSourceIndex
public void setSourceIndex(int sourceIndex)  - 
setSourceList
public boolean setSourceList()Fill the list of available data sources, taking into account the list of excluded sources- Returns:
 - sets a list of available sources. Returns false if no sources are available.
 
 - 
setSourceList
public boolean setSourceList(boolean replaceChosen)  - 
addSource
Add an additional source to the list of available datas.- Parameters:
 pamDataBlock-
 - 
removeSource
Remove an source from the list of available datas.- Parameters:
 pamDataBlock-
 - 
getSourceDataBlocks
- Returns:
 - a list of available data blocks which may be of multiple types.
 
 - 
getSource
Return the selected data source- Returns:
 - source data block
 
 - 
getSourceName
- Returns:
 - the source data block name, or null if nothing selected.
 
 - 
getSourceLongName
- Returns:
 - the source data block long name, or null if nothing selected.
 
 - 
getChannelList
public int getChannelList()Get a list of selected channels- Returns:
 - bitmap of selected channels
 
 - 
setChannelList
public void setChannelList(int channelList) Set the current channel selection- Parameters:
 channelList- bitmap of currently selected channels
 - 
getSourceTypes
get the data source type for this SourcePanel- Returns:
 - data type of a data source
 
 - 
addSourceType
Set the source type for this SourcePanel- Parameters:
 sourceType-
 - 
getSourceIndex
public int getSourceIndex()Get the currently selected source index- Returns:
 - source index within the source list
 
 - 
excludeDataBlock
Exclude specific data blocks from the source list. e.g. a process would normally not be able to use it's own output data block as an input source and should therefore exclude it from the list.- Parameters:
 block- PamDataBlock to exlcudeexclude- true - excluse; false - allow
 - 
clearExcludeList
public void clearExcludeList()Clear the list of excluded data blocks. - 
getChannelBoxes
public javafx.scene.control.CheckBox[] getChannelBoxes() - 
getLocalisationRequirements
public int getLocalisationRequirements() - 
setLocalisationRequirements
public void setLocalisationRequirements(int localisationRequirements)  - 
setDataBlockClassType
Set a required class type, e.g. that it implements GroupedDataSource- Parameters:
 classType- (class type or interface on the Data Block)
 - 
getSourceCount
public int getSourceCount()Get the number of items in the list.- Returns:
 - number of sources of this type of data
 
 - 
addSourcePanelMonitor
 - 
removeSourcePanelMonitor
 - 
setSourceToolTip
Set a tooltip text for the source panel.- Parameters:
 toolTip- Tooltip text.
 - 
isHasChannels
public boolean isHasChannels()- Returns:
 - the hasChannels
 
 - 
setHasChannels
public void setHasChannels(boolean hasChannels) - Parameters:
 hasChannels- the hasChannels to set
 - 
getBorderTitle
- Returns:
 - the borderTitle
 
 - 
setBorderTitle
- Parameters:
 borderTitle- the borderTitle to set
 - 
setTitleFont
public void setTitleFont(javafx.scene.text.Font titleFont) // * Set the font of the title label whihc sits above the datablock ComboBox- Parameters:
 titleFont- - the title label.
 - 
getTitleLabel
public javafx.scene.control.Label getTitleLabel()Get the title label.- Returns:
 - the title label.
 
 - 
getDataBlockBox
Get the combo box which holds the datablocks- Returns:
 - the datablock combo box.
 
 - 
getChannelValidator
Get the channel validator for the source pane.- Returns:
 - the channel validator
 
 - 
setTitleText
Set the title.- Parameters:
 titleString- - the title text
 - 
clearSourceTypeList
public void clearSourceTypeList()Clear the source types. 
 -