All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface crw.circuit.VisualElement

public interface VisualElement
This interface needs to be implemented by the simple visual element classes such as DiodeSymbol, TransistorSymbol, BatterySymbol, ButtonPair, etc, which will be put together in the same drawing area to build such things as circuit didagram, etc. This interface is to control the scales of the disparate visual element for a consistent appearance.

Version:
1.0 2-17-1998.

Variable Index

 o LARGE
The largest scale allowed for this visual element.
 o MEDIUM
A middle scale.
 o MEDLARGE
A scale between medium and large.
 o MEDSMALL
Scale between small and medium.
 o SMALL
Smallest scale of visual elements.

Method Index

 o getLocation()
 o getScale()
Returns the scale of this visual element.
 o setLocation(int, int)
 o setScale(int)
Sets the scale of this visual element.

Variables

 o SMALL
 public static final int SMALL
Smallest scale of visual elements.

 o MEDSMALL
 public static final int MEDSMALL
Scale between small and medium.

 o MEDIUM
 public static final int MEDIUM
A middle scale. This should be made the default scale if no scale info is given or if the scale info is out of range.

 o MEDLARGE
 public static final int MEDLARGE
A scale between medium and large.

 o LARGE
 public static final int LARGE
The largest scale allowed for this visual element.

Methods

 o setScale
 public abstract void setScale(int scale)
Sets the scale of this visual element. The scale parameter should be 0 thru 4. If out of range, it the class should set the scale to the MEDIUM scale.

Parameters:
scale - the new scale.
 o getScale
 public abstract int getScale()
Returns the scale of this visual element.

Returns:
the scale of this visual element.
 o setLocation
 public abstract void setLocation(int x,
                                  int y)
 o getLocation
 public abstract Point getLocation()

All Packages  Class Hierarchy  This Package  Previous  Next  Index