algoanim.primitives.vhdl
Class VHDLElement

java.lang.Object
  extended by algoanim.primitives.Primitive
      extended by algoanim.primitives.vhdl.VHDLElement
Direct Known Subclasses:
AndGate, Demultiplexer, DFlipflop, JKFlipflop, Multiplexer, NAndGate, NorGate, NotGate, OrGate, RSFlipflop, TFlipflop, XNorGate, XOrGate

public abstract class VHDLElement
extends Primitive


Field Summary
protected  VHDLElementGenerator generator
           
protected  int height
           
protected  java.util.List<VHDLPin> pins
           
protected  VHDLElementProperties properties
           
protected  Node upperLeft
           
protected  int width
           
 
Fields inherited from class algoanim.primitives.Primitive
gen
 
Constructor Summary
VHDLElement(VHDLElementGenerator sg, Node upperLeftCorner, int theWidth, int theHeight, java.lang.String name, java.util.List<VHDLPin> definedPins, DisplayOptions display, VHDLElementProperties sp)
          Instantiates the Square and calls the create() method of the associated SquareGenerator.
 
Method Summary
 int getHeight()
          Returns the height of this AND gate.
 java.util.List<VHDLPin> getPins()
           
 VHDLElementProperties getProperties()
          Returns the properties of this AND gate.
 Node getUpperLeft()
          Returns the upper left corner of this AND gate.
 int getWidth()
          Returns the width of this AND gate.
 void setName(java.lang.String newName)
          Sets the name of this Primitive.
 
Methods inherited from class algoanim.primitives.Primitive
changeColor, exchange, getDisplayOptions, getName, hide, hide, moveBy, moveTo, moveVia, rotate, rotate, show, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

generator

protected VHDLElementGenerator generator

height

protected int height

pins

protected java.util.List<VHDLPin> pins

properties

protected VHDLElementProperties properties

width

protected int width

upperLeft

protected Node upperLeft
Constructor Detail

VHDLElement

public VHDLElement(VHDLElementGenerator sg,
                   Node upperLeftCorner,
                   int theWidth,
                   int theHeight,
                   java.lang.String name,
                   java.util.List<VHDLPin> definedPins,
                   DisplayOptions display,
                   VHDLElementProperties sp)
            throws java.lang.IllegalArgumentException
Instantiates the Square and calls the create() method of the associated SquareGenerator.

Parameters:
sg - the appropriate code Generator.
upperLeftCorner - the upper left corner of this Square.
theWidth - the width of this Square.
name - the name of this Square.
display - [optional] the DisplayOptions of this Square.
sp - [optional] the properties of this Square.
Throws:
java.lang.IllegalArgumentException
Method Detail

getHeight

public int getHeight()
Returns the height of this AND gate.

Returns:
the height of this AND gate.

getProperties

public VHDLElementProperties getProperties()
Returns the properties of this AND gate.

Returns:
the properties of this AND gate.

getUpperLeft

public Node getUpperLeft()
Returns the upper left corner of this AND gate.

Returns:
the upper left corner of this AND gate.

getWidth

public int getWidth()
Returns the width of this AND gate.

Returns:
the width of this AND gate.

setName

public void setName(java.lang.String newName)
Description copied from class: Primitive
Sets the name of this Primitive.

Overrides:
setName in class Primitive
Parameters:
newName - the new name for this Primitive.
See Also:
Primitive.setName(java.lang.String)

getPins

public java.util.List<VHDLPin> getPins()