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

public class SourcePaneFX extends PamBorderPane
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, top

    Properties inherited from class javafx.scene.layout.Region

    background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width

    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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
     
  • Field Summary

    Fields inherited from class javafx.scene.layout.Region

    USE_COMPUTED_SIZE, USE_PREF_SIZE

    Fields inherited from class javafx.scene.Node

    BASELINE_OFFSET_SAME_AS_HEIGHT
  • Constructor Summary

    Constructors
    Constructor
    Description
    SourcePaneFX(Class sourceType, boolean hasChannels, boolean includeSubClasses)
    Construct a panel without a border
    SourcePaneFX(String borderTitle, Class sourceType, boolean hasChannels, boolean includeSubClasses)
    Construct a panel with a titles border
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSelectionListener(javafx.beans.value.ChangeListener listener)
    Add a listener to the data source drop down list
    void
    addSource(PamDataBlock pamDataBlock)
    Add an additional source to the list of available datas.
    void
     
    void
    addSourceType(Class sourceType, boolean includeSubClasses)
    Set the source type for this SourcePanel
    void
    Clear the list of excluded data blocks.
    void
    excludeDataBlock(PamDataBlock block, boolean exclude)
    Exclude specific data blocks from the source list.
     
    javafx.scene.control.CheckBox[]
     
    javafx.scene.control.Label
     
    int
    Get a list of selected channels
    Get the channel validator for the source pane.
    javafx.scene.control.ComboBox<PamDataBlock>
    Get the combo box which holds the datablocks
    int
     
    Return the selected data source
    int
    Get the number of items in the list.
    int
    Get the currently selected source index
     
     
    get the data source type for this SourcePanel
    javafx.scene.control.Label
    Get the title label.
    boolean
    Check if a single channel is selected.
    boolean
     
    boolean
    removeSource(PamDataBlock pamDataBlock)
    Remove an source from the list of available datas.
    void
     
    void
    setBorderTitle(String borderTitle)
     
    void
    setChannelList(int channelList)
    Set the current channel selection
    void
    Set a required class type, e.g.
    void
    setEnabled(boolean enabled)
     
    void
    setEnabledWithChannels(boolean enabled)
     
    void
    setHasChannels(boolean hasChannels)
     
    void
    setLocalisationRequirements(int localisationRequirements)
     
    boolean
    setSource(String sourceName)
    Set the current data source using the data source name
    void
    setSource(PamDataBlock sourceBlock)
    Set the current data source by block reference
    void
    setSourceIndex(int sourceIndex)
     
    boolean
    Fill the list of available data sources, taking into account the list of excluded sources
    boolean
    setSourceList(boolean replaceChosen)
     
    void
    Set a tooltip text for the source panel.
    void
    setTitleFont(javafx.scene.text.Font titleFont)
    // * Set the font of the title label whihc sits above the datablock ComboBox
    void
    Tell the pane the source has changed.

    Methods inherited from class pamViewFX.fxNodes.PamBorderPane

    setBottomSpace, setLeftSpace, setRightSpace, setTopSpace

    Methods inherited from class javafx.scene.layout.BorderPane

    bottomProperty, centerProperty, clearConstraints, getAlignment, getBottom, getCenter, getContentBias, getLeft, getMargin, getRight, getTop, leftProperty, rightProperty, setAlignment, setBottom, setCenter, setLeft, setMargin, setRight, setTop, topProperty

    Methods inherited from class javafx.scene.layout.Pane

    getChildren

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, 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, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPositionX, snapPositionY, snapSizeX, snapSizeY, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty

    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, getClip, 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, 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, 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

    • SourcePaneFX

      public SourcePaneFX(String borderTitle, Class sourceType, boolean hasChannels, boolean includeSubClasses)
      Construct a panel with a titles border
      Parameters:
      borderTitle - Title to go in border
      sourceType - Data Source type
      hasChannels - Include a set of checkboxes to list available channels
      includeSubClasses - include all subclasses of sourceType in the list.
    • SourcePaneFX

      public SourcePaneFX(Class sourceType, boolean hasChannels, boolean includeSubClasses)
      Construct a panel without a border
      Parameters:
      sourceType - Data Source type
      hasChannels - Include a set of checkboxes to list available channels
      include - 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
    • 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.
    • sourceChanged

      public void sourceChanged()
      Tell the pane the source has changed.
    • setSource

      public boolean setSource(String sourceName)
      Set the current data source using the data source name
      Parameters:
      sourceName -
      Returns:
      true if OK
    • setSource

      public void setSource(PamDataBlock sourceBlock)
      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

      public void addSource(PamDataBlock pamDataBlock)
      Add an additional source to the list of available datas.
      Parameters:
      pamDataBlock -
    • removeSource

      public boolean removeSource(PamDataBlock pamDataBlock)
      Remove an source from the list of available datas.
      Parameters:
      pamDataBlock -
    • getSource

      public PamDataBlock<?> getSource()
      Return the selected data source
      Returns:
      source data block
    • getSourceName

      public String getSourceName()
      Returns:
      the source data block name, or null if nothing selected.
    • getSourceLongName

      public String 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

      public ArrayList<SourcePaneFX.SourceSelection> getSourceTypes()
      get the data source type for this SourcePanel
      Returns:
      data type of a data source
    • addSourceType

      public void addSourceType(Class sourceType, boolean includeSubClasses)
      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

      public void excludeDataBlock(PamDataBlock block, boolean exclude)
      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 exlcude
      exclude - 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

      public void setDataBlockClassType(Class classType)
      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

      public void addSourcePanelMonitor(SourcePanelMonitor gspm)
    • removeSourcePanelMonitor

      public void removeSourcePanelMonitor(SourcePanelMonitor gspm)
    • setSourceToolTip

      public void setSourceToolTip(String toolTip)
      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

      public String getBorderTitle()
      Returns:
      the borderTitle
    • setBorderTitle

      public void setBorderTitle(String borderTitle)
      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

      public javafx.scene.control.ComboBox<PamDataBlock> getDataBlockBox()
      Get the combo box which holds the datablocks
      Returns:
      the datablock combo box.
    • getChannelValidator

      public PamValidator getChannelValidator()
      Get the channel validator for the source pane.
      Returns:
      the channel validator