All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class electronics.ui.ElectronicGateFigure

java.lang.Object
   |
   +----java.awt.Component
           |
           +----electronics.ui.ElectronicGateFigure

public abstract class ElectronicGateFigure
extends Component
A graphical component that represents an electronic gate. This class is a super class for all concrete electronic gate figures.

Author:
Shmulik London

Constructor Index

 o ElectronicGateFigure(int)
Constructs an ElectronicGateFigure with a given number of input legs.

Method Index

 o getInputLocation(int)
Returns the location of the given input connection point of the gate in its container coordinate system.
 o getNumberOfInputs()
Returns the nubmer of input legs of the gate this figure represents.
 o getOutputLocation()
Returns the location of the output connection point of the gate in its container coordinate system.
 o getPreferredSize()
Returns the preferred size of this component.
 o paint(Graphics)
Paints the figure of the gate.

Constructors

 o ElectronicGateFigure
 protected ElectronicGateFigure(int numberOfInputs)
Constructs an ElectronicGateFigure with a given number of input legs.

Parameters:
numberOfInputs - The nubmer of input legs of this gate.

Methods

 o getNumberOfInputs
 public int getNumberOfInputs()
Returns the nubmer of input legs of the gate this figure represents.

 o paint
 public abstract void paint(Graphics g)
Paints the figure of the gate.

Overrides:
paint in class Component
 o getPreferredSize
 public abstract Dimension getPreferredSize()
Returns the preferred size of this component.

Overrides:
getPreferredSize in class Component
 o getInputLocation
 public Point getInputLocation(int i)
Returns the location of the given input connection point of the gate in its container coordinate system.

Parameters:
i - The index of the input point.
 o getOutputLocation
 public Point getOutputLocation()
Returns the location of the output connection point of the gate in its container coordinate system.


All Packages  Class Hierarchy  This Package  Previous  Next  Index