Class NodePart

All Implemented Interfaces:
IActivatable, IAdaptable, IAdaptable.Bound<IViewer>, IDisposable, IContentPart<javafx.scene.Group>, IResizableContentPart<javafx.scene.Group>, ITransformableContentPart<javafx.scene.Group>, IVisualPart<javafx.scene.Group>

public class NodePart extends AbstractContentPart<javafx.scene.Group> implements ITransformableContentPart<javafx.scene.Group>, IResizableContentPart<javafx.scene.Group>
The NodePart is the controller for a Node content object.
  • Field Details

    • DEFAULT_SHAPE_PADDING

      protected static final double DEFAULT_SHAPE_PADDING
      The default padding between the node's border and its content.
      See Also:
    • ZOOMLEVEL_SHOW_NESTED_GRAPH

      protected static final double ZOOMLEVEL_SHOW_NESTED_GRAPH
      The zoom level that needs to be reached for the doGetContentChildren() method to return a nested Graph.
      See Also:
    • DEFAULT_CHILDREN_PANE_WIDTH

      protected static final double DEFAULT_CHILDREN_PANE_WIDTH
      The default width of the nested graph area.
      See Also:
    • DEFAULT_CHILDREN_PANE_HEIGHT

      protected static final double DEFAULT_CHILDREN_PANE_HEIGHT
      The default height of the nested graph area.
      See Also:
    • DEFAULT_NESTED_CHILDREN_ZOOM_FACTOR

      public static final double DEFAULT_NESTED_CHILDREN_ZOOM_FACTOR
      The default zoom factor that is applied to the nested graph area.
      See Also:
    • DEFAULT_OUTER_LAYOUT_CONTAINER_WIDTH_NESTING

      public static final 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.
      See Also:
    • DEFAULT_OUTER_LAYOUT_CONTAINER_HEIGHT_NESTING

      public static final 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.
      See Also:
    • CSS_CLASS

      public static final String CSS_CLASS
      The CSS class that is applied to the visual of this NodePart.
      See Also:
    • CSS_CLASS_SHAPE

      public static final String CSS_CLASS_SHAPE
      The CSS class that is applied to the Rectangle that displays border and background.
      See Also:
    • CSS_CLASS_LABEL

      public static final String CSS_CLASS_LABEL
      The CSS class that is applied to the Text that displays the label.
      See Also:
    • CSS_CLASS_ICON

      public static final String CSS_CLASS_ICON
      The CSS class that is applied to the Image that displays the icon.
      See Also:
  • Constructor Details

    • NodePart

      public NodePart()
  • Method Details

    • doActivate

      protected void doActivate()
      Overrides:
      doActivate in class AbstractVisualPart<javafx.scene.Group>
    • doAddChildVisual

      protected void doAddChildVisual(IVisualPart<? extends javafx.scene.Node> child, int index)
      Overrides:
      doAddChildVisual in class AbstractVisualPart<javafx.scene.Group>
    • doCreateVisual

      protected javafx.scene.Group doCreateVisual()
      Specified by:
      doCreateVisual in class AbstractVisualPart<javafx.scene.Group>
    • doDeactivate

      protected void doDeactivate()
      Overrides:
      doDeactivate in class AbstractVisualPart<javafx.scene.Group>
    • doGetContentAnchorages

      protected SetMultimap<? extends Object,String> doGetContentAnchorages()
      Specified by:
      doGetContentAnchorages in class AbstractContentPart<javafx.scene.Group>
    • doGetContentChildren

      protected List<? extends Object> doGetContentChildren()
      Specified by:
      doGetContentChildren in class AbstractContentPart<javafx.scene.Group>
    • doRefreshVisual

      protected void doRefreshVisual(javafx.scene.Group visual)
      Specified by:
      doRefreshVisual in class AbstractVisualPart<javafx.scene.Group>
    • doRemoveChildVisual

      protected void doRemoveChildVisual(IVisualPart<? extends javafx.scene.Node> child, int index)
      Overrides:
      doRemoveChildVisual in class AbstractVisualPart<javafx.scene.Group>
    • getContent

      public Node getContent()
      Specified by:
      getContent in interface IContentPart<javafx.scene.Group>
      Overrides:
      getContent in class AbstractContentPart<javafx.scene.Group>
    • getContentSize

      public Dimension getContentSize()
      Specified by:
      getContentSize in interface IResizableContentPart<javafx.scene.Group>
    • getContentTransform

      public javafx.scene.transform.Affine getContentTransform()
      Specified by:
      getContentTransform in interface ITransformableContentPart<javafx.scene.Group>
    • getIconImageView

      protected javafx.scene.image.ImageView getIconImageView()
      Returns the ImageView that displays the node's icon.
      Returns:
      The ImageView that displays the node's icon.
    • getLabelText

      protected javafx.scene.text.Text getLabelText()
      Returns the Text that displays the node's label.
      Returns:
      The Text that displays the node's label.
    • getShape

      public javafx.scene.Node getShape()
      Returns the Shape that displays the node's border and background.
      Returns:
      The Shape that displays the node's border and background.
    • refreshIcon

      protected void refreshIcon()
      If the given icon is an Image, that Image will be used as the icon of this NodePart.
    • refreshLabel

      protected void refreshLabel()
      Changes the label of this NodePart to the given value.
    • refreshTooltip

      protected void refreshTooltip()
      Changes the tooltip of this NodePart to the given value.
    • setContentSize

      public void setContentSize(Dimension size)
      Specified by:
      setContentSize in interface IResizableContentPart<javafx.scene.Group>
    • setContentTransform

      public void setContentTransform(javafx.scene.transform.Affine totalTransform)
      Specified by:
      setContentTransform in interface ITransformableContentPart<javafx.scene.Group>