org.objectweb.fractal.explorer.graph
Class PortGraphics

java.lang.Object
  extended by org.objectweb.fractal.explorer.graph.PortGraphics
All Implemented Interfaces:
org.objectweb.util.explorer.swing.graph.PortGraphicsInterface

public class PortGraphics
extends Object
implements org.objectweb.util.explorer.swing.graph.PortGraphicsInterface

Version:
0.2

Field Summary
 
Fields inherited from interface org.objectweb.util.explorer.swing.graph.PortGraphicsInterface
COMPOSITE_CONTROLLER_PORT_WIDTH, CONTROLLER_PORT_WIDTH, CONTROLLER_PORT_Y, FIRST_PORT_Y, PORT_NAME_LENGHT, PORT_NAME_WIDTH
 
Constructor Summary
PortGraphics()
           
 
Method Summary
 void drawPort(Graphics g, String portName, String portType, boolean isInternal)
           
 Dimension getPortSize(String portType, boolean isInternal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortGraphics

public PortGraphics()
Method Detail

getPortSize

public Dimension getPortSize(String portType,
                             boolean isInternal)
Specified by:
getPortSize in interface org.objectweb.util.explorer.swing.graph.PortGraphicsInterface
Parameters:
portType - the type of the port
Returns:
Dimension the size of the port. The center right must be the server port location. The center left must be the client port location. The center up must be the controler port location.

drawPort

public void drawPort(Graphics g,
                     String portName,
                     String portType,
                     boolean isInternal)
Specified by:
drawPort in interface org.objectweb.util.explorer.swing.graph.PortGraphicsInterface
Parameters:
g - the Graphics where the port have to be paint.
portType - the type of the port.