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

## norsys.netica
Class VisualNode

    java.lang.Object
      |
      +--norsys.netica.VisualNode

public class VisualNode
extends java.lang.Object

An object representing the visual aspects of a Netica Node as it would be displayed in the Netica Application.

This class does not have a public constructor; use `Node.visual` to retrieve an instance for a node.

Since:
  2.12
Version:
  2.20 - May 7, 2002

Method Summary
`double[]` | `getPosition()` Retrieves as elements 0 and 1 respectively, the x,y coordinates of the center of this node, as it would appear in a visual display (e.g., in Netica Application).
`void` | `setPosition(double x, double y)` Moves this node so that its center is at coordinates (x, y), for any visual display (e.g., in Netica Application).

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

Method Detail

### getPosition

    public double[] getPosition()
                         throws NeticaException

  Retrieves as elements 0 and 1 respectively, the x,y coordinates of the center of this node, as it would appear in a visual display (e.g., in Netica Application).
  Version:
  Versions 2.07 and later have this method.
  In the C Version of the API, this function is called GetNodeVisPosition_bn.
  See Also:

  setPosition |  | Sets it
  `Node.visual` |  | Gets a VisualNode to work with

### setPosition

    public void setPosition(double x,
                            double y)
                     throws NeticaException

  Moves this node so that its center is at coordinates (x, y), for any visual display (e.g., in Netica Application).

  This is useful when directly programming Netica Application, or before writing a net to a file that will later be read by Netica Application.
  Parameters:

  double |  | x |  | desired horizontal pixel value
  double |  | y |  | desired vertical pixel value

  Version:
  Versions 2.07 and later have this method.
  In the C Version of the API, this function is called SetNodeVisPosition_bn.
  See Also:

  getPosition |  | Retrieves coordinates
  `Node.visual` |  | Gets a VisualNode to work with

  Example:

          // lower node by 20 pixels for display in Netica Application.
          double[] pos = node.getVisual().getPosition();
          node.getVisual().setPosition (pos[0], pos[1]+20);

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