projectPrototype.view.graphicEditor
Interface Editor

All Known Implementing Classes:
GraphicEditor

public interface Editor

The Editor defines the interface for graphic editors.

Author:
Dário Apolinário & Gustavo Reis

Field Summary
static int CFP
          Fisrt point constructor
static int CSP
          Second point constructor
static int IDENTIFICATION
          Identification
static int LINK_CFP
          Link first point constructor
static int LINK_CSP
          Link Second Point Constructor
static int MODIFICATION
          Modification
static int OVER_OBJECT
          Over object
static int OVER_SELECTOR
          Over selector
static int TRANSLATION
          Translation
 
Method Summary
 void addGraphicElement()
          Sets the Graphic Elements being created as concluded.
 void bringForward(GraphicElement graphicElement)
          Bring forward a Graphic Element
 void bringToFront(GraphicElement graphicElement)
          Bring to front a Graphic Element
 void changeCursor(java.awt.Cursor cursor)
          Sets the mouse Cursor.
 Operator getActiveOpertator()
          Returns the active Operator
 GraphicElement getGraphicElement(int i)
          Return Graphic Element at index i.
 GraphicElement getGraphicElementOver(Point point)
          Returns the Graphic Element over the Point.
 int getGraphicElementsListSize()
          Returns the number of Graphic Elements
 State getState(int i)
          Returns the state i.
 void paint()
          Paints the Graphic Elements
 void selectNone()
          Unselect all Graphic Elements
 void sendBackward(GraphicElement graphicElement)
          Send backward a Graphic Element
 void sendToBack(GraphicElement graphicElement)
          Send to back a Graphic Element
 void setCurrentGraphicElement(GraphicElement graphicElement)
          Indicates to the Graphic Editor wich graphic element is being created.
 void setCurrentGraphicElements(java.util.LinkedList graphicElements)
          Sets Graphics Elements being created.
 void setOperator(int operator)
          Sets the current operator.
 

Field Detail

IDENTIFICATION

public static final int IDENTIFICATION
Identification

See Also:
Constant Field Values

CFP

public static final int CFP
Fisrt point constructor

See Also:
Constant Field Values

CSP

public static final int CSP
Second point constructor

See Also:
Constant Field Values

OVER_OBJECT

public static final int OVER_OBJECT
Over object

See Also:
Constant Field Values

OVER_SELECTOR

public static final int OVER_SELECTOR
Over selector

See Also:
Constant Field Values

TRANSLATION

public static final int TRANSLATION
Translation

See Also:
Constant Field Values

MODIFICATION

public static final int MODIFICATION
Modification

See Also:
Constant Field Values

LINK_CFP

public static final int LINK_CFP
Link first point constructor

See Also:
Constant Field Values

LINK_CSP

public static final int LINK_CSP
Link Second Point Constructor

See Also:
Constant Field Values
Method Detail

setOperator

public void setOperator(int operator)
Sets the current operator.

Parameters:
operator - Operator to be set.

getActiveOpertator

public Operator getActiveOpertator()
Returns the active Operator

Returns:
Active operator

getState

public State getState(int i)
Returns the state i.

Parameters:
i - State to be retrieved
Returns:
State i.

setCurrentGraphicElement

public void setCurrentGraphicElement(GraphicElement graphicElement)
Indicates to the Graphic Editor wich graphic element is being created.

Parameters:
graphicElement - Graphic element being created.

addGraphicElement

public void addGraphicElement()
Sets the Graphic Elements being created as concluded.


paint

public void paint()
Paints the Graphic Elements


getGraphicElementsListSize

public int getGraphicElementsListSize()
Returns the number of Graphic Elements

Returns:
The number of Graphic Elements

getGraphicElement

public GraphicElement getGraphicElement(int i)
Return Graphic Element at index i.

Parameters:
i - Index of the Graphic Element
Returns:
The Graphic Element at index i.

selectNone

public void selectNone()
Unselect all Graphic Elements


bringToFront

public void bringToFront(GraphicElement graphicElement)
Bring to front a Graphic Element

Parameters:
graphicElement - Graphic Element to bring to front.

sendToBack

public void sendToBack(GraphicElement graphicElement)
Send to back a Graphic Element

Parameters:
graphicElement - Graphic Element so send to back

bringForward

public void bringForward(GraphicElement graphicElement)
Bring forward a Graphic Element

Parameters:
graphicElement - Graphic Element to bring forward

sendBackward

public void sendBackward(GraphicElement graphicElement)
Send backward a Graphic Element

Parameters:
graphicElement - Graphic Element to send backward

changeCursor

public void changeCursor(java.awt.Cursor cursor)
Sets the mouse Cursor.

Parameters:
cursor - Cursor to be set.

getGraphicElementOver

public GraphicElement getGraphicElementOver(Point point)
Returns the Graphic Element over the Point.

Parameters:
point - Point over a Graphic Element
Returns:
Graphic Element at Point position.

setCurrentGraphicElements

public void setCurrentGraphicElements(java.util.LinkedList graphicElements)
Sets Graphics Elements being created.

Parameters:
graphicElements - Graphic Elements being created