com.cosylab.vdct.graphics.objects
Class VisibleObject

java.lang.Object
  extended by com.cosylab.vdct.graphics.objects.VisibleObject
All Implemented Interfaces:
Visitable
Direct Known Subclasses:
Box, Connector, ContainerObject, Field, Line, Macro, Port, TextBox, Vertex

public abstract class VisibleObject
extends java.lang.Object
implements Visitable

Insert the type's description here. Creation date: (19.12.2000 19:56:38)

Author:
Matej Sekoranja

Field Summary
protected  int x
           
protected  int y
           
protected  java.awt.Image zoomImage
           
 
Constructor Summary
VisibleObject(ContainerObject parent)
          Insert the method's description here.
 
Method Summary
 void destroy()
          Insert the method's description here.
protected abstract  void draw(java.awt.Graphics g, boolean hilited)
          Insert the method's description here.
 void forceValidation()
          Insert the method's description here.
 java.awt.Color getColor()
          Insert the method's description here.
 java.lang.Object getDsId()
           
 java.awt.Font getFont()
          Insert the method's description here.
abstract  java.lang.String getHashID()
          Insert the method's description here.
 int getHeight()
          Insert the method's description here.
 java.lang.String getLabel()
          Insert the method's description here.
 int getLeftOffset()
          Returns the offset in pixels(the length of additional objects (arrows, strings) drawn on the left side of this object.
 int getMarkedX()
           
 int getMarkedY()
           
 java.awt.Point getMoveInsideView()
          Returns ths smallest vector (dX, dY), which would move this inside the view defined by ViewState.
 ContainerObject getParent()
          Insert the method's description here.
 int getRheight()
          Insert the method's description here.
 int getRightOffset()
          Returns the offset in pixels(the length of additional objects (arrows, strings) drawn on the right side of this object.
 int getRlabelX()
          Insert the method's description here.
 int getRlabelY()
          Insert the method's description here.
 ContainerObject getRootContainer()
           
 double getRscale()
          Insert the method's description here.
 int getRwidth()
          Insert the method's description here.
 int getRx()
          Insert the method's description here.
 int getRy()
          Insert the method's description here.
 double getScale()
          Insert the method's description here.
 int getTopOffset()
          Returns the offset in pixels(the length of additional objects (arrows, strings) drawn above this object.
 java.awt.Color getVisibleColor()
           
 int getWidth()
          Insert the method's description here.
 int getX()
          Insert the method's description here.
 int getY()
          Insert the method's description here.
 VisibleObject intersects(int px, int py)
          Default impmlementation for square (must be rescaled) Creation date: (19.12.2000 20:20:20)
 VisibleObject intersects(int p1x, int p1y, int p2x, int p2y)
          Default impmlementation for square (must be rescaled) p1 is upper-left point Creation date: (19.12.2000 20:20:20)
 boolean isDestroyed()
          Insert the method's description here.
 boolean isVisible()
          Insert the method's description here.
 boolean isZoomRepaint()
          Returns true if the object is being repainted as blown up on small zoom.
 void markPosition()
          Mark (remeber) current position.
 void paint(java.awt.Graphics g, boolean hilited)
          Insert the method's description here.
protected  void postDraw(java.awt.Graphics g, boolean hilited)
          Insert the method's description here.
 void postPaint(java.awt.Graphics g, boolean hilited)
          Insert the method's description here.
abstract  void revalidatePosition()
          Insert the method's description here.
 void setColor(java.awt.Color newColor)
          Insert the method's description here.
 void setDestroyed(boolean newDestroyed)
          Insert the method's description here.
 void setFont(java.awt.Font newFont)
          Insert the method's description here.
 void setHeight(int newHeight)
          Insert the method's description here.
 void setLabel(java.lang.String newLabel)
          Insert the method's description here.
 void setParent(ContainerObject newParent)
          Insert the method's description here.
 void setRheight(int newRheight)
          Insert the method's description here.
 void setRlabelX(int newRlabelX)
          Insert the method's description here.
 void setRlabelY(int newRlabelY)
          Insert the method's description here.
 void setRwidth(int newRwidth)
          Insert the method's description here.
 void setRx(int newRx)
          Insert the method's description here.
 void setRy(int newRy)
          Insert the method's description here.
 void setScale(double newScale)
          Insert the method's description here.
 void setWidth(int newWidth)
          Insert the method's description here.
 void setX(int newX)
          Insert the method's description here.
 void setY(int newY)
          Insert the method's description here.
 void setZoomRepaint(boolean zoomRepaint)
           
 void snapToGrid()
          Snap to grid.
 void unconditionalValidation()
          Insert the method's description here.
protected abstract  void validate()
          Insert the method's description here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cosylab.vdct.graphics.objects.Visitable
accept
 

Field Detail

x

protected int x

y

protected int y

zoomImage

protected java.awt.Image zoomImage
Constructor Detail

VisibleObject

public VisibleObject(ContainerObject parent)
Insert the method's description here. Creation date: (21.12.2000 20:40:53)

Parameters:
parent - com.cosylab.vdct.graphics.objects.ContainerObject
Method Detail

destroy

public void destroy()
Insert the method's description here. Creation date: (30.1.2001 11:58:53)


draw

protected abstract void draw(java.awt.Graphics g,
                             boolean hilited)
Insert the method's description here. Creation date: (19.12.2000 21:30:46)

Parameters:
g - java.awt.Graphics
hilited - boolean

postDraw

protected void postDraw(java.awt.Graphics g,
                        boolean hilited)
Insert the method's description here. Creation date: (19.12.2000 21:30:46)

Parameters:
g - java.awt.Graphics
hilited - boolean

forceValidation

public void forceValidation()
Insert the method's description here. Creation date: (25.4.2001 17:56:23)


getColor

public java.awt.Color getColor()
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Returns:
java.awt.Color

getVisibleColor

public java.awt.Color getVisibleColor()

getFont

public java.awt.Font getFont()
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Returns:
java.awt.Font

getHashID

public abstract java.lang.String getHashID()
Insert the method's description here. Creation date: (3.5.2001 16:40:00)

Returns:
java.lang.String

getHeight

public int getHeight()
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Returns:
int

getLabel

public java.lang.String getLabel()
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Returns:
java.lang.String

getParent

public ContainerObject getParent()
Insert the method's description here. Creation date: (21.12.2000 20:41:46)

Returns:
com.cosylab.vdct.graphics.objects.ContainerObject

getRheight

public int getRheight()
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Returns:
int

getRlabelX

public int getRlabelX()
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Returns:
int

getRlabelY

public int getRlabelY()
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Returns:
int

getRscale

public double getRscale()
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Returns:
double

getRwidth

public int getRwidth()
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Returns:
int

getRx

public int getRx()
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Returns:
int

getRy

public int getRy()
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Returns:
int

getScale

public double getScale()
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Returns:
double

getWidth

public int getWidth()
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Returns:
int

getX

public int getX()
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Returns:
int

getY

public int getY()
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Returns:
int

intersects

public VisibleObject intersects(int px,
                                int py)
Default impmlementation for square (must be rescaled) Creation date: (19.12.2000 20:20:20)

Parameters:
px - int
py - int
Returns:
com.cosylab.visible.objects.VisibleObject

intersects

public VisibleObject intersects(int p1x,
                                int p1y,
                                int p2x,
                                int p2y)
Default impmlementation for square (must be rescaled) p1 is upper-left point Creation date: (19.12.2000 20:20:20)

Parameters:
p1x - int
p1y - int
p2x - int
p2y - int
Returns:
com.cosylab.visible.objects.VisibleObject

isDestroyed

public boolean isDestroyed()
Insert the method's description here. Creation date: (5.5.2001 18:02:09)

Returns:
boolean

paint

public void paint(java.awt.Graphics g,
                  boolean hilited)
Insert the method's description here. Creation date: (19.12.2000 21:33:47)

Parameters:
g - java.awt.Graphics
hilited - boolean

postPaint

public void postPaint(java.awt.Graphics g,
                      boolean hilited)
Insert the method's description here. Creation date: (19.12.2000 21:33:47)

Parameters:
g - java.awt.Graphics
hilited - boolean

revalidatePosition

public abstract void revalidatePosition()
Insert the method's description here. Creation date: (21.12.2000 21:21:59)


setColor

public void setColor(java.awt.Color newColor)
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Parameters:
newColor - java.awt.Color

setDestroyed

public void setDestroyed(boolean newDestroyed)
Insert the method's description here. Creation date: (5.5.2001 18:02:09)

Parameters:
newDestroyed - boolean

setFont

public void setFont(java.awt.Font newFont)
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Parameters:
newFont - java.awt.Font

setHeight

public void setHeight(int newHeight)
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Parameters:
newHeight - int

setLabel

public void setLabel(java.lang.String newLabel)
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Parameters:
newLabel - java.lang.String

setParent

public void setParent(ContainerObject newParent)
Insert the method's description here. Creation date: (21.12.2000 20:41:46)

Parameters:
newParent - com.cosylab.vdct.graphics.objects.ContainerObject

setRheight

public void setRheight(int newRheight)
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Parameters:
newRheight - int

setRlabelX

public void setRlabelX(int newRlabelX)
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Parameters:
newRlabelX - int

setRlabelY

public void setRlabelY(int newRlabelY)
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Parameters:
newRlabelY - int

setRwidth

public void setRwidth(int newRwidth)
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Parameters:
newRwidth - int

setRx

public void setRx(int newRx)
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Parameters:
newRx - int

setRy

public void setRy(int newRy)
Insert the method's description here. Creation date: (25.4.2001 17:13:50)

Parameters:
newRy - int

setScale

public void setScale(double newScale)
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Parameters:
newScale - double

setWidth

public void setWidth(int newWidth)
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Parameters:
newWidth - int

setX

public void setX(int newX)
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Parameters:
newX - int

setY

public void setY(int newY)
Insert the method's description here. Creation date: (19.12.2000 20:10:52)

Parameters:
newY - int

unconditionalValidation

public void unconditionalValidation()
Insert the method's description here. Creation date: (25.4.2001 17:56:23)


validate

protected abstract void validate()
Insert the method's description here. Creation date: (19.12.2000 21:31:15)


isVisible

public boolean isVisible()
Insert the method's description here. Creation date: (30.1.2001 16:58:58)

Returns:
boolean

snapToGrid

public void snapToGrid()
Snap to grid. Nearest point is taken.


markPosition

public void markPosition()
Mark (remeber) current position.


getMarkedX

public int getMarkedX()
Returns:
Returns the markedX.

getMarkedY

public int getMarkedY()
Returns:
Returns the markedY.

setZoomRepaint

public void setZoomRepaint(boolean zoomRepaint)

isZoomRepaint

public boolean isZoomRepaint()
Returns true if the object is being repainted as blown up on small zoom.

Returns:

getLeftOffset

public int getLeftOffset()
Returns the offset in pixels(the length of additional objects (arrows, strings) drawn on the left side of this object.

Returns:

getRightOffset

public int getRightOffset()
Returns the offset in pixels(the length of additional objects (arrows, strings) drawn on the right side of this object.

Returns:

getTopOffset

public int getTopOffset()
Returns the offset in pixels(the length of additional objects (arrows, strings) drawn above this object.

Returns:

getMoveInsideView

public java.awt.Point getMoveInsideView()
Returns ths smallest vector (dX, dY), which would move this inside the view defined by ViewState.

Returns:

getRootContainer

public ContainerObject getRootContainer()

getDsId

public java.lang.Object getDsId()