java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
org.tbee.javafx.scene.layout.MigPane
- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget
- Direct Known Subclasses:
MigPane
public class MigPane
extends javafx.scene.layout.Pane
Manages nodes with MigLayout added via add(node, CC)
- Author:
- Tom Eugelink
-
Property Summary
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, 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, 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
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected static final Stringstatic final Stringstatic final StringFields 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
ConstructorsConstructorDescriptionMigPane()use the string layout constraintsuse the string layout constraintsuse the string layout constraintsuse the class layout constraintsuse the class layout constraintsuse the class layout constraints -
Method Summary
Modifier and TypeMethodDescriptionadd(int index, javafx.scene.Node node) add(javafx.scene.Node node) voidaddLayoutCallback(LayoutCallback callback) Adds the callback function that will be called at different stages of the layout cycle.voidanimateAdded(javafx.scene.Node node) booleananimateBoundsChange(javafx.scene.Node node, int x, int y, int width, int height) voidanimateRemoved(javafx.scene.Node node) voidprotected doublecomputeHeight(double refWidth, int type) protected doublecomputeMaxHeight(double width) protected doublecomputeMaxWidth(double height) protected doublecomputeMinHeight(double width) protected doublecomputeMinWidth(double height) protected doublecomputePrefHeight(double width) protected doublecomputePrefWidth(double height) protected doublecomputeWidth(double refHeight, int type) ColumnConstraints:getComponentConstraints(javafx.scene.Node node) Returns the constraints for the nodejavafx.geometry.Orientationjavafx.scene.paint.ColordebugCellColorjavafx.scene.paint.ColordebugContainerOutlineColorjavafx.scene.paint.ColordebugExternalColorjavafx.scene.paint.ColordebugOutlineColorLayoutConstraints:RowConstraints:voidRemoves the grid so it is recreated as needed next time.protected voidThis is where the actual layout happensjavafx.scene.Noderemove(int ix) booleanremove(javafx.scene.Node node) voidremoveLayoutCallback(LayoutCallback callback) Removes the callback if it exists.voidvoidsetColumnConstraints(AC value) voidsetComponentConstraints(javafx.scene.Node node, String ccs) Sets the constraints for the nodevoidsetComponentConstraints(javafx.scene.Node node, CC cc) Sets the constraints for the nodevoidsetDebugCellColor(javafx.scene.paint.Color value) voidsetDebugContainerOutlineColor(javafx.scene.paint.Color value) voidsetDebugExternalColor(javafx.scene.paint.Color value) voidsetDebugOutlineColor(javafx.scene.paint.Color value) protected voidsetHeight(double newHeight) voidvoidsetRowConstraints(AC value) protected voidsetWidth(double newWidth) booleanwithColumnConstraints(AC value) withLayoutConstraints(LC value) withRowConstraints(AC value) Methods inherited from class javafx.scene.layout.Pane
getChildrenMethods 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, 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, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, 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, 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, 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, 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
-
FXML_CC_KEY
- See Also:
-
LAYOUTCONSTRAINTS_PROPERTY_ID
- See Also:
-
COLUMNCONSTRAINTS_PROPERTY_ID
- See Also:
-
ROWCONSTRAINTS_PROPERTY_ID
- See Also:
-
-
Constructor Details
-
MigPane
public MigPane() -
MigPane
use the class layout constraints -
MigPane
use the class layout constraints -
MigPane
use the class layout constraints -
MigPane
use the string layout constraints -
MigPane
use the string layout constraints -
MigPane
use the string layout constraints
-
-
Method Details
-
computeMinWidth
protected double computeMinWidth(double height) - Overrides:
computeMinWidthin classjavafx.scene.layout.Region
-
computeMinHeight
protected double computeMinHeight(double width) - Overrides:
computeMinHeightin classjavafx.scene.layout.Region
-
computePrefWidth
protected double computePrefWidth(double height) - Overrides:
computePrefWidthin classjavafx.scene.layout.Region
-
computePrefHeight
protected double computePrefHeight(double width) - Overrides:
computePrefHeightin classjavafx.scene.layout.Region
-
computeMaxWidth
protected double computeMaxWidth(double height) - Overrides:
computeMaxWidthin classjavafx.scene.layout.Region
-
computeMaxHeight
protected double computeMaxHeight(double width) - Overrides:
computeMaxHeightin classjavafx.scene.layout.Region
-
computeWidth
protected double computeWidth(double refHeight, int type) -
computeHeight
protected double computeHeight(double refWidth, int type) -
getContentBias
public javafx.geometry.Orientation getContentBias()- Overrides:
getContentBiasin classjavafx.scene.Node
-
getLayoutConstraints
LayoutConstraints: -
setLayoutConstraints
-
withLayoutConstraints
-
getColumnConstraints
ColumnConstraints: -
setColumnConstraints
-
withColumnConstraints
-
getRowConstraints
RowConstraints: -
setRowConstraints
-
withRowConstraints
-
getComponentConstraints
Returns the constraints for the node- Returns:
- May be null which means all default constraints.
-
setComponentConstraints
Sets the constraints for the node- Parameters:
node- The node. Must already be in the pane.ccs- The component constraints.
-
setComponentConstraints
Sets the constraints for the node- Parameters:
node- The node. Must already be in the pane.cc- The component constraints. Can be null.
-
animateAdded
public void animateAdded(javafx.scene.Node node) -
animateRemoved
public void animateRemoved(javafx.scene.Node node) -
animateBoundsChange
public boolean animateBoundsChange(javafx.scene.Node node, int x, int y, int width, int height) -
addLayoutCallback
Adds the callback function that will be called at different stages of the layout cycle.- Parameters:
callback- The callback. Notnull.
-
removeLayoutCallback
Removes the callback if it exists.- Parameters:
callback- The callback. May benull.
-
add
-
add
-
add
-
add
-
add
-
add
-
remove
public boolean remove(javafx.scene.Node node) -
remove
public javafx.scene.Node remove(int ix) -
layoutChildren
protected void layoutChildren()This is where the actual layout happens- Overrides:
layoutChildrenin classjavafx.scene.Parent
-
setWidth
protected void setWidth(double newWidth) - Overrides:
setWidthin classjavafx.scene.layout.Region
-
setHeight
protected void setHeight(double newHeight) - Overrides:
setHeightin classjavafx.scene.layout.Region
-
requestLayout
public void requestLayout()- Overrides:
requestLayoutin classjavafx.scene.Parent
-
invalidateGrid
public void invalidateGrid()Removes the grid so it is recreated as needed next time. Should only be needed when the grid structure, or the interpretation of it, has changed. Should normally don't have to be called by client code since this should be fully handled by MigPane. -
usesMirroring
public boolean usesMirroring()- Overrides:
usesMirroringin classjavafx.scene.Node
-
clearDebug
public void clearDebug() -
getDebugCellColor
public javafx.scene.paint.Color getDebugCellColor()debugCellColor -
setDebugCellColor
public void setDebugCellColor(javafx.scene.paint.Color value) -
getDebugExternalColor
public javafx.scene.paint.Color getDebugExternalColor()debugExternalColor -
setDebugExternalColor
public void setDebugExternalColor(javafx.scene.paint.Color value) -
getDebugOutlineColor
public javafx.scene.paint.Color getDebugOutlineColor()debugOutlineColor -
setDebugOutlineColor
public void setDebugOutlineColor(javafx.scene.paint.Color value) -
getDebugContainerOutlineColor
public javafx.scene.paint.Color getDebugContainerOutlineColor()debugContainerOutlineColor -
setDebugContainerOutlineColor
public void setDebugContainerOutlineColor(javafx.scene.paint.Color value)
-