|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.cke.tool.ZoomTool
Title: JavaCreek Description: A Case based Reasoning Approach in java Copyright: Copyright (c) 2002 Company: Phil
Field Summary | |
protected CreekDocument |
document
Document this mediator is associated with. |
protected java.awt.Point |
firstMousePos
First mouse press position when dragging started. |
protected boolean |
isSelectRegion
True if user is selecting entities by defining a region. |
protected java.awt.Point |
lastMousePos
Most recent mouse position while dragging. |
protected DPoint |
leftTop
LEFT TOP of the selection region |
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 DPoint |
rightBottom
RIGHT BOTTOM of the selection region |
protected VertexList |
selectedList
List of the selected entities in the order they were selected by the user. |
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 | |
ZoomTool()
|
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 boolean |
contains(DPoint loc)
|
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)
|
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)
|
void |
mouseReleased(java.awt.event.MouseEvent me)
|
void |
paintAfter(ConceptViewPaintEvent event)
Called after the view draws the graph. |
void |
paintBefore(ConceptViewPaintEvent event)
Called before the view draws the graph. |
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)
|
protected void |
zoomIn()
|
protected void |
zoomOut()
|
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 java.awt.Point firstMousePos
protected java.awt.Point lastMousePos
protected VisualEntity pressVertex
protected VisualEntity propVertex
protected VertexList selectedList
protected boolean wasPressed
protected boolean isSelectRegion
protected VertexList movingVertices
protected DPoint leftTop
protected DPoint rightBottom
public PropertyWindow propWin
protected javax.swing.JPopupMenu relationList
Constructor Detail |
public ZoomTool()
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
public void mouseReleased(java.awt.event.MouseEvent me)
mouseReleased
in interface java.awt.event.MouseListener
public 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
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public java.awt.Point getMousePosition()
getMousePosition
in interface CreekTool
public void paintAfter(ConceptViewPaintEvent event)
paintAfter
in interface ConceptViewPaintListener
event
- view paint eventpublic void paintBefore(ConceptViewPaintEvent event)
paintBefore
in interface ConceptViewPaintListener
event
- view paint eventprotected VisualEntity findNode(int x, int y)
x
- mouse x positiony
- mouse y positionprotected void selectRegion()
protected void resetMovingVertices()
protected 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)
protected void zoomIn()
protected void zoomOut()
protected boolean contains(DPoint loc)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |