org.diylc.components
Class AbstractCurvedComponent<T>
java.lang.Object
org.diylc.components.AbstractComponent<T>
org.diylc.components.AbstractTransparentComponent<T>
org.diylc.components.AbstractCurvedComponent<T>
- All Implemented Interfaces:
- java.io.Serializable, IDIYComponent<T>
public abstract class AbstractCurvedComponent<T>
- extends AbstractTransparentComponent<T>
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GUIDELINE_COLOR
public static java.awt.Color GUIDELINE_COLOR
DEFAULT_SIZE
public static Size DEFAULT_SIZE
AbstractCurvedComponent
public AbstractCurvedComponent()
drawIcon
public void drawIcon(java.awt.Graphics2D g2d,
int width,
int height)
- Description copied from interface:
IDIYComponent
- Draws icon representation of the component. This should not depend on component state, i.e. it
should be treated as a static method.
draw
public void draw(java.awt.Graphics2D g2d,
ComponentState componentState,
boolean outlineMode,
Project project,
IDrawingObserver drawingObserver)
- Description copied from interface:
IDIYComponent
- Draws the component onto the
Graphics2D.
getPointCount
public org.diylc.components.AbstractCurvedComponent.PointCount getPointCount()
setPointCount
public void setPointCount(org.diylc.components.AbstractCurvedComponent.PointCount pointCount)
getControlPointCount
public int getControlPointCount()
- Returns:
- number of control points for this component instance. May vary between two instances of
the same type, e.g. DIL IC with 8 and 16 pins will have 8 or 16 pins although they are
of the same type.
isControlPointSticky
public boolean isControlPointSticky(int index)
- Returns:
- true, if the specified control point may stick to control points of other components.
getControlPointVisibilityPolicy
public VisibilityPolicy getControlPointVisibilityPolicy(int index)
canControlPointOverlap
public boolean canControlPointOverlap(int index)
- Specified by:
canControlPointOverlap in interface IDIYComponent<T>- Overrides:
canControlPointOverlap in class AbstractComponent<T>
- Returns:
- true, if the specified control point may overlap with other control points of the
same component. The other control point must be able to overlap too.
getControlPoint
public java.awt.Point getControlPoint(int index)
- Returns:
- control point at the specified index.
setControlPoint
public void setControlPoint(java.awt.Point point,
int index)
- Description copied from interface:
IDIYComponent
- Updates the control point at the specified index.
getColor
public java.awt.Color getColor()
setColor
public void setColor(java.awt.Color color)