Class ResponsivePane

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
javafx.scene.layout.StackPane
jfxtras.scene.layout.responsivepane.ResponsivePane
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget

public class ResponsivePane extends javafx.scene.layout.StackPane
= ResponsivePane This layout chooses the best fitting layout and stylesheet for a given stage size. ResponsivePane is loosely based on responsive design as advocated by website designs, and implemented in for example the Twitter Bootstrap project. But there is a twist in the logic; responsive design assumes a given width and unlimited vertical space with the use of a scrollbar. For websites this is ok, but applications do not have unlimited vertical space. Take for example a webbrowser; it contains a webview with a scrollbar, but it does not run inside a scrollpane itself. So for applications there is no such thing as unlimited vertical space! It has to use scalable controls, like lists, tables ort webview, to dynamically fill its horizontal and vertical space, just like we are used to in Swing and JavaFX for ages. But given large screen size differences, from 4 inch phones to 32 inch desktops, it is ridiculous to think that a single layout can adapt to all sizes: on a phone you may choose to use a TabbedPane with less controls visible, and on desktop you go all out with a MigPane and a number of gimmicks. ResponsiveLayout allows you to define reusable nodes and have specific screen size related layouts, using the reusable nodes. It will then use what layout fits best. A typical use of ResponsivePane would look like this: [source,java] --
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.ObjectProperty<Layout>
    ActiveLayout
    javafx.beans.property.ObjectProperty<Stylesheet>
    ActiveMyStylesheet
    javafx.beans.property.ObjectProperty<Stylesheet>
    ActiveSceneStylesheet
    javafx.beans.property.ObjectProperty<Boolean>
    Debug: show rendering hints (for Ref) and prints out changes to the layout on the console
    javafx.beans.property.ObjectProperty<Boolean>
    Trace: like debug, plus show calculations determining if changes are needed on the console

    Properties inherited from class javafx.scene.layout.StackPane

    alignment

    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, 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
    private final javafx.beans.property.SimpleObjectProperty<Layout>
     
    private final javafx.beans.property.SimpleObjectProperty<Stylesheet>
     
    private final javafx.beans.property.SimpleObjectProperty<Stylesheet>
     
    private final javafx.beans.property.SimpleObjectProperty<Boolean>
     
    (package private) final javafx.collections.ObservableMap<String,Size>
     
    private final javafx.collections.ObservableList<Layout>
     
    private final javafx.collections.ObservableList<Stylesheet>
     
    (package private) Double
     
    static final String
     
    private final javafx.collections.ObservableList<javafx.scene.Node>
     
    private final javafx.collections.ObservableList<Stylesheet>
     
    private final Stylesheet
     
    private final Layout
     
    private final javafx.beans.property.SimpleObjectProperty<Boolean>
     

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

    Modifier and Type
    Method
    Description
    javafx.beans.property.ObjectProperty<Layout>
    ActiveLayout
    javafx.beans.property.ObjectProperty<Stylesheet>
    ActiveMyStylesheet
    javafx.beans.property.ObjectProperty<Stylesheet>
    ActiveSceneStylesheet
    void
    addLayout(String device, javafx.scene.Node root)
    Convenience method for addLayout(Size, Node)
    void
    addLayout(String device, Orientation orientation, javafx.scene.Node root)
    Convenience method for addLayout(Size, Orientation, Node)
    void
    addLayout(Device device, javafx.scene.Node root)
    Convenience method for addLayout(Size, Node)
    void
    addLayout(Device device, Orientation orientation, javafx.scene.Node root)
    Convenience method for addLayout(Size, Orientation, Node)
    void
    addLayout(Size sizeAtLeast, javafx.scene.Node root)
    Convenience method for getLayouts().add(new Layout(sizeAtLeast, root))
    void
    addLayout(Size sizeAtLeast, Orientation orientation, javafx.scene.Node root)
    Convenience method for getLayouts().add(new Layout(sizeAtLeast, orientation, root))
    void
    addMyStylesheet(String device, String file)
    Convenience method for addMyStylesheet(Size sizeAtLeast, String file)
    void
    addMyStylesheet(Device device, String file)
    Convenience method for addMyStylesheet(Size sizeAtLeast, String file)
    void
    addMyStylesheet(Size sizeAtLeast, String file)
    Convenience method for getMyStylesheets().add(new Stylesheet(sizeAtLeast, file));
    javafx.scene.Node
    addReusableNode(String id, javafx.scene.Node node)
     
    javafx.scene.Node
    addReusableNode(javafx.scene.Node node)
     
    void
    Convenience method for addSceneStylesheet(Size sizeAtLeast, String file)
    void
    Convenience method for addSceneStylesheet(Size sizeAtLeast, String file)
    void
    addSceneStylesheet(Size sizeAtLeast, String file)
    Convenience method for getSceneStylesheets().add(new Stylesheet(sizeAtLeast, file));
    javafx.beans.property.ObjectProperty<Boolean>
    Debug: show rendering hints (for Ref) and prints out changes to the layout on the console
    (package private) double
     
    (package private) Layout
     
    (package private) Stylesheet
     
    (package private) double
    Determine the pixels-per-inch of the screen we are on
    (package private) javafx.scene.Node
     
    Gets the value of the activeLayout property.
    Gets the value of the activeMyStylesheet property.
    Gets the value of the activeSceneStylesheet property.
    Gets the value of the debug property.
    Convienience method for getDeviceSize(device)
    Convienience method for getDeviceSize(device.toString())
    final javafx.collections.ObservableMap<String,Size>
     
    javafx.collections.ObservableList<Layout>
    layouts
    javafx.collections.ObservableList<Stylesheet>
    myStylesheets
    javafx.collections.ObservableList<javafx.scene.Node>
    refs
    javafx.collections.ObservableList<Stylesheet>
    sceneStylesheets
    Gets the value of the trace property.
    protected void
     
    (package private) void
    load(Stylesheet stylesheet, List<Stylesheet> availableStylesheets, List<String> activeStylesheetUrls)
     
    private void
     
    void
    Sets the value of the activeLayout property.
    void
    Sets the value of the activeMyStylesheet property.
    void
    Sets the value of the activeSceneStylesheet property.
    void
    Sets the value of the debug property.
    void
    setDeviceSize(String device, Size size)
    Convenience method for deviceSizes.put(device, size)
    void
    setDeviceSize(Device device, Size size)
    Convenience method for deviceSizes.put(device.toString(), size)
    void
    Sets the value of the trace property.
    (package private) void
     
    javafx.beans.property.ObjectProperty<Boolean>
    Trace: like debug, plus show calculations determining if changes are needed on the console
     
     
     
     
    Id
     

    Methods inherited from class javafx.scene.layout.StackPane

    alignmentProperty, clearConstraints, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getAlignment, getAlignment, getClassCssMetaData, getContentBias, getCssMetaData, getMargin, requestLayout, setAlignment, setAlignment, setMargin

    Methods inherited from class javafx.scene.layout.Pane

    getChildren

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, 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, widthProperty

    Methods inherited from class javafx.scene.Parent

    getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, 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, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, 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, 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, visibleProperty

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Property Details

  • Field Details

    • debugProperty

      private final javafx.beans.property.SimpleObjectProperty<Boolean> debugProperty
    • traceProperty

      private final javafx.beans.property.SimpleObjectProperty<Boolean> traceProperty
    • reusableNodes

      private final javafx.collections.ObservableList<javafx.scene.Node> reusableNodes
    • layouts

      private final javafx.collections.ObservableList<Layout> layouts
    • activeLayoutProperty

      private final javafx.beans.property.SimpleObjectProperty<Layout> activeLayoutProperty
    • sceneStylesheets

      private final javafx.collections.ObservableList<Stylesheet> sceneStylesheets
    • activeSceneStylesheetProperty

      private final javafx.beans.property.SimpleObjectProperty<Stylesheet> activeSceneStylesheetProperty
    • myStylesheets

      private final javafx.collections.ObservableList<Stylesheet> myStylesheets
    • activeMyStylesheetProperty

      private final javafx.beans.property.SimpleObjectProperty<Stylesheet> activeMyStylesheetProperty
    • deviceSizes

      final javafx.collections.ObservableMap<String,Size> deviceSizes
    • ppi

      Double ppi
    • PPI_SYSTEM_PROPERTY

      public static final String PPI_SYSTEM_PROPERTY
    • SINGULARITY_LAYOUT

      private final Layout SINGULARITY_LAYOUT
    • SINGULAR_STYLESHEET

      private final Stylesheet SINGULAR_STYLESHEET
  • Constructor Details

    • ResponsivePane

      public ResponsivePane()
  • Method Details

    • withId

      public ResponsivePane withId(String v)
      Id
    • debugProperty

      public javafx.beans.property.ObjectProperty<Boolean> debugProperty()
      Debug: show rendering hints (for Ref) and prints out changes to the layout on the console
      Returns:
      the debug property
      See Also:
    • getDebug

      public Boolean getDebug()
      Gets the value of the debug property.
      Property description:
      Debug: show rendering hints (for Ref) and prints out changes to the layout on the console
      Returns:
      the value of the debug property
      See Also:
    • setDebug

      public void setDebug(Boolean value)
      Sets the value of the debug property.
      Property description:
      Debug: show rendering hints (for Ref) and prints out changes to the layout on the console
      Parameters:
      value - the value for the debug property
      See Also:
    • withDebug

      public ResponsivePane withDebug(Boolean value)
    • traceProperty

      public javafx.beans.property.ObjectProperty<Boolean> traceProperty()
      Trace: like debug, plus show calculations determining if changes are needed on the console
      Returns:
      the trace property
      See Also:
    • getTrace

      public Boolean getTrace()
      Gets the value of the trace property.
      Property description:
      Trace: like debug, plus show calculations determining if changes are needed on the console
      Returns:
      the value of the trace property
      See Also:
    • setTrace

      public void setTrace(Boolean value)
      Sets the value of the trace property.
      Property description:
      Trace: like debug, plus show calculations determining if changes are needed on the console
      Parameters:
      value - the value for the trace property
      See Also:
    • withTrace

      public ResponsivePane withTrace(Boolean value)
    • log

      private void log(String s)
    • getReusableNodes

      public javafx.collections.ObservableList<javafx.scene.Node> getReusableNodes()
      refs
    • addReusableNode

      public javafx.scene.Node addReusableNode(String id, javafx.scene.Node node)
      Parameters:
      id -
      node -
      Returns:
    • addReusableNode

      public javafx.scene.Node addReusableNode(javafx.scene.Node node)
      Parameters:
      node -
      Returns:
    • findResuableNode

      javafx.scene.Node findResuableNode(String refId)
      Parameters:
      refId -
      Returns:
    • getLayouts

      public javafx.collections.ObservableList<Layout> getLayouts()
      layouts
    • addLayout

      public void addLayout(Device device, javafx.scene.Node root)
      Convenience method for addLayout(Size, Node)
    • addLayout

      public void addLayout(String device, javafx.scene.Node root)
      Convenience method for addLayout(Size, Node)
    • addLayout

      public void addLayout(Size sizeAtLeast, javafx.scene.Node root)
      Convenience method for getLayouts().add(new Layout(sizeAtLeast, root))
    • addLayout

      public void addLayout(Device device, Orientation orientation, javafx.scene.Node root)
      Convenience method for addLayout(Size, Orientation, Node)
    • addLayout

      public void addLayout(String device, Orientation orientation, javafx.scene.Node root)
      Convenience method for addLayout(Size, Orientation, Node)
    • addLayout

      public void addLayout(Size sizeAtLeast, Orientation orientation, javafx.scene.Node root)
      Convenience method for getLayouts().add(new Layout(sizeAtLeast, orientation, root))
    • activeLayoutProperty

      public javafx.beans.property.ObjectProperty<Layout> activeLayoutProperty()
      ActiveLayout
      Returns:
      the activeLayout property
      See Also:
    • getActiveLayout

      public Layout getActiveLayout()
      Gets the value of the activeLayout property.
      Property description:
      ActiveLayout
      Returns:
      the value of the activeLayout property
      See Also:
    • setActiveLayout

      public void setActiveLayout(Layout value)
      Sets the value of the activeLayout property.
      Property description:
      ActiveLayout
      Parameters:
      value - the value for the activeLayout property
      See Also:
    • withActiveLayout

      public ResponsivePane withActiveLayout(Layout value)
    • getSceneStylesheets

      public javafx.collections.ObservableList<Stylesheet> getSceneStylesheets()
      sceneStylesheets
    • addSceneStylesheet

      public void addSceneStylesheet(Device device, String file)
      Convenience method for addSceneStylesheet(Size sizeAtLeast, String file)
    • addSceneStylesheet

      public void addSceneStylesheet(String device, String file)
      Convenience method for addSceneStylesheet(Size sizeAtLeast, String file)
    • addSceneStylesheet

      public void addSceneStylesheet(Size sizeAtLeast, String file)
      Convenience method for getSceneStylesheets().add(new Stylesheet(sizeAtLeast, file));
    • activeSceneStylesheetProperty

      public javafx.beans.property.ObjectProperty<Stylesheet> activeSceneStylesheetProperty()
      ActiveSceneStylesheet
      Returns:
      the activeSceneStylesheet property
      See Also:
    • getActiveSceneStylesheet

      public Stylesheet getActiveSceneStylesheet()
      Gets the value of the activeSceneStylesheet property.
      Property description:
      ActiveSceneStylesheet
      Returns:
      the value of the activeSceneStylesheet property
      See Also:
    • setActiveSceneStylesheet

      public void setActiveSceneStylesheet(Stylesheet value)
      Sets the value of the activeSceneStylesheet property.
      Property description:
      ActiveSceneStylesheet
      Parameters:
      value - the value for the activeSceneStylesheet property
      See Also:
    • withActiveSceneStylesheet

      public ResponsivePane withActiveSceneStylesheet(Stylesheet value)
    • getMyStylesheets

      public javafx.collections.ObservableList<Stylesheet> getMyStylesheets()
      myStylesheets
    • addMyStylesheet

      public void addMyStylesheet(Device device, String file)
      Convenience method for addMyStylesheet(Size sizeAtLeast, String file)
    • addMyStylesheet

      public void addMyStylesheet(String device, String file)
      Convenience method for addMyStylesheet(Size sizeAtLeast, String file)
    • addMyStylesheet

      public void addMyStylesheet(Size sizeAtLeast, String file)
      Convenience method for getMyStylesheets().add(new Stylesheet(sizeAtLeast, file));
    • activeMyStylesheetProperty

      public javafx.beans.property.ObjectProperty<Stylesheet> activeMyStylesheetProperty()
      ActiveMyStylesheet
      Returns:
      the activeMyStylesheet property
      See Also:
    • getActiveMyStylesheet

      public Stylesheet getActiveMyStylesheet()
      Gets the value of the activeMyStylesheet property.
      Property description:
      ActiveMyStylesheet
      Returns:
      the value of the activeMyStylesheet property
      See Also:
    • setActiveMyStylesheet

      public void setActiveMyStylesheet(Stylesheet value)
      Sets the value of the activeMyStylesheet property.
      Property description:
      ActiveMyStylesheet
      Parameters:
      value - the value for the activeMyStylesheet property
      See Also:
    • withActiveMyStylesheet

      public ResponsivePane withActiveMyStylesheet(Stylesheet value)
    • getDeviceSizes

      public final javafx.collections.ObservableMap<String,Size> getDeviceSizes()
    • setDeviceSize

      public void setDeviceSize(Device device, Size size)
      Convenience method for deviceSizes.put(device.toString(), size)
    • setDeviceSize

      public void setDeviceSize(String device, Size size)
      Convenience method for deviceSizes.put(device, size)
    • getDeviceSize

      public Size getDeviceSize(Device device)
      Convienience method for getDeviceSize(device.toString())
    • getDeviceSize

      public Size getDeviceSize(String device)
      Convienience method for getDeviceSize(device)
    • layoutChildren

      protected void layoutChildren()
      Overrides:
      layoutChildren in class javafx.scene.layout.StackPane
    • setupLayout

      void setupLayout()
    • determinePPI

      double determinePPI()
      Determine the pixels-per-inch of the screen we are on
      Returns:
    • determineActualDiagonalInInches

      double determineActualDiagonalInInches()
      Returns:
    • determineBestFittingLayout

      Layout determineBestFittingLayout()
      Returns:
    • determineBestFittingStylesheet

      Stylesheet determineBestFittingStylesheet(List<Stylesheet> availableStylesheets)
      Returns:
    • load

      void load(Stylesheet stylesheet, List<Stylesheet> availableStylesheets, List<String> activeStylesheetUrls)
      Parameters:
      stylesheet -