Class HidingModel

java.lang.Object
org.eclipse.gef.zest.fx.models.HidingModel

public class HidingModel extends Object
The HidingModel manages a Set of currently hidden Nodes. The hidden neighbors of a Node can be identified using getHiddenNeighbors(org.eclipse.gef.graph.Node).
  • Property Details

    • hidden

      public javafx.beans.property.ReadOnlySetProperty<Node> hiddenProperty
      Returns a read-only property containing the hidden nodes.
  • Field Details

    • HIDDEN_PROPERTY

      public static final String HIDDEN_PROPERTY
      Property name that is used when firing property change notifications when the Set of hidden Nodes changes.
      See Also:
  • Constructor Details

    • HidingModel

      public HidingModel()
  • Method Details

    • getHiddenNeighborParts

      public Set<NodePart> getHiddenNeighborParts(NodePart nodePart)
      Returns a Set containing all NodeParts corresponding to the hidden neighbors of the content of the given NodePart.
      Parameters:
      nodePart - The NodePart of which the hidden neighbors are returned.
      Returns:
      A Set containing all hidden neighbors of the given NodePart.
    • getHiddenNeighbors

      public Set<Node> getHiddenNeighbors(Node node)
      Returns a Set containing all hidden neighbors of the given Node.
      Parameters:
      node - The Node of which the hidden neighbors are returned.
      Returns:
      A Set containing all hidden neighbors of the given Node.
    • getHiddenNodesUnmodifiable

      public Set<Node> getHiddenNodesUnmodifiable()
      Returns a copy of the Set that contains all hidden Nodes.
      Returns:
      A copy of the Set that contains all hidden Nodes.
    • hasHiddenNeighbors

      public boolean hasHiddenNeighbors(NodePart nodePart)
      Returns true if at least one neighbor of the given NodePart is currently hidden. Otherwise returns false.
      Parameters:
      nodePart - The NodePart that is tested for hidden neighbors.
      Returns:
      true if at least one neighbor of the given NodePart is currently hidden, otherwise false.
    • hasHiddenNeighbors

      public boolean hasHiddenNeighbors(Node node)
      Returns true if at least one neighbor of the given Node is currently hidden. Otherwise returns false.
      Parameters:
      node - The Node that is tested for hidden neighbors.
      Returns:
      true if at least one neighbor of the given Node is currently hidden, otherwise false.
    • hiddenProperty

      public javafx.beans.property.ReadOnlySetProperty<Node> hiddenProperty()
      Returns a read-only property containing the hidden nodes.
    • hide

      public void hide(NodePart nodePart)
      Adds the content of the given NodePart to the Set of hidden Nodes. Notifies all property change listeners about this change.
      Parameters:
      nodePart - The NodePart that is added to the Set of hidden Nodes.
    • hide

      public void hide(Node node)
      Adds the given Node to the Set of hidden Nodes. Notifies all property change listeners about this change.
      Parameters:
      node - The Node that is added to the Set of hidden Nodes.
    • isHidden

      public boolean isHidden(NodePart nodePart)
      Returns true if the given NodePart is currently contained within the Set of hidden Nodes. Otherwise, returns false.
      Parameters:
      nodePart - The NodePart in question.
      Returns:
      true if the given Node is currently contained within the Set of hidden Nodes, otherwise false.
    • isHidden

      public boolean isHidden(Node node)
      Returns true if the given Node is currently contained within the Set of hidden Nodes. Otherwise, returns false.
      Parameters:
      node - The Node in question.
      Returns:
      true if the content of the given NodePart is currently contained within the Set of hidden Nodes, otherwise false.
    • show

      public void show(NodePart nodePart)
      Remove the content of the given NodePart from the Set of hidden Node s. Notifies all property change listeners about this change.
      Parameters:
      nodePart - The NodePart of which the content is removed from the Set of hidden Node s.
    • show

      public void show(Node node)
      Remove the given Node from the Set of hidden Node s. Notifies all property change listeners about this change.
      Parameters:
      node - The Node that is removed from the Set of hidden Node s.