byucc.jhdl.apps.Viewers.Schematic
Interface UserDefinedNode

All Known Implementing Classes:
UDNImplementation

public interface UserDefinedNode

This interface is implemented by UDNImplementation. It may also be implemented by other classes. This interface provides a set of tools which implementations of the UserDefinedSchematic interface may use to draw schematic nodes on a SchematicCanvas. The methods in this interface offer a subset of features provided by an instance of java.awt.Graphics for drawing arbitrary images.

This functionality exists in the form of an interface to eliminate the requirement for the full set of Schematic classes when creating a set of classes that does not necessarily require the Schematic visualization tools provided in this package. The set of classes only needs to include this interface, the UserDefinedSchematic interface, and the PreDefinedSchematic interface.


Field Summary
static int JUSTIFY_CENTER
           
static int JUSTIFY_LEFT
           
static int JUSTIFY_RIGHT
           
 
Method Summary
 void addInPort(int x, int y, java.lang.String name)
           
 void addOutPort(int x, int y, java.lang.String name)
           
 int cellNameWidth()
           
 int cellNameWidth(java.awt.Font font)
           
 void drawArc(int x, int y, int width, int height, int startAngle, int rotateAngle)
           
 void drawCellName(int x, int y, int justify)
           
 void drawLine(int x1, int y1, int x2, int y2)
           
 void drawPolygon(int[] x, int[] y, int size)
           
 void drawPolyline(int[] x, int[] y, int size)
           
 void drawRect(int x, int y, int width, int height)
           
 void drawString(java.lang.String text, int x, int y)
           
 void drawString(java.lang.String text, int x, int y, int justify)
           
 boolean extraPorts()
           
 void fillRect(int x, int y, int width, int height)
           
 java.awt.Font getFont()
           
 int getFontHeight()
           
 int getFontHeight(java.awt.Font font)
           
 int[] getLocation(java.lang.String pName)
           
 void resetFont()
           
 void setColor(java.awt.Color color)
           
 void setFont(java.lang.String fontName, int size)
           
 void setPortSeperation(int amount)
           
 void setSize(int width, int height)
           
 int stringWidth(java.lang.String text)
           
 int stringWidth(java.lang.String text, java.awt.Font font)
           
 

Field Detail

JUSTIFY_LEFT

public static final int JUSTIFY_LEFT
See Also:
Constant Field Values

JUSTIFY_CENTER

public static final int JUSTIFY_CENTER
See Also:
Constant Field Values

JUSTIFY_RIGHT

public static final int JUSTIFY_RIGHT
See Also:
Constant Field Values
Method Detail

extraPorts

public boolean extraPorts()

getLocation

public int[] getLocation(java.lang.String pName)

drawPolyline

public void drawPolyline(int[] x,
                         int[] y,
                         int size)

drawPolygon

public void drawPolygon(int[] x,
                        int[] y,
                        int size)

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int rotateAngle)

drawString

public void drawString(java.lang.String text,
                       int x,
                       int y)

drawString

public void drawString(java.lang.String text,
                       int x,
                       int y,
                       int justify)

stringWidth

public int stringWidth(java.lang.String text)

getFontHeight

public int getFontHeight()

stringWidth

public int stringWidth(java.lang.String text,
                       java.awt.Font font)

getFontHeight

public int getFontHeight(java.awt.Font font)

setColor

public void setColor(java.awt.Color color)

setFont

public void setFont(java.lang.String fontName,
                    int size)

getFont

public java.awt.Font getFont()

resetFont

public void resetFont()

setSize

public void setSize(int width,
                    int height)

addInPort

public void addInPort(int x,
                      int y,
                      java.lang.String name)

addOutPort

public void addOutPort(int x,
                       int y,
                       java.lang.String name)

setPortSeperation

public void setPortSeperation(int amount)

drawCellName

public void drawCellName(int x,
                         int y,
                         int justify)

cellNameWidth

public int cellNameWidth()

cellNameWidth

public int cellNameWidth(java.awt.Font font)


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.