|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.devaki.nextobjects.workspace.models.graphics.ObjectView org.devaki.nextobjects.workspace.models.graphics.LineView
This class is responsible for drawing all line-like objects
Field Summary | |
protected LineStyle |
myStyle
The style |
Fields inherited from class org.devaki.nextobjects.workspace.models.graphics.ObjectView |
actionPoint, myObject, selectionPoints |
Constructor Summary | |
LineView(BaseObject pObject)
Create a new instance of LineView |
Method Summary | |
void |
computeBestPoints()
Compute the best point (North -S-E-W , ...) to use for drawing the line |
void |
computeBestPoints(java.awt.Point p1)
Compute the best point for a given mouse click. |
SelectionPoint |
getChildClassPoint()
Get the child class control point |
int |
getForeignPosition()
Get the position ( N,S,E,W,NE,...) of the selection point for the point foreign to the line (child class) This method is used during (de)serialization |
int |
getLocalPosition()
Get the position ( N,S,E,W,NE,...) of the selection point for the point local to the line (parent class) This method is used during (de)serialization |
java.awt.Point |
getLocation()
Return the location This is ambiguous for a line but we provide graphic context as a smallest rectangle containig the line... |
SelectionPoint |
getParentClassPoint()
Get the parent class control point |
java.awt.Point |
getSelectionPoint(java.awt.Point pPoint)
Get the closest SelectionPoint. |
java.awt.Dimension |
getSize()
Return the size This is ambiguous for a line but we provide graphic context as a smallest rectangle containig the line... |
LineStyle |
getStyle()
Get the style |
abstract java.awt.Polygon |
getSurface()
Return the surface on which the user can click to select the object |
void |
renderSelected(java.awt.Graphics g)
Paint selection around the object |
void |
setChildClassPoint(SelectionPoint pSelectionPoint)
Set the child class control point |
void |
setForeignPosition(int pPosition)
set the position ( N,S,E,W,NE,...) of the selection point for the point foreign to the line (child class) This method is used during (de)serialization |
void |
setLocalPosition(int pPosition)
set the position ( N,S,E,W,NE,...) of the selection point for the point local to the line (parent class) This method is used during (de)serialization |
void |
setLocation(java.awt.Point p)
Set the Location |
void |
setParentClassPoint(SelectionPoint pSelectionPoint)
Set the parent class control point |
void |
setSize(java.awt.Dimension pDimension)
Set the size |
void |
setStyle(LineStyle pStyle)
Define the style |
Methods inherited from class org.devaki.nextobjects.workspace.models.graphics.ObjectView |
getBaseObject, getSelectionPoint, getSelectionPoints, paint, resetActionLocation, resetSelectionPoint, setActionLocation, setBaseObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected LineStyle myStyle
Constructor Detail |
public LineView(BaseObject pObject)
pObject
- the context objectMethod Detail |
public void renderSelected(java.awt.Graphics g)
renderSelected
in class ObjectView
g
- Graphic axis of the main viewpublic java.awt.Point getLocation()
getLocation
in class ObjectView
public java.awt.Point getSelectionPoint(java.awt.Point pPoint)
pPoint
- the pointed point
public void setLocation(java.awt.Point p)
setLocation
in class ObjectView
p
- the locationpublic java.awt.Dimension getSize()
getSize
in class ObjectView
public void setSize(java.awt.Dimension pDimension)
setSize
in class ObjectView
pDimension
- the dimensionpublic abstract java.awt.Polygon getSurface()
getSurface
in class ObjectView
public SelectionPoint getParentClassPoint()
public SelectionPoint getChildClassPoint()
public void setParentClassPoint(SelectionPoint pSelectionPoint)
pSelectionPoint
- the selection pointpublic void setChildClassPoint(SelectionPoint pSelectionPoint)
pSelectionPoint
- the selection pointpublic LineStyle getStyle()
public void setStyle(LineStyle pStyle)
pStyle
- the stylepublic void computeBestPoints()
public void setLocalPosition(int pPosition)
pPosition
- SelectionPoint
public void setForeignPosition(int pPosition)
pPosition
- SelectionPoint
public int getLocalPosition()
SelectionPoint
public int getForeignPosition()
SelectionPoint
public void computeBestPoints(java.awt.Point p1)
p1
- the clicked point
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |