fdda.graphics.java2d
Class Java2dFactory

java.lang.Object
  |
  +--fdda.graphics.ComponentFactory
        |
        +--fdda.graphics.java2d.Java2dFactory

public class Java2dFactory
extends ComponentFactory

Implementation of the ComponentFactory for the Java2D graphics.

Author:
Jörg Rüdenauer

Constructor Summary
Java2dFactory()
          Constructor
 
Method Summary
 Container createContainer()
          Creates a new container.
 GraphicalSystem createGraphicalSystem()
          Creates a new graphical system.
 Line createLine(Node startNode, Node endNode, boolean selected, boolean directed)
          Creates a new line
 Line createLooseLine(Node startNode, boolean directed)
          Creates a line without an end node.
 Message createMessage(Line line, boolean forward)
          Creates a new message.
 Node createNode(double x, double y, boolean selected)
          Creates a new node.
 Selection getComponentSelection()
          Creates a new selection.
 
Methods inherited from class fdda.graphics.ComponentFactory
getInstance, setFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Java2dFactory

public Java2dFactory()
Constructor

Method Detail

createNode

public Node createNode(double x,
                       double y,
                       boolean selected)
Description copied from class: ComponentFactory
Creates a new node.

Specified by:
createNode in class ComponentFactory
Parameters:
x - the x coordinate of the center point of the node
y - the y coordinate of the center point of the node
selected - whether the node shall be selected
Returns:
the newly created Node

createLine

public Line createLine(Node startNode,
                       Node endNode,
                       boolean selected,
                       boolean directed)
Description copied from class: ComponentFactory
Creates a new line

Specified by:
createLine in class ComponentFactory
Parameters:
startNode - the start node for the line
endNode - the end node for the line
selected - whether the line shall be selected
directed - whether the line shall be directed
Returns:
the newly created Line

createLooseLine

public Line createLooseLine(Node startNode,
                            boolean directed)
Creates a line without an end node. This is used while drawing the line (it must exist without a connection while the user draws it from one node to the other).

Parameters:
startNode - the start node
directed - whether the line shall be directed
Returns:
the newly created line

createContainer

public Container createContainer()
Description copied from class: ComponentFactory
Creates a new container.

Specified by:
createContainer in class ComponentFactory
Returns:
the newly created Container

createMessage

public Message createMessage(Line line,
                             boolean forward)
Description copied from class: ComponentFactory
Creates a new message.

Specified by:
createMessage in class ComponentFactory
Parameters:
line - the line which transports the message
forward - whether the message runs in the designated direction of the line
Returns:
the newly created message

getComponentSelection

public Selection getComponentSelection()
Description copied from class: ComponentFactory
Creates a new selection. Note that this needs not be used often.

Specified by:
getComponentSelection in class ComponentFactory
Returns:
the newly created Selection

createGraphicalSystem

public GraphicalSystem createGraphicalSystem()
Description copied from class: ComponentFactory
Creates a new graphical system.

Specified by:
createGraphicalSystem in class ComponentFactory
Returns:
the newly created GraphicalSystem


API documentation for FDDA version 0.9. Generated on 17/02/2004 14:12.