|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - type of component values, e.g. Resistance for resistors or String for transistors.public interface IDIYComponent<T>
Interface for component instance. Implementation classes of this interface will be instantiated
by the application when component is added to the canvas.
Implementing classes should meet the following:
ComponentDescriptor.EditableProperty.public static fields so they can be
set through config file.
| Field Summary | |
|---|---|
static int |
BOARD
|
static int |
CHASSIS
|
static int |
COMPONENT
|
static int |
TEXT
|
static int |
TRACE
|
| Method Summary | |
|---|---|
boolean |
canControlPointOverlap(int index)
|
IDIYComponent<T> |
clone()
Clones the component. |
void |
draw(java.awt.Graphics2D g2d,
ComponentState componentState,
boolean outlineMode,
Project project,
IDrawingObserver drawingObserver)
Draws the component onto the Graphics2D. |
void |
drawIcon(java.awt.Graphics2D g2d,
int width,
int height)
Draws icon representation of the component. |
boolean |
equalsTo(IDIYComponent<?> other)
Checks if two components are equal. |
java.awt.Point |
getControlPoint(int index)
|
int |
getControlPointCount()
|
VisibilityPolicy |
getControlPointVisibilityPolicy(int index)
|
java.lang.String |
getName()
|
T |
getValue()
|
java.lang.String |
getValueForDisplay()
|
boolean |
isControlPointSticky(int index)
|
void |
setControlPoint(java.awt.Point point,
int index)
Updates the control point at the specified index. |
void |
setName(java.lang.String name)
Updates component instance name. |
void |
setValue(T value)
Updates component value. |
| Field Detail |
|---|
static final int CHASSIS
static final int BOARD
static final int TRACE
static final int COMPONENT
static final int TEXT
| Method Detail |
|---|
java.lang.String getName()
void setName(java.lang.String name)
name - T getValue()
void setValue(T value)
value - int getControlPointCount()
java.awt.Point getControlPoint(int index)
index -
void setControlPoint(java.awt.Point point,
int index)
point - index - boolean isControlPointSticky(int index)
index -
boolean canControlPointOverlap(int index)
index -
VisibilityPolicy getControlPointVisibilityPolicy(int index)
void draw(java.awt.Graphics2D g2d,
ComponentState componentState,
boolean outlineMode,
Project project,
IDrawingObserver drawingObserver)
Graphics2D.
g2d - componentState - outlineMode - project - drawingObserver -
void drawIcon(java.awt.Graphics2D g2d,
int width,
int height)
g2d - width - height -
IDIYComponent<T> clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedExceptionjava.lang.String getValueForDisplay()
boolean equalsTo(IDIYComponent<?> other)
other -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||