public class NodeContentPart extends AbstractFXContentPart<javafx.scene.Group>
NodeContentPart is the controller for a
Node content object.| Modifier and Type | Class and Description |
|---|---|
static class |
NodeContentPart.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
The CSS class that is applied to the
visual of this
NodeContentPart. |
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.
|
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
getContentChildren() method to return a nested Graph. |
pcsCONTENT_PROPERTYANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTYADAPTERS_PROPERTYACTIVE_PROPERTY| Constructor and Description |
|---|
NodeContentPart() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addChildVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> child,
int index) |
protected javafx.scene.layout.Pane |
createNestedContentPane()
Creates the
Pane that is used to display nested content. |
protected javafx.scene.layout.StackPane |
createNestedContentStackPane(javafx.scene.layout.Pane nestedContentPane)
Creates the
StackPane that is used to either display nested
content, or an icon indicating that nested content exists for this
NodeContentPart. |
protected void |
createNodeVisual(javafx.scene.Group group,
javafx.scene.shape.Rectangle rect,
javafx.scene.image.ImageView iconImageView,
javafx.scene.text.Text labelText,
javafx.scene.layout.StackPane nestedContentStackPane)
Creates the node visual.
|
protected javafx.scene.Group |
createVisual() |
protected void |
doActivate() |
protected void |
doDeactivate() |
void |
doRefreshVisual(javafx.scene.Group visual) |
Node |
getContent() |
java.util.List<? extends java.lang.Object> |
getContentChildren() |
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.layout.StackPane |
getNestedContentStackPane()
Returns the
StackPane that either displays nested content or an
icon indicating that nested content exists for this
NodeContentPart. |
protected javafx.scene.Node |
getNestedGraphIcon()
Returns the
Node that is displayed in the
getNestedContentStackPane() when nested content is available,
but not rendered, currently. |
protected javafx.scene.shape.Rectangle |
getNodeRect()
Returns the
Rectangle that displays the node's border and
background. |
protected double |
getPadding()
Returns the padding that is maintained between the node's border and its
content.
|
protected void |
hideNestedGraphIcon()
Removes the
getNestedGraphIcon() from the
getNestedContentStackPane() and sets the nested graph icon to null. |
protected boolean |
isNesting()
|
protected void |
refreshCssClass(javafx.scene.Group visual,
java.lang.String cssClass)
Adds the given CSS class to the given visual.
|
protected java.lang.String |
refreshFisheye(javafx.scene.Group visual,
java.util.Map<java.lang.String,java.lang.Object> attrs,
java.lang.String str)
Adjusts the visualization to reflect the fisheye state of the node.
|
protected void |
refreshIcon(javafx.scene.Group visual,
java.lang.Object icon)
|
protected void |
refreshLabel(javafx.scene.Group visual,
java.lang.String str)
Changes the label of this
NodeContentPart to the given value. |
protected void |
refreshNestedGraphArea(javafx.scene.Group visual,
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 |
refreshTooltip(javafx.scene.Group visual,
java.lang.Object tooltip)
Changes the tooltip of this
NodeContentPart to the given value. |
protected void |
removeChildVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> child,
int index) |
protected void |
resizeNestedGraphArea(double dw,
double dh)
Resizes the area for the graph nested in this node.
|
protected void |
setNestedGraphIcon(javafx.scene.Node nestedGraphIcon)
Changes the nested graph icon that is displayed to indicate that nested
content is available to the given value.
|
protected void |
showNestedGraphIcon()
Creates the nested graph icon and adds it to the
getNestedContentStackPane(). |
registerAtVisualPartMap, registerNestedVisuals, unregisterFromVisualPartMap, unregisterNestedVisualsaddContentChild, attachToContentAnchorage, detachFromContentAnchorage, getContentAnchorages, register, registerAtContentPartMap, removeContentChild, setContent, unregister, unregisterFromContentPartMapactivate, addAnchorage, addAnchorage, addAnchored, addChild, addChild, addChildren, addChildren, addPropertyChangeListener, attachToAnchorageVisual, deactivate, detachFromAnchorageVisual, dispose, getAdapter, getAdapter, getAdapter, getAdapters, getAdapters, getAnchorages, getAnchoreds, getBehaviors, getChildren, getParent, getPolicies, getRoot, getViewer, getVisual, isActive, isRefreshVisual, refreshVisual, removeAnchorage, removeAnchorage, removeAnchored, removeChild, removeChildren, removePropertyChangeListener, reorderChild, setAdapter, setAdapter, setAdapter, setAdapters, setParent, setRefreshVisual, unsetAdapterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAnchorage, addAnchorage, addAnchored, addChild, addChild, addChildren, addChildren, getAnchorages, getAnchoreds, getBehaviors, getChildren, getParent, getPolicies, getRoot, getVisual, isRefreshVisual, refreshVisual, removeAnchorage, removeAnchorage, removeAnchored, removeChild, removeChildren, reorderChild, setParent, setRefreshVisualgetAdapter, getAdapter, getAdapter, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, unsetAdapteractivate, deactivate, isActiveaddPropertyChangeListener, removePropertyChangeListenerdisposeprotected static final double DEFAULT_PADDING
protected static final double ZOOMLEVEL_SHOW_NESTED_GRAPH
getContentChildren() 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 java.lang.String CSS_CLASS
visual of this
NodeContentPart.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.layout.Pane createNestedContentPane()
Pane that is used to display nested content.Pane that is used to display nested content.protected javafx.scene.layout.StackPane createNestedContentStackPane(javafx.scene.layout.Pane nestedContentPane)
StackPane that is used to either display nested
content, or an icon indicating that nested content exists for this
NodeContentPart. The given Pane is inserted into the
children list of the created StackPane.nestedContentPane - The nested content Pane.StackPane.protected void createNodeVisual(javafx.scene.Group group,
javafx.scene.shape.Rectangle rect,
javafx.scene.image.ImageView iconImageView,
javafx.scene.text.Text labelText,
javafx.scene.layout.StackPane nestedContentStackPane)
ImageView, Text, and
StackPane are inserted into that node visual to display the
node's icon, label and nested children, respectively. The node visual
needs to be inserted into the given Group.group - This node's visual.rect - The Rectangle displaying border and background.iconImageView - The ImageView displaying the node's icon.labelText - The Text displaying the node's label.nestedContentStackPane - The StackPane displaying the node's nested content.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>public 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>public java.util.List<? extends java.lang.Object> getContentChildren()
getContentChildren in interface IContentPart<javafx.scene.Node,javafx.scene.Group>getContentChildren 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.layout.StackPane getNestedContentStackPane()
StackPane that either displays nested content or an
icon indicating that nested content exists for this
NodeContentPart.StackPane that wraps nested content.protected javafx.scene.Node getNestedGraphIcon()
Node that is displayed in the
getNestedContentStackPane() when nested content is available,
but not rendered, currently.Node that is displayed in the
getNestedContentStackPane() when nested content is
available, but not rendered, currently.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 double getPadding()
protected void hideNestedGraphIcon()
getNestedGraphIcon() from the
getNestedContentStackPane() and sets the nested graph icon to null.protected boolean isNesting()
true if this NodeContentPart contains a
nested Graph, otherwise false.protected void refreshCssClass(javafx.scene.Group visual,
java.lang.String cssClass)
visual - The visual to which the CSS class is added.cssClass - The CSS class that is added to the visual.protected java.lang.String refreshFisheye(javafx.scene.Group visual,
java.util.Map<java.lang.String,java.lang.Object> attrs,
java.lang.String str)
visual - The visual of this NodeContentPart.attrs - The attributes map that stores the fisheye state of this
NodeContentPart.str - The label of this NodeContentPart.NodeContentPart.protected void refreshIcon(javafx.scene.Group visual,
java.lang.Object icon)
visual - The visual of this NodeContentPart.icon - The new icon for this NodeContentPart.protected void refreshLabel(javafx.scene.Group visual,
java.lang.String str)
NodeContentPart to the given value.visual - The visual of this NodeContentPart.str - The new label for this NodeContentPart.protected void refreshNestedGraphArea(javafx.scene.Group visual,
boolean isNesting)
visual - The visual of this part.isNesting - true if this node has a nested graph, otherwise
false.protected void refreshTooltip(javafx.scene.Group visual,
java.lang.Object tooltip)
NodeContentPart to the given value.visual - The visual of this NodeContentPart.tooltip - The new tooltip for this NodeContentPart.protected void removeChildVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> child, int index)
removeChildVisual in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>protected void resizeNestedGraphArea(double dw,
double dh)
dw - Delta width.dh - Delta height.protected void setNestedGraphIcon(javafx.scene.Node nestedGraphIcon)
nestedGraphIcon - The new nested graph icon.protected void showNestedGraphIcon()
getNestedContentStackPane().Copyright (c) 2014 itemis AG and others. All rights reserved.