|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.cke.tool.BuildTool
Title: JavaCreek Description: A Case based Reasoning Approach in java Copyright: Copyright (c) 2002 Company: Phil
Field Summary | |
protected java.awt.BasicStroke |
dashedStroke
A dashed line stroke for drawing. |
protected CreekDocument |
document
Document this mediator is associated with. |
protected java.awt.Point |
firstMousePos
First mouse press position when dragging started. |
protected boolean |
isAddEdge
True if we're in the middle of adding a new edge. |
protected java.awt.Point |
lastMousePos
Most recent mouse position while dragging. |
protected CreekModel |
model
Model that we're associated with. |
protected VertexList |
movingVertices
The list of the entities being moved around. |
protected VisualEntity |
pressVertex
Vertex the user pressed on in mousePressed(). |
protected VisualEntity |
propVertex
Vertex the rightClicked. |
PropertyWindow |
propWin
|
protected javax.swing.JPopupMenu |
relationList
|
protected VertexList |
selectedList
List of the selected entities in the order they were selected by the user. |
protected VisualEntity |
targetVertex
Vertex the mouse is currently over during the adding of an edge. |
protected boolean |
wasPressed
True if mouse was pressed on the view before being released. |
protected ConceptView |
view
View that we're associated with. |
Constructor Summary | |
BuildTool()
|
Method Summary | |
VisualEntity |
activateEntity(Entity ed,
VisualEntity activator)
|
protected void |
activateRelation(Relation r)
|
protected void |
activateRelation(java.lang.String relationType)
|
void |
attach(CreekModel model,
ConceptView view,
javax.swing.JInternalFrame win)
Attach to the given model and view objects. |
protected javax.swing.JMenuItem |
createMenuItem(java.lang.String cmd)
|
protected javax.swing.JMenu |
createRelationsMenu()
|
void |
deactivateRelation(java.lang.String relationName)
|
void |
detach()
Detach from the model and view and prepare to be deactivated. |
protected VisualEntity |
findNode(int x,
int y)
Find an entity close to the given x,y position. |
protected void |
finishMoving()
If we were moving entities, clean up now. |
protected void |
formPopup(int x,
int y)
|
java.awt.Point |
getMousePosition()
Returns the position of the mouse,this will return the first Mouse Position or last Mouse Position depending on the current Tool and the state of the tool |
VertexList |
getSelected()
Returns the list of selected vertices, in the order they were selected by the user. |
void |
mouseClicked(java.awt.event.MouseEvent me)
|
void |
mouseDragged(java.awt.event.MouseEvent me)
The user is dragging the mouse. |
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent me)
User has pressed a mouse button on us. |
void |
mouseReleased(java.awt.event.MouseEvent me)
User has released a mouse button on us. |
void |
paintAfter(ConceptViewPaintEvent event)
Called after the view draws the graph. |
void |
paintBefore(ConceptViewPaintEvent event)
Called before the view draws the graph. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
The state of the object we're listening to has changed. |
protected void |
resetMovingVertices()
Moves all the moving entities back to their original positions by using the original positions stored in the copy of the entities. |
protected void |
selectRegion()
Called when user was defining a rectangular region with which to select entities. |
protected void |
toggleRelation(VisualEntity e,
java.lang.String relationName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected CreekModel model
protected ConceptView view
protected CreekDocument document
protected VisualEntity pressVertex
protected VisualEntity propVertex
protected VertexList selectedList
protected VisualEntity targetVertex
protected boolean wasPressed
protected VertexList movingVertices
protected boolean isAddEdge
protected java.awt.Point firstMousePos
protected java.awt.Point lastMousePos
protected java.awt.BasicStroke dashedStroke
public PropertyWindow propWin
protected javax.swing.JPopupMenu relationList
Constructor Detail |
public BuildTool()
Method Detail |
public void attach(CreekModel model, ConceptView view, javax.swing.JInternalFrame win)
CreekTool
attach
in interface CreekTool
model
- GraphModel to attach toview
- GraphView to attach topublic void detach()
CreekTool
Note that this method may be called more than once
between calls to attach()
detach
in interface CreekTool
public VertexList getSelected()
CreekTool
getSelected
in interface CreekTool
public void mouseClicked(java.awt.event.MouseEvent me)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent me)
mousePressed
in interface java.awt.event.MouseListener
me
- mouse event for this canvaspublic void mouseReleased(java.awt.event.MouseEvent me)
mouseReleased
in interface java.awt.event.MouseListener
me
- mouse event for this canvaspublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent me)
mouseDragged
in interface java.awt.event.MouseMotionListener
me
- mouse eventpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void paintAfter(ConceptViewPaintEvent event)
paintAfter
in interface ConceptViewPaintListener
event
- view paint eventpublic void paintBefore(ConceptViewPaintEvent event)
paintBefore
in interface ConceptViewPaintListener
event
- view paint eventpublic void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
e
- change eventpublic java.awt.Point getMousePosition()
getMousePosition
in interface CreekTool
protected void selectRegion()
protected void resetMovingVertices()
protected VisualEntity findNode(int x, int y)
x
- mouse x positiony
- mouse y positionprotected void finishMoving()
protected void formPopup(int x, int y)
protected javax.swing.JMenuItem createMenuItem(java.lang.String cmd)
protected javax.swing.JMenu createRelationsMenu()
protected void toggleRelation(VisualEntity e, java.lang.String relationName)
public void deactivateRelation(java.lang.String relationName)
protected void activateRelation(java.lang.String relationType)
protected void activateRelation(Relation r)
public VisualEntity activateEntity(Entity ed, VisualEntity activator)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |