Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kieker.webgui.service.impl.utility.model
Class Node

    java.lang.Object
      kieker.webgui.service.impl.utility.model.Node

    public class Node

extends Object

Objects of this class represent nodes within a `Graph`, that may or may not have any number of `Port`s. These `Port`s are divided into input `Port`s, positioned to the left of the node; repository `Port`s, positioned to the right of the node; and output ports that are positioned below repository `Port`s. Any of these `Port`s are optional. If the `Node` has no `Port`s, KIELER will generate it's own `Port`s, where it sees fit.

Author:
  Robin Weiss, Florian Fittkau

Constructor Summary
`Node(Graph graph, String id, int width, int height, boolean hasPorts)` Class constructor.

Method Summary
`void` | `addInputPorts(Graph graph, int portStartY, int portCount)` Creates a set of input `Port`s to the node.
`void` | `addOutputPorts(Graph graph, int portStartY, int portCount)` Creates a set of output `Port`s to the node.
`void` | `addRepositoryPorts(Graph graph, int portStartY, int portCount)` Creates a set of repository `Port`s to the node.
`int` | `getHeight()`
`String` | `getId()`
`List<Port>` | `getInputPorts()`
`de.cau.cs.kieler.core.kgraph.KNode` | `getKielerNode()`
`List<Port>` | `getOutputPorts()`
`Port` | `getPort(int portIndex)` Looks for a port with the specified index.
`Point` | `getPosition()`
`List<Port>` | `getRepoPorts()`
`int` | `getWidth()`
`boolean` | `isNodeFamily()`
`void` | `setDimensions(int w, int h)` Resizes the `Node`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Node

    public Node(Graph graph,
                String id,
                int width,
                int height,
                boolean hasPorts)

  Class constructor. Creates a `Node` and assigns a generated `KNode` to the graph.

  Parameters:
    `graph` - the graph that contains the node
    `id` - a unique string representing the node
    `width` - the width of the node
    `height` - the height of the node
    `hasPorts` - true if at least one port exists

Method Detail

### addInputPorts

    public void addInputPorts(Graph graph,
                              int portStartY,
                              int portCount)

  Creates a set of input `Port`s to the node.

  Parameters:
    `graph` - the graph that contains the node
    `portStartY` - the y-coordinate of the first `Port`, relative to the top border of the `Node`
    `portCount` - the number of ports that are added

### addRepositoryPorts

    public void addRepositoryPorts(Graph graph,
                                   int portStartY,
                                   int portCount)

  Creates a set of repository `Port`s to the node.

  Parameters:
    `graph` - the graph that contains the node
    `portStartY` - the y-coordinate of the first `Port`, relative to the top border of the `Node`
    `portCount` - the number of ports that are added

### addOutputPorts

    public void addOutputPorts(Graph graph,
                               int portStartY,
                               int portCount)

  Creates a set of output `Port`s to the node.

  Parameters:
    `graph` - the graph that contains the node
    `portStartY` - the y-coordinate of the first `Port`, relative to the top border of the `Node`
    `portCount` - the number of ports that are added

### getPort

    public Port getPort(int portIndex)

  Looks for a port with the specified index. Port indices should start at 0 for the first input `Port`, progress through input `Port`s, then repository `Port`s and finally through output`Port`s.

  Parameters:
    `portIndex` - the index of the `Port`
  Returns:
    the `Port` with the specified index if it exists or null if it does not

### getKielerNode

    public de.cau.cs.kieler.core.kgraph.KNode getKielerNode()

### getId

    public String getId()

### isNodeFamily

    public boolean isNodeFamily()

### getInputPorts

    public List<Port> getInputPorts()

### getRepoPorts

    public List<Port> getRepoPorts()

### getOutputPorts

    public List<Port> getOutputPorts()

### getPosition

    public Point getPosition()

### setDimensions

    public void setDimensions(int w,
                              int h)

  Resizes the `Node`.

  Parameters:
    `w` - the new width of the `Node`
    `h` - the new height of the `Node`

### getWidth

    public int getWidth()

  Returns:
    the width of the `Node`

### getHeight

    public int getHeight()

  Returns:
    the height of the node

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All rights reserved.