public class PropertySheet
extends javafx.scene.control.Control
To better describe what a property sheet is, please refer to the picture
below:
In this property sheet there exists two columns: the left column shows a
label describing the property itself, whereas the right column provides a
PropertyEditor that allows the end user the means to manipulate the
property. In the screenshot you can see CheckEditor,
ChoiceEditor, TextEditor and FontEditor, among the
many editors that are available in the Editors
package.
To create a PropertySheet is simple: you firstly instantiate an instance
of PropertySheet, and then you pass in a list of PropertySheet.Item instances,
where each Item represents a single property that is to be editable by the
end user.
class, in particular the
BeanPropertyUtils.getProperties(Object) method that will return a
list of Item instances, one Item instance per property on the given JavaBean.PropertySheet.Item,
PropertySheet.Mode| Type | Property and Description |
|---|---|
javafx.beans.property.SimpleObjectProperty<java.util.Comparator<java.lang.String>> |
categoryComparator
Used to represent how the categories should be laid out in
the PropertySheet when using the Category mode (see
PropertySheet.Mode). |
javafx.beans.property.SimpleObjectProperty<PropertySheet.Mode> |
mode
Used to represent how the properties should be laid out in
the PropertySheet.
|
javafx.beans.property.SimpleBooleanProperty |
modeSwitcherVisible
This property represents whether a visual option should be presented to
users to switch between the various
modes available. |
javafx.beans.property.SimpleBooleanProperty |
searchBoxVisible
This property represents whether a text field should be presented to
users to allow for them to filter the properties in the property sheet to
only show ones matching the typed input.
|
contextMenu, skinClassName, skin, tooltipbackground, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthaccessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, impl_showMnemonics, impl_treeVisible, 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, visible| Modifier and Type | Class and Description |
|---|---|
static interface |
PropertySheet.Item
A wrapper interface for a single property to be displayed in a
PropertySheet control. |
static class |
PropertySheet.Mode
Specifies how the
PropertySheet should be laid out. |
| Constructor and Description |
|---|
PropertySheet()
Creates a default PropertySheet instance with no properties to edit.
|
PropertySheet(javafx.collections.ObservableList<PropertySheet.Item> items)
Creates a PropertySheet instance prepopulated with the items provided
in the items
ObservableList. |
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.SimpleObjectProperty<java.util.Comparator<java.lang.String>> |
categoryComparatorProperty()
Used to represent how the categories should be laid out in
the PropertySheet when using the Category mode (see
PropertySheet.Mode). |
protected javafx.scene.control.Skin<?> |
createDefaultSkin() |
java.util.Comparator<java.lang.String> |
getCategoryComparator() |
javafx.collections.ObservableList<PropertySheet.Item> |
getItems() |
PropertySheet.Mode |
getMode() |
javafx.util.Callback<PropertySheet.Item,PropertyEditor<?>> |
getPropertyEditorFactory() |
java.lang.String |
getTitleFilter() |
java.lang.String |
getUserAgentStylesheet() |
protected java.lang.String |
getUserAgentStylesheet(java.lang.Class<?> clazz,
java.lang.String fileName)
A helper method that ensures that the resource based lookup of the user
agent stylesheet only happens once.
|
boolean |
isModeSwitcherVisible() |
boolean |
isSearchBoxVisible() |
javafx.beans.property.SimpleObjectProperty<PropertySheet.Mode> |
modeProperty()
Used to represent how the properties should be laid out in
the PropertySheet.
|
javafx.beans.property.SimpleBooleanProperty |
modeSwitcherVisibleProperty()
This property represents whether a visual option should be presented to
users to switch between the various
modes available. |
javafx.beans.property.SimpleObjectProperty<javafx.util.Callback<PropertySheet.Item,PropertyEditor<?>>> |
propertyEditorFactory()
The property editor factory is used by the PropertySheet to determine which
PropertyEditor to use for a given PropertySheet.Item. |
javafx.beans.property.SimpleBooleanProperty |
searchBoxVisibleProperty()
This property represents whether a text field should be presented to
users to allow for them to filter the properties in the property sheet to
only show ones matching the typed input.
|
void |
setCategoryComparator(java.util.Comparator<java.lang.String> categoryComparator)
Set how the categories should be laid out in
the PropertySheet.
|
void |
setMode(PropertySheet.Mode mode)
Set how the properties should be laid out in
the PropertySheet.
|
void |
setModeSwitcherVisible(boolean visible)
Set whether a visual option should be presented to
users to switch between the various
modes available. |
void |
setPropertyEditorFactory(javafx.util.Callback<PropertySheet.Item,PropertyEditor<?>> factory)
Sets a new editor factory used by the PropertySheet to determine which
PropertyEditor to use for a given PropertySheet.Item. |
void |
setSearchBoxVisible(boolean visible)
Sets whether a text field should be presented to
users to allow for them to filter the properties in the property sheet to
only show ones matching the typed input.
|
void |
setTitleFilter(java.lang.String filter)
Sets the filter for filtering the options shown on screen.
|
javafx.beans.property.SimpleStringProperty |
titleFilter()
Regardless of whether the
search box
is visible or not, it is possible to filter the options shown on screen
using this title filter property. |
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getSkin, getTooltip, impl_cssGetFocusTraversableInitialValue, impl_processCSS, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipPropertybackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, 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, snapSize, snapSpace, snapToPixelProperty, widthPropertygetChildren, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBoundsaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, 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, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, 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, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visiblePropertypublic final javafx.beans.property.SimpleObjectProperty<PropertySheet.Mode> modeProperty
PropertySheet.Mode enumeration to better
understand the available options.getMode(),
setMode(Mode)public final javafx.beans.property.SimpleBooleanProperty modeSwitcherVisibleProperty
modes available. By
default this is true, so setting it to false will hide these buttons.public final javafx.beans.property.SimpleBooleanProperty searchBoxVisibleProperty
isSearchBoxVisible(),
setSearchBoxVisible(boolean)public final javafx.beans.property.SimpleObjectProperty<java.util.Comparator<java.lang.String>> categoryComparatorProperty
PropertySheet.Mode).
Thus allowing user to sort categories by other ways than alphabetical
or numerical order.public PropertySheet()
public PropertySheet(javafx.collections.ObservableList<PropertySheet.Item> items)
ObservableList.items - The items that should appear within the PropertySheet.public javafx.collections.ObservableList<PropertySheet.Item> getItems()
protected javafx.scene.control.Skin<?> createDefaultSkin()
createDefaultSkin in class javafx.scene.control.Controlpublic java.lang.String getUserAgentStylesheet()
getUserAgentStylesheet in class javafx.scene.layout.Regionpublic final javafx.beans.property.SimpleObjectProperty<PropertySheet.Mode> modeProperty()
PropertySheet.Mode enumeration to better
understand the available options.getMode(),
setMode(Mode)public final PropertySheet.Mode getMode()
PropertySheet.Modepublic final void setMode(PropertySheet.Mode mode)
mode - public final javafx.beans.property.SimpleObjectProperty<javafx.util.Callback<PropertySheet.Item,PropertyEditor<?>>> propertyEditorFactory()
PropertyEditor to use for a given PropertySheet.Item. By default the
DefaultPropertyEditorFactory is used, but this may be replaced
or extended by developers wishing to add in (or substitute) their own
property editors.public final javafx.util.Callback<PropertySheet.Item,PropertyEditor<?>> getPropertyEditorFactory()
PropertyEditor to use for a given PropertySheet.Item.public final void setPropertyEditorFactory(javafx.util.Callback<PropertySheet.Item,PropertyEditor<?>> factory)
PropertyEditor to use for a given PropertySheet.Item.factory - public final javafx.beans.property.SimpleBooleanProperty modeSwitcherVisibleProperty()
modes available. By
default this is true, so setting it to false will hide these buttons.public final boolean isModeSwitcherVisible()
modes available.public final void setModeSwitcherVisible(boolean visible)
modes available.visible - public final javafx.beans.property.SimpleBooleanProperty searchBoxVisibleProperty()
isSearchBoxVisible(),
setSearchBoxVisible(boolean)public final boolean isSearchBoxVisible()
public final void setSearchBoxVisible(boolean visible)
visible - public final javafx.beans.property.SimpleStringProperty titleFilter()
search box
is visible or not, it is possible to filter the options shown on screen
using this title filter property. If the search box is visible, it will
manipulate this property to contain whatever the user types.public final java.lang.String getTitleFilter()
titleFilter()public final void setTitleFilter(java.lang.String filter)
filter - titleFilter()public final javafx.beans.property.SimpleObjectProperty<java.util.Comparator<java.lang.String>> categoryComparatorProperty()
PropertySheet.Mode).
Thus allowing user to sort categories by other ways than alphabetical
or numerical order.public final java.util.Comparator<java.lang.String> getCategoryComparator()
PropertySheet.Modepublic final void setCategoryComparator(java.util.Comparator<java.lang.String> categoryComparator)
mode - protected final java.lang.String getUserAgentStylesheet(java.lang.Class<?> clazz,
java.lang.String fileName)
clazz - the class used for the resource lookupfileName - the name of the user agent stylesheet