Class Navigation

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
javafx.scene.control.ScrollPane
com.imyeyu.fx.ui.components.Navigation
All Implemented Interfaces:
TimiFXUI, javafx.css.Styleable, javafx.event.EventTarget, javafx.scene.control.Skinnable

public class Navigation extends javafx.scene.control.ScrollPane implements TimiFXUI
纵向导航组件,可实现二级导航,折叠导航
Since:
2022-02-17 00:11
Author:
夜雨
  • Nested Class Summary

    Nested classes/interfaces inherited from class javafx.scene.control.ScrollPane

    javafx.scene.control.ScrollPane.ScrollBarPolicy

    Nested classes/interfaces inherited from interface TimiFXUI

    TimiFXUI.BG, TimiFXUI.Colorful, TimiFXUI.CSS, TimiFXUI.Shadow, TimiFXUI.Stroke
  • Property Summary

    Properties inherited from class javafx.scene.control.ScrollPane

    content, fitToHeight, fitToWidth, hbarPolicy, hmax, hmin, hvalue, minViewportHeight, minViewportWidth, pannable, prefViewportHeight, prefViewportWidth, vbarPolicy, viewportBounds, vmax, vmin, vvalue

    Properties inherited from class javafx.scene.control.Control

    contextMenu, skin, tooltip

    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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final javafx.collections.ObservableList<javafx.scene.control.ToggleButton>
    导航数据列表
    protected final javafx.beans.property.ObjectProperty<javafx.scene.control.ToggleButton>
    已选中监听

    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

    Fields inherited from interface TimiFXUI

    CSS_FONT, CSS_STYLE, MULTILINGUAL, RESOURCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    默认构造器
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(javafx.scene.control.ToggleButton... buttons)
    添加导航按钮
    javafx.scene.control.TitledPane
    addExpandedGroup(String title, javafx.scene.control.ToggleButton... buttons)
    添加默认展开的导航组
    javafx.scene.control.TitledPane
    addGroup(String title, boolean isExpanded, javafx.scene.control.ToggleButton... buttons)
    添加导航组
    javafx.scene.control.TitledPane
    addGroup(String title, javafx.scene.control.ToggleButton... buttons)
    添加默认没有展开的导航组
    javafx.scene.control.TitledPane
    addGroup(javafx.scene.control.TitledPane pane, boolean isExpanded, javafx.scene.control.ToggleButton... buttons)
    添加导航组
    javafx.scene.control.TitledPane
    getGroup(javafx.scene.control.ToggleButton btn)
    获取该按钮所属组
    javafx.collections.ObservableList<javafx.scene.control.ToggleButton>
    导航数据列表
    javafx.scene.control.ToggleButton
    获取当前激活的导航项
    javafx.beans.property.ObjectProperty<javafx.scene.control.ToggleButton>
    获取激活导航项监听
    void
    setSelectedItem(javafx.scene.control.ToggleButton button)
    设置当前激活导航项

    Methods inherited from class javafx.scene.control.ScrollPane

    contentProperty, createDefaultSkin, fitToHeightProperty, fitToWidthProperty, getClassCssMetaData, getContent, getControlCssMetaData, getHbarPolicy, getHmax, getHmin, getHvalue, getInitialFocusTraversable, getMinViewportHeight, getMinViewportWidth, getPrefViewportHeight, getPrefViewportWidth, getVbarPolicy, getViewportBounds, getVmax, getVmin, getVvalue, hbarPolicyProperty, hmaxProperty, hminProperty, hvalueProperty, isFitToHeight, isFitToWidth, isPannable, minViewportHeightProperty, minViewportWidthProperty, pannableProperty, prefViewportHeightProperty, prefViewportWidthProperty, queryAccessibleAttribute, setContent, setFitToHeight, setFitToWidth, setHbarPolicy, setHmax, setHmin, setHvalue, setMinViewportHeight, setMinViewportWidth, setPannable, setPrefViewportHeight, setPrefViewportWidth, setVbarPolicy, setViewportBounds, setVmax, setVmin, setVvalue, vbarPolicyProperty, viewportBoundsProperty, vmaxProperty, vminProperty, vvalueProperty

    Methods inherited from class javafx.scene.control.Control

    computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getSkin, getTooltip, isResizable, layoutChildren, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, 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, widthProperty

    Methods inherited from class javafx.scene.Parent

    getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds

    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, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, 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, requestFocusTraversal, 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, visibleProperty

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Field Details

    • items

      protected final javafx.collections.ObservableList<javafx.scene.control.ToggleButton> items
      导航数据列表
    • selectedItem

      protected final javafx.beans.property.ObjectProperty<javafx.scene.control.ToggleButton> selectedItem
      已选中监听
  • Constructor Details

    • Navigation

      public Navigation()
      默认构造器
  • Method Details

    • add

      public void add(javafx.scene.control.ToggleButton... buttons)
      添加导航按钮
      Parameters:
      buttons - 导航按钮
    • addGroup

      public javafx.scene.control.TitledPane addGroup(String title, javafx.scene.control.ToggleButton... buttons)
      添加默认没有展开的导航组
      Parameters:
      title - 标题
      buttons - 导航项
      Returns:
      构造的折叠面板
    • addExpandedGroup

      public javafx.scene.control.TitledPane addExpandedGroup(String title, javafx.scene.control.ToggleButton... buttons)
      添加默认展开的导航组
      Parameters:
      title - 标题
      buttons - 导航项
      Returns:
      构造的折叠面板
    • addGroup

      public javafx.scene.control.TitledPane addGroup(String title, boolean isExpanded, javafx.scene.control.ToggleButton... buttons)
      添加导航组
      Parameters:
      title - 标题
      isExpanded - true 为默认展开
      buttons - 导航项
      Returns:
      构造的折叠面板
    • addGroup

      public javafx.scene.control.TitledPane addGroup(javafx.scene.control.TitledPane pane, boolean isExpanded, javafx.scene.control.ToggleButton... buttons)
      添加导航组
      Parameters:
      pane - 所属组
      isExpanded - true 为默认展开
      buttons - 导航项
      Returns:
      原折叠面板
    • getGroup

      public javafx.scene.control.TitledPane getGroup(javafx.scene.control.ToggleButton btn)
      获取该按钮所属组
      Parameters:
      btn - 按钮
      Returns:
      所属组,null 时为不属于任何组
    • setSelectedItem

      public void setSelectedItem(javafx.scene.control.ToggleButton button)
      设置当前激活导航项
      Parameters:
      button - 导航项
    • getSelectedItem

      public javafx.scene.control.ToggleButton getSelectedItem()
      获取当前激活的导航项
      Returns:
      当前激活的导航项
    • selectedItem

      public javafx.beans.property.ObjectProperty<javafx.scene.control.ToggleButton> selectedItem()
      获取激活导航项监听
      Returns:
      激活导航项监听
    • getItems

      public javafx.collections.ObservableList<javafx.scene.control.ToggleButton> getItems()
      导航数据列表