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.
-
LARGE
- The largest scale allowed for this visual element.
-
MEDIUM
- A middle scale.
-
MEDLARGE
- A scale between medium and large.
-
MEDSMALL
- Scale between small and medium.
-
SMALL
- Smallest scale of visual elements.
-
getLocation()
-
-
getScale()
- Returns the scale of this visual element.
-
setLocation(int, int)
-
-
setScale(int)
- Sets the scale of this visual element.
SMALL
public static final int SMALL
- Smallest scale of visual elements.
MEDSMALL
public static final int MEDSMALL
- Scale between small and medium.
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.
MEDLARGE
public static final int MEDLARGE
- A scale between medium and large.
LARGE
public static final int LARGE
- The largest scale allowed for this visual element.
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.
getScale
public abstract int getScale()
- Returns the scale of this visual element.
- Returns:
- the scale of this visual element.
setLocation
public abstract void setLocation(int x,
int y)
getLocation
public abstract Point getLocation()
All Packages Class Hierarchy This Package Previous Next Index