Class VMDNodeAnchor

java.lang.Object
org.netbeans.api.visual.anchor.Anchor
org.netbeans.api.visual.vmd.VMDNodeAnchor
All Implemented Interfaces:
Widget.Dependency

public class VMDNodeAnchor extends Anchor
This class represents a node anchor used in VMD visualization style. The anchor could be assign by multiple connection widgets. For each usage the anchor resolves a different position. The positions are resolved at the top and the bottom of the widget where the anchor is attached to.
  • Constructor Details

    • VMDNodeAnchor

      public VMDNodeAnchor(Widget widget)
      Creates a node anchor with vertical direction.
      Parameters:
      widget - the node widget where the anchor is attached to
    • VMDNodeAnchor

      public VMDNodeAnchor(Widget widget, boolean vertical)
      Creates a node anchor.
      Parameters:
      widget - the node widget where the anchor is attached to
      vertical - if true, then anchors are placed vertically; if false, then anchors are placed horizontally
    • VMDNodeAnchor

      public VMDNodeAnchor(Widget widget, boolean vertical, VMDColorScheme scheme)
      Creates a node anchor.
      Parameters:
      widget - the node widget where the anchor is attached to
      vertical - if true, then anchors are placed vertically; if false, then anchors are placed horizontally
      scheme - color scheme
      Since:
      2.5
  • Method Details

    • notifyEntryAdded

      protected void notifyEntryAdded(Anchor.Entry entry)
      Notifies when an entry is registered
      Overrides:
      notifyEntryAdded in class Anchor
      Parameters:
      entry - the registered entry
    • notifyEntryRemoved

      protected void notifyEntryRemoved(Anchor.Entry entry)
      Notifies when an entry is unregistered
      Overrides:
      notifyEntryRemoved in class Anchor
      Parameters:
      entry - the unregistered entry
    • notifyRevalidate

      protected void notifyRevalidate()
      Notifies when the anchor is going to be revalidated.
      Overrides:
      notifyRevalidate in class Anchor
      Since:
      2.8
    • compute

      public Anchor.Result compute(Anchor.Entry entry)
      Computes a result (position and direction) for a specific entry.
      Specified by:
      compute in class Anchor
      Parameters:
      entry - the entry
      Returns:
      the calculated result