projectPrototype.view.graphicEditor.graphicElement
Class GraphicElement

java.lang.Object
  extended byprojectPrototype.view.graphicEditor.graphicElement.GraphicElement
Direct Known Subclasses:
ComposedFigure, Ellipse, Line, Text

public abstract class GraphicElement
extends java.lang.Object

Author:
Administrator To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
protected  java.awt.Color bgColor
           
protected  GraphicElementConector conector
           
protected  java.awt.Cursor cursor
           
protected  java.awt.Color lineColor
           
protected  int MIN_HEIGHT
           
protected  int MIN_WIDTH
           
protected  Point oldP1
           
protected  Point oldP2
           
protected  Point p1
           
protected  Point p2
           
protected  GraphicElementSelector selector
           
 
Constructor Summary
GraphicElement()
           
GraphicElement(GraphicElement graphicElement)
           
GraphicElement(Point p1, Point p2, java.awt.Color lineColor, java.awt.Color bgColor)
           
 
Method Summary
protected  void adjustConectors()
           
 void autoAdjust()
           
 void createConectors()
           
 GraphicElement createDraggableElement()
           
protected  GraphicElementSelector createSelector()
           
 GraphicElementConector getConector()
           
 java.awt.Cursor getCursor()
           
 GraphicElement getGraphicElement(Point point)
           
 GraphicElementSelector getGraphicElementSelector()
           
 Point getP1()
           
 Point getP2()
           
 java.awt.Rectangle getRectangle()
           
 boolean isSelected()
           
 void move(double dx, double dy)
           
 boolean over(Point p)
           
abstract  void paint(java.awt.Graphics g)
           
 void select()
           
 void setP1(Point p1)
           
 void setP2(Point p2)
           
 void verifyMinimalSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineColor

protected java.awt.Color lineColor

bgColor

protected java.awt.Color bgColor

p1

protected Point p1

p2

protected Point p2

oldP1

protected Point oldP1

oldP2

protected Point oldP2

selector

protected GraphicElementSelector selector

conector

protected GraphicElementConector conector

MIN_WIDTH

protected final int MIN_WIDTH
See Also:
Constant Field Values

MIN_HEIGHT

protected final int MIN_HEIGHT
See Also:
Constant Field Values

cursor

protected java.awt.Cursor cursor
Constructor Detail

GraphicElement

public GraphicElement()

GraphicElement

public GraphicElement(Point p1,
                      Point p2,
                      java.awt.Color lineColor,
                      java.awt.Color bgColor)

GraphicElement

public GraphicElement(GraphicElement graphicElement)
Method Detail

getP1

public Point getP1()

getP2

public Point getP2()

setP1

public void setP1(Point p1)

setP2

public void setP2(Point p2)

paint

public abstract void paint(java.awt.Graphics g)

move

public void move(double dx,
                 double dy)

over

public boolean over(Point p)

select

public void select()

getGraphicElementSelector

public GraphicElementSelector getGraphicElementSelector()

isSelected

public boolean isSelected()

createSelector

protected GraphicElementSelector createSelector()

getRectangle

public java.awt.Rectangle getRectangle()

verifyMinimalSize

public void verifyMinimalSize()

getCursor

public java.awt.Cursor getCursor()

getGraphicElement

public GraphicElement getGraphicElement(Point point)
Parameters:
point -
Returns:

createDraggableElement

public GraphicElement createDraggableElement()

getConector

public GraphicElementConector getConector()

createConectors

public void createConectors()

adjustConectors

protected void adjustConectors()

autoAdjust

public void autoAdjust()