TModelItem
- The type of the model item.public abstract class AbstractGraphItemTemplate<TModelItem extends IModelItem> extends StackPane
IModelItem
s like INode
, ILabel
, etc. in a CanvasControl
.
Non-abstract subclasses of this template are used by INodeStyle
implementations and the like to
create the visualization of the model item.
Type | Property and Description |
---|---|
ObjectProperty<CanvasControl> |
canvas
Returns a property holding the
CanvasControl the current IModelItem belongs to. |
ObjectProperty<Object> |
content
Returns a property holding a content object that can be defined by the user.
|
BooleanProperty |
itemFocused
Indicates whether or not this
IModelItem is currently focused. |
BooleanProperty |
itemHighlighted
Indicates whether or not this
IModelItem is currently highlighted. |
ObjectProperty<TModelItem> |
item
Returns a property holding the current
IModelItem that this template visualizes. |
BooleanProperty |
itemSelected
Indicates whether or not this
IModelItem is currently selected. |
ObjectProperty<Object> |
styleTag
Returns a property holding the style tag that may contain style related information.
|
alignmentProperty
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, heightProperty, insetsProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, opaqueInsetsProperty, paddingProperty, prefHeightProperty, prefWidthProperty, scaleShapeProperty, shapeProperty, snapToPixelProperty, widthProperty
impl_traversalEngineProperty, needsLayoutProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, impl_treeVisibleProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, 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, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty
Modifier and Type | Field and Description |
---|---|
protected ObjectProperty<CanvasControl> |
canvas |
protected ObjectProperty<Object> |
content |
protected ObjectProperty<TModelItem> |
item |
protected BooleanProperty |
itemFocused |
protected BooleanProperty |
itemHighlighted |
protected BooleanProperty |
itemSelected |
protected Object |
lastContentObject |
protected ObjectProperty<Object> |
styleTag |
USE_COMPUTED_SIZE, USE_PREF_SIZE
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor and Description |
---|
AbstractGraphItemTemplate()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
ObjectProperty<CanvasControl> |
canvasProperty()
Returns a property holding the
CanvasControl the current IModelItem belongs to. |
ObjectProperty<Object> |
contentProperty()
Returns a property holding a content object that can be defined by the user.
|
CanvasControl |
getCanvas()
Gets the value of the property canvas.
|
Object |
getContent()
Gets the value of the property content.
|
TModelItem |
getItem()
Gets the value of property item.
|
boolean |
getItemFocused()
Gets the value of property itemFocused.
|
boolean |
getItemHighlighted()
Gets the value of property itemHighlighted.
|
boolean |
getItemSelected()
Gets the value of property itemSelected.
|
Object |
getStyleTag()
Sets the value of property style tag.
|
BooleanProperty |
itemFocusedProperty()
Indicates whether or not this
IModelItem is currently focused. |
BooleanProperty |
itemHighlightedProperty()
Indicates whether or not this
IModelItem is currently highlighted. |
ObjectProperty<TModelItem> |
itemProperty()
Returns a property holding the current
IModelItem that this template visualizes. |
BooleanProperty |
itemSelectedProperty()
Indicates whether or not this
IModelItem is currently selected. |
void |
setCanvas(CanvasControl canvas)
Sets the value of the property canvas.
|
void |
setContent(Object content)
Sets the value of the property content.
|
void |
setItem(TModelItem item)
Sets the value of property item.
|
void |
setItemFocused(boolean itemFocused)
Sets the value of property itemFocused.
|
void |
setItemHighlighted(boolean itemHighlighted)
Sets the value of property itemHighlighted.
|
void |
setItemSelected(boolean itemSelected)
Sets the value of property itemSelected.
|
void |
setStyleTag(Object styleTag)
Sets the value of property style tag.
|
ObjectProperty<Object> |
styleTagProperty()
Returns a property holding the style tag that may contain style related information.
|
protected void |
updateState(IRenderContext ctx,
TModelItem item,
AbstractTemplateStyle<TModelItem> style)
Updates all properties according to the given
IModelItem and additional information. |
alignmentProperty, clearConstraints, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getAlignment, getAlignment, getClassCssMetaData, getContentBias, getCssMetaData, getMargin, layoutChildren, requestLayout, setAlignment, setAlignment, setMargin
getChildren
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, 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, snapSize, snapSpace, snapToPixelProperty, widthProperty
getBaselineOffset, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processCSS, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBounds
accessibleHelpProperty, 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, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, 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, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_cssGetFocusTraversableInitialValue, 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, visibleProperty
public final ObjectProperty<CanvasControl> canvasProperty
CanvasControl
the current IModelItem
belongs to.public final ObjectProperty<Object> contentProperty
public final BooleanProperty itemFocusedProperty
IModelItem
is currently focused.public final BooleanProperty itemHighlightedProperty
IModelItem
is currently highlighted.public final ObjectProperty<TModelItem extends IModelItem> itemProperty
IModelItem
that this template visualizes.public final BooleanProperty itemSelectedProperty
IModelItem
is currently selected.public final ObjectProperty<Object> styleTagProperty
protected ObjectProperty<CanvasControl> canvas
protected final ObjectProperty<Object> content
protected final ObjectProperty<TModelItem extends IModelItem> item
protected BooleanProperty itemFocused
protected BooleanProperty itemHighlighted
protected BooleanProperty itemSelected
protected Object lastContentObject
protected ObjectProperty<Object> styleTag
public AbstractGraphItemTemplate()
public final ObjectProperty<CanvasControl> canvasProperty()
CanvasControl
the current IModelItem
belongs to.public final ObjectProperty<Object> contentProperty()
public final CanvasControl getCanvas()
public final Object getContent()
public final TModelItem getItem()
public final boolean getItemFocused()
true
if the item is focused, false
otherwise.public final boolean getItemHighlighted()
true
if the item is highlighted, false
otherwise.public final boolean getItemSelected()
true
if the item is selected, false
otherwise.public final Object getStyleTag()
public final BooleanProperty itemFocusedProperty()
IModelItem
is currently focused.public final BooleanProperty itemHighlightedProperty()
IModelItem
is currently highlighted.public final ObjectProperty<TModelItem> itemProperty()
IModelItem
that this template visualizes.public final BooleanProperty itemSelectedProperty()
IModelItem
is currently selected.public final void setCanvas(CanvasControl canvas)
canvas
- The canvas control.public final void setContent(Object content)
content
- The content object.public final void setItem(TModelItem item)
item
- The model item.public final void setItemFocused(boolean itemFocused)
itemFocused
- true
if the item should be focused, false
otherwise.public final void setItemHighlighted(boolean itemHighlighted)
itemHighlighted
- true
if the item should be highlighted, false
otherwise.public final void setItemSelected(boolean itemSelected)
itemSelected
- true
if the item should be selected, false
otherwise.public final void setStyleTag(Object styleTag)
styleTag
- The style tag.public final ObjectProperty<Object> styleTagProperty()
protected void updateState(IRenderContext ctx, TModelItem item, AbstractTemplateStyle<TModelItem> style)
IModelItem
and additional information.ctx
- The rendering context.item
- The model item.style
- The style of the model item.