|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectTGT.TGT_Sprite
TGT.TGT_DrawableSprite
TGT.TGT_BasicConnectorSprite
Sprite that acts as a connector between two TGT_NodeSprite derived sprites.
| Field Summary | |
protected TGT_ConnectionPoint[] |
endpoint
|
| Fields inherited from class TGT.TGT_DrawableSprite |
height, primary, secondary, width |
| Fields inherited from class TGT.TGT_Sprite |
name, priority, rate, visible, x, y |
| Constructor Summary | |
TGT_BasicConnectorSprite()
|
|
TGT_BasicConnectorSprite(java.lang.String nm,
int pri,
int rt,
boolean vis,
int x,
int y,
int wide,
java.awt.Color first,
java.awt.Color second,
int ep1x,
int ep1y,
int ep2x,
int ep2y)
Creates a BasicConnectorSprite with specific parameters |
|
TGT_BasicConnectorSprite(java.lang.String nm,
java.util.StringTokenizer st)
|
|
| Method Summary | |
protected int |
computeDecoratorOrientation(int endptidx)
|
void |
draw(java.awt.Graphics g,
java.awt.image.ImageObserver o)
Draw this sprite's appearance. |
TGT_ConnectionPoint |
getEndpoint(int which)
Returns one of the endpoints for this TGT_ConnectionPoint. |
boolean |
isHorizontal()
Is this connector horizontal? |
boolean |
isVertical()
Is this connector vertical? |
void |
setEndpoint(TGT_ConnectionPoint ep,
int which)
Change one of the endpoints of this connector. |
| Methods inherited from class TGT.TGT_DrawableSprite |
colorDecoder, getHeight, getPrimaryColor, getSecondaryColor, getWidth, setColors, setHeight, setPrimaryColor, setSecondaryColor, setSize, setWidth |
| Methods inherited from class TGT.TGT_Sprite |
getLocation, getName, getPriority, getRate, getVisible, setLocation, setName, setPriority, setRate, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected TGT_ConnectionPoint[] endpoint
| Constructor Detail |
public TGT_BasicConnectorSprite()
public TGT_BasicConnectorSprite(java.lang.String nm,
java.util.StringTokenizer st)
public TGT_BasicConnectorSprite(java.lang.String nm,
int pri,
int rt,
boolean vis,
int x,
int y,
int wide,
java.awt.Color first,
java.awt.Color second,
int ep1x,
int ep1y,
int ep2x,
int ep2y)
nm - The name of this sprite.pri - Drawing priority of this sprite. Higher numbers are
painted on top of lower.rt - Animation speed for this sprite.vis - Initial visibility of this sprite.x - x-coordinate of the position of this sprite.y - y-coordinate of the position of this sprite.wide - an int specifying the desired width of the spritefirst - a Color specifying the primary color of the spritesecond - a Color specifying the secondary color of the spriteep1x - x-coordinate for first endpointep1y - y-coordinate for first endpointep2x - x-coordinate for second endpointep2y - y-coordinate for second endpoint| Method Detail |
public TGT_ConnectionPoint getEndpoint(int which)
throws java.util.NoSuchElementException
which - 0 or 1, for the "left" or "right" endpoint.
java.util.NoSuchElementException - when "which" is a value other
than 0 or 1.
public void setEndpoint(TGT_ConnectionPoint ep,
int which)
throws java.util.NoSuchElementException
ep - the new endpointwhich - 0 for the "left" endpoint, 1 for the "right" endpoint.
java.util.NoSuchElementException - when "which" is a value other
than 0 or 1.
public void draw(java.awt.Graphics g,
java.awt.image.ImageObserver o)
TGT_DrawableSprite
draw in interface TGT_AbstractSpritedraw in class TGT_DrawableSpriteg - The Graphics object to use for drawing.o - The ImageObserver that this sprite belongs to.public boolean isHorizontal()
public boolean isVertical()
protected int computeDecoratorOrientation(int endptidx)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||