public class NodePart extends AbstractFXContentPart<javafx.scene.Group> implements ITransformableContentPart<javafx.scene.Node,javafx.scene.Group>, IResizableContentPart<javafx.scene.Node,javafx.scene.Group>
contentAnchoragesUnmodifiable, contentChildrenUnmodifiable, content
active, adapters, anchoragesUnmodifiable, anchoredsUnmodifiable, children, parent, refreshVisual
contentAnchoragesUnmodifiable, contentChildrenUnmodifiable, content
anchoragesUnmodifiable, anchoredsUnmodifiable, children, parent, refreshVisual
adapters
active
Modifier and Type | Class and Description |
---|---|
static class |
NodePart.NestedGraphIcon
JavaFX Node displaying a small icon representing a nested graph.
|
IAdaptable.Bound<A extends IAdaptable>
Modifier and Type | Field and Description |
---|---|
protected static double |
CHILDREN_PANE_HEIGHT_THRESHOLD
The minimum height for the nested graph area.
|
protected static double |
CHILDREN_PANE_WIDTH_THRESHOLD
The minimum width for the nested graph area.
|
static java.lang.String |
CSS_CLASS
|
static java.lang.String |
CSS_CLASS_ICON
The CSS class that is applied to the
Image that displays the
icon. |
static java.lang.String |
CSS_CLASS_LABEL
The CSS class that is applied to the
Text that displays the
label. |
static java.lang.String |
CSS_CLASS_SHAPE
The CSS class that is applied to the
Rectangle that displays
border and background. |
protected static double |
DEFAULT_CHILDREN_PANE_HEIGHT
The default height of the nested graph area.
|
protected static double |
DEFAULT_CHILDREN_PANE_WIDTH
The default width of the nested graph area.
|
static double |
DEFAULT_NESTED_CHILDREN_ZOOM_FACTOR
The default zoom factor that is applied to the nested graph area.
|
static double |
DEFAULT_OUTER_LAYOUT_CONTAINER_HEIGHT_LEAF
The default height for the outer most layout container of this node in
the case of no nested content.
|
static double |
DEFAULT_OUTER_LAYOUT_CONTAINER_HEIGHT_NESTING
The default height for the outer most layout container of this node in
the case of nested content.
|
static double |
DEFAULT_OUTER_LAYOUT_CONTAINER_WIDTH_LEAF
The default width for the outer most layout container of this node in the
case of no nested content.
|
static double |
DEFAULT_OUTER_LAYOUT_CONTAINER_WIDTH_NESTING
The default width for the outer most layout container of this node in the
case of nested content.
|
protected static double |
DEFAULT_PADDING
The default padding between the node's border and its content.
|
protected static double |
ZOOMLEVEL_SHOW_NESTED_GRAPH
The zoom level that needs to be reached for the
doGetContentChildren() method to return a nested Graph . |
CONTENT_ANCHORAGES_PROPERTY, CONTENT_CHILDREN_PROPERTY, CONTENT_PROPERTY
ANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTY, REFRESH_VISUAL_PROPERTY
ADAPTERS_PROPERTY
ACTIVE_PROPERTY
Constructor and Description |
---|
NodePart() |
Modifier and Type | Method and Description |
---|---|
protected void |
addChildVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> child,
int index) |
protected javafx.scene.Group |
createVisual() |
protected void |
doActivate() |
protected void |
doDeactivate() |
protected com.google.common.collect.SetMultimap<? extends java.lang.Object,java.lang.String> |
doGetContentAnchorages() |
protected java.util.List<? extends java.lang.Object> |
doGetContentChildren() |
protected void |
doRefreshVisual(javafx.scene.Group visual) |
Node |
getContent() |
protected javafx.scene.image.ImageView |
getIconImageView()
Returns the
ImageView that displays the node's icon. |
protected javafx.scene.text.Text |
getLabelText()
Returns the
Text that displays the node's label. |
javafx.scene.layout.Pane |
getNestedChildrenPane()
Returns the
Pane to which nested children are added. |
protected javafx.scene.shape.Rectangle |
getNodeRect()
Returns the
Rectangle that displays the node's border and
background. |
protected javafx.scene.layout.Region |
getOuterLayoutContainer()
Returns the outer most layout container that is used to layout the
content of this node (including nested content).
|
protected double |
getPadding()
Returns the padding that is maintained between the node's border and its
content.
|
protected boolean |
isNesting()
|
protected void |
refreshIcon(javafx.scene.image.Image icon)
|
protected void |
refreshLabel(java.lang.String label)
Changes the label of this
NodePart to the given value. |
protected void |
refreshLabelCssStyle(java.lang.String labelCssStyle)
Adjusts the node's label CSS style to the given value.
|
protected void |
refreshNesting(boolean isNesting)
When this node has a nested graph, space is reserved for it, so that the
transition from an icon to the real graph will not change the node's
size.
|
protected void |
refreshPosition(Point position)
Adjusts the node's position to fit the given
Point . |
protected void |
refreshRectCssStyle(java.lang.String nodeRectCssStyle)
Adjusts the node rectangle's CSS style to the given value.
|
protected void |
refreshSize(Dimension size)
Adjusts the position and size of this part's visual to the given bounds.
|
protected void |
refreshTooltip(java.lang.String tooltip)
Changes the tooltip of this
NodePart to the given value. |
protected void |
removeChildVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> child,
int index) |
void |
resizeContent(Dimension size) |
void |
transformContent(AffineTransform transform) |
addContentChild, attachToContentAnchorage, contentAnchoragesUnmodifiableProperty, contentChildrenUnmodifiableProperty, contentProperty, detachFromContentAnchorage, doAddContentChild, doAttachToContentAnchorage, doDetachFromContentAnchorage, doRemoveContentChild, doReorderContentChild, getContentAnchoragesUnmodifiable, getContentChildrenUnmodifiable, isFocusable, isSelectable, onContentChanged, refreshContentAnchorages, refreshContentChildren, register, registerAtContentPartMap, removeContentChild, reorderContentChild, setContent, unregister, unregisterFromContentPartMap
activate, activateChildren, activeProperty, adaptersProperty, addChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, attachToAnchorageVisual, childrenProperty, deactivate, deactivateChildren, detachAnchored, detachFromAnchorage, detachFromAnchorage, detachFromAnchorageVisual, determineViewer, dispose, getAdapter, getAdapter, getAdapter, getAdapters, getAdapters, getAdapters, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getParent, getPolicies, getRoot, getViewer, getVisual, isActive, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, registerAtVisualPartMap, removeChild, removeChildren, reorderChild, setAdapter, setAdapter, setAdapter, setAdapter, setParent, setRefreshVisual, unregisterFromVisualPartMap, unsetAdapter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addContentChild, attachToContentAnchorage, contentAnchoragesUnmodifiableProperty, contentChildrenUnmodifiableProperty, contentProperty, detachFromContentAnchorage, getContentAnchoragesUnmodifiable, getContentChildrenUnmodifiable, isFocusable, isSelectable, refreshContentAnchorages, refreshContentChildren, removeContentChild, reorderContentChild, setContent
addChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenProperty, detachAnchored, detachFromAnchorage, detachFromAnchorage, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getParent, getPolicies, getRoot, getVisual, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, removeChild, removeChildren, reorderChild, setParent, setRefreshVisual
adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapter
activate, activeProperty, deactivate, isActive
dispose
protected static final double DEFAULT_PADDING
protected static final double ZOOMLEVEL_SHOW_NESTED_GRAPH
doGetContentChildren()
method to return a nested Graph
.protected static final double DEFAULT_CHILDREN_PANE_WIDTH
protected static final double DEFAULT_CHILDREN_PANE_HEIGHT
protected static final double CHILDREN_PANE_WIDTH_THRESHOLD
protected static final double CHILDREN_PANE_HEIGHT_THRESHOLD
public static final double DEFAULT_NESTED_CHILDREN_ZOOM_FACTOR
public static final double DEFAULT_OUTER_LAYOUT_CONTAINER_WIDTH_NESTING
public static final double DEFAULT_OUTER_LAYOUT_CONTAINER_HEIGHT_NESTING
public static final double DEFAULT_OUTER_LAYOUT_CONTAINER_WIDTH_LEAF
public static final double DEFAULT_OUTER_LAYOUT_CONTAINER_HEIGHT_LEAF
public static final java.lang.String CSS_CLASS
public static final java.lang.String CSS_CLASS_SHAPE
Rectangle
that displays
border and background.public static final java.lang.String CSS_CLASS_LABEL
Text
that displays the
label.public static final java.lang.String CSS_CLASS_ICON
Image
that displays the
icon.protected void addChildVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> child, int index)
addChildVisual
in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>
protected javafx.scene.Group createVisual()
createVisual
in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>
protected void doActivate()
doActivate
in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>
protected void doDeactivate()
doDeactivate
in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>
protected com.google.common.collect.SetMultimap<? extends java.lang.Object,java.lang.String> doGetContentAnchorages()
doGetContentAnchorages
in class AbstractContentPart<javafx.scene.Node,javafx.scene.Group>
protected java.util.List<? extends java.lang.Object> doGetContentChildren()
doGetContentChildren
in class AbstractContentPart<javafx.scene.Node,javafx.scene.Group>
protected void doRefreshVisual(javafx.scene.Group visual)
doRefreshVisual
in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>
public Node getContent()
getContent
in interface IContentPart<javafx.scene.Node,javafx.scene.Group>
getContent
in class AbstractContentPart<javafx.scene.Node,javafx.scene.Group>
protected javafx.scene.image.ImageView getIconImageView()
ImageView
that displays the node's icon.ImageView
that displays the node's icon.protected javafx.scene.text.Text getLabelText()
Text
that displays the node's label.Text
that displays the node's label.public javafx.scene.layout.Pane getNestedChildrenPane()
Pane
to which nested children are added.Pane
to which nested children are added.protected javafx.scene.shape.Rectangle getNodeRect()
Rectangle
that displays the node's border and
background.Rectangle
that displays the node's border and
background.protected javafx.scene.layout.Region getOuterLayoutContainer()
protected double getPadding()
protected boolean isNesting()
protected void refreshIcon(javafx.scene.image.Image icon)
icon
- The new icon for this NodePart
.protected void refreshLabel(java.lang.String label)
NodePart
to the given value.label
- The new label for this NodePart
.protected void refreshLabelCssStyle(java.lang.String labelCssStyle)
labelCssStyle
- The new label CSS style for this node.protected void refreshNesting(boolean isNesting)
isNesting
- true
if this node has a nested graph, otherwise
false
.protected void refreshPosition(Point position)
Point
.position
- This node's position.protected void refreshRectCssStyle(java.lang.String nodeRectCssStyle)
nodeRectCssStyle
- The new node rectangle CSS style.protected void refreshSize(Dimension size)
size
- The Rectangle
describing the bounds for this part's
visual.protected void refreshTooltip(java.lang.String tooltip)
NodePart
to the given value.tooltip
- The new tooltip for this NodePart
.protected void removeChildVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> child, int index)
removeChildVisual
in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>
public void resizeContent(Dimension size)
resizeContent
in interface IResizableContentPart<javafx.scene.Node,javafx.scene.Group>
public void transformContent(AffineTransform transform)
transformContent
in interface ITransformableContentPart<javafx.scene.Node,javafx.scene.Group>
Copyright (c) 2014 itemis AG and others. All rights reserved.