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
-
ElectronicGateFigure(int)
- Constructs an ElectronicGateFigure with a given number of input legs.
-
getInputLocation(int)
- Returns the location of the given input connection point of the gate
in its container coordinate system.
-
getNumberOfInputs()
- Returns the nubmer of input legs of the gate this figure represents.
-
getOutputLocation()
- Returns the location of the output connection point of the gate
in its container coordinate system.
-
getPreferredSize()
- Returns the preferred size of this component.
-
paint(Graphics)
- Paints the figure of the gate.
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.
getNumberOfInputs
public int getNumberOfInputs()
- Returns the nubmer of input legs of the gate this figure represents.
paint
public abstract void paint(Graphics g)
- Paints the figure of the gate.
- Overrides:
- paint in class Component
getPreferredSize
public abstract Dimension getPreferredSize()
- Returns the preferred size of this component.
- Overrides:
- getPreferredSize in class Component
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.
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