byucc.jhdl.apps.Viewers.Schematic
Class SchematicNode

java.lang.Object
  extended bybyucc.jhdl.apps.Viewers.Schematic.SchematicNode
All Implemented Interfaces:
Browser
Direct Known Subclasses:
AddNode, AddSubNode, AndNode, BufNode, ConstNode, GenericNode, GNDNode, IncNode, InNode, InOutNode, InvNode, MuxNode, OrNode, OutNode, RegNode, ShiftNode, UDNImplementation, VCCNode, XorNode

public abstract class SchematicNode
extends java.lang.Object
implements Browser

An abstract class for a schematic node that can be rendered onto the Schematic canvas.


Field Summary
 java.awt.Color NodeColor
          The color used to render the node when selected.
 java.lang.String NodeColorString
          The color used to render the node.
 int numBubbleInputs
           
 int numInPorts
           
 int numOutPorts
           
protected  SchematicCanvas parent
          The parent SchematicCanvas to which this SchematicNode belongs.
protected  Cell schematicCell
          The jhdl Cell associated with this Node.
 boolean selected
          Indicates that the Cell is selected.
 java.awt.Color SelectedColor
          The color used to render the node when selected.
 boolean transferred
           
protected  int xSize
          The width of the Node
protected  int ySize
          The height of the Node
 
Constructor Summary
SchematicNode(Cell p, SchematicCanvas parent)
          Default Constructor.
 
Method Summary
 void AddMessage(java.lang.String message)
           
 void addPortConnection(java.lang.String port, java.lang.String cName, java.lang.String pName, int index)
           
 void changeName(java.lang.String n)
           
 boolean containedWithin(int x1, int y1, int x2, int y2)
           
 boolean containsXY(int x, int y)
           
 int getBubbleValue()
           
 int getBubbleValue(java.lang.String pName)
           
 Cell getCell()
           
 int getColumn()
           
 java.lang.String[] getInPorts()
           
abstract  int[] getLocation(java.lang.String pName)
           
 int getMaxInPortWidth()
           
 int getMaxOutPortWidth()
           
static SchematicNode getNode(Cell p, SchematicCanvas parent)
           
static SchematicNode getNode(Cell p, java.lang.String portName, SchematicCanvas parent)
           
 java.lang.String getNodeName()
           
 java.lang.String getNodeNameInfo()
           
 java.lang.String[] getOutPorts()
           
 int getPColumn()
           
 java.lang.String[] getPortConnectionPorts(int portNum)
           
 java.lang.String[] getPortConnectionPorts(java.lang.String pName)
           
 java.lang.String[] getPortConnections(int portNum)
           
 java.lang.String[] getPortConnections(java.lang.String pName)
           
 int getPRow()
           
 int getRow()
           
 int getXSize()
           
 int getYSize()
           
 boolean isInPort(java.lang.String pName)
           
 boolean isOutPort(java.lang.String pName)
           
 boolean isPlaced()
           
abstract  void paint(java.awt.Graphics g)
           
 void setBubbleValue(int v)
           
 void setPlaced(boolean p)
           
 boolean toggleSelection()
           
 java.lang.String toString()
           
 void updateColors()
           
 void updateWires()
           
 void writeColumn(int c)
           
 void writePColumn(int c)
           
 void writePRow(int r)
           
 void writeRow(int r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

protected SchematicCanvas parent
The parent SchematicCanvas to which this SchematicNode belongs.


NodeColorString

public java.lang.String NodeColorString
The color used to render the node.


NodeColor

public java.awt.Color NodeColor
The color used to render the node when selected.


SelectedColor

public java.awt.Color SelectedColor
The color used to render the node when selected.


xSize

protected int xSize
The width of the Node


ySize

protected int ySize
The height of the Node


schematicCell

protected Cell schematicCell
The jhdl Cell associated with this Node.


selected

public boolean selected
Indicates that the Cell is selected.


numBubbleInputs

public int numBubbleInputs

numOutPorts

public int numOutPorts

numInPorts

public int numInPorts

transferred

public boolean transferred
Constructor Detail

SchematicNode

public SchematicNode(Cell p,
                     SchematicCanvas parent)
Default Constructor. Assigns default values to Node properties.

Method Detail

getMaxInPortWidth

public int getMaxInPortWidth()

getMaxOutPortWidth

public int getMaxOutPortWidth()

toString

public java.lang.String toString()

updateWires

public void updateWires()

containsXY

public boolean containsXY(int x,
                          int y)

containedWithin

public boolean containedWithin(int x1,
                               int y1,
                               int x2,
                               int y2)

toggleSelection

public boolean toggleSelection()

isInPort

public boolean isInPort(java.lang.String pName)

isOutPort

public boolean isOutPort(java.lang.String pName)

addPortConnection

public void addPortConnection(java.lang.String port,
                              java.lang.String cName,
                              java.lang.String pName,
                              int index)

getPortConnections

public java.lang.String[] getPortConnections(java.lang.String pName)

getPortConnectionPorts

public java.lang.String[] getPortConnectionPorts(java.lang.String pName)

getPortConnections

public java.lang.String[] getPortConnections(int portNum)

getPortConnectionPorts

public java.lang.String[] getPortConnectionPorts(int portNum)

getLocation

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

paint

public abstract void paint(java.awt.Graphics g)

getBubbleValue

public int getBubbleValue()

getBubbleValue

public int getBubbleValue(java.lang.String pName)

setBubbleValue

public void setBubbleValue(int v)

getXSize

public int getXSize()

getYSize

public int getYSize()

isPlaced

public boolean isPlaced()

setPlaced

public void setPlaced(boolean p)

getInPorts

public java.lang.String[] getInPorts()

getOutPorts

public java.lang.String[] getOutPorts()

getNodeName

public java.lang.String getNodeName()

getNodeNameInfo

public java.lang.String getNodeNameInfo()

AddMessage

public void AddMessage(java.lang.String message)

changeName

public void changeName(java.lang.String n)

writeRow

public void writeRow(int r)

writeColumn

public void writeColumn(int c)

writePRow

public void writePRow(int r)

writePColumn

public void writePColumn(int c)

getPRow

public int getPRow()

getPColumn

public int getPColumn()

getRow

public int getRow()

getColumn

public int getColumn()

getCell

public Cell getCell()

getNode

public static SchematicNode getNode(Cell p,
                                    SchematicCanvas parent)

getNode

public static SchematicNode getNode(Cell p,
                                    java.lang.String portName,
                                    SchematicCanvas parent)

updateColors

public void updateColors()


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