Class GraphMouseListener
java.lang.Object
jsimgraph.controller.GraphMouseListener
- All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener, MouseInputListener
- Author:
- Federico Granata Date: 6-giu-2003 Time: 14.17.30
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jsimgraph.controller.UIStateprotected jsimgraph.controller.UIStateprotected org.jgraph.graph.CellViewThe cell under the mousepointer.protected jsimgraph.controller.UIStateprotected jsimgraph.controller.UIStateprotected jsimgraph.controller.UIStateprotected org.jgraph.graph.CellViewThe focused cell under the mousepointer.protected org.jgraph.graph.CellHandleHandle that we are going to use.protected ObjectThe object that handles mouse operations.protected jsimgraph.controller.UIStateprotected org.jgraph.graph.BasicMarqueeHandlerMarquee that we are going to use.protected jsimgraph.controller.UIStateprotected jsimgraph.controller.UIStateprotected Cursorprotected jsimgraph.controller.UIState -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidModify graphMouseListener when a cell has been deletedorg.jgraph.graph.CellViewgetCell()jsimgraph.controller.UIStateorg.jgraph.graph.CellViewgetFocus()org.jgraph.graph.CellHandleorg.jgraph.graph.BasicMarqueeHandlerprotected voidhandleEditTrigger(Object cell) protected booleanisDescendant(org.jgraph.graph.CellView parentView, org.jgraph.graph.CellView childView) voidInvoked when the mouse button has been clicked (pressed and released) on a component.voidInvoked when a mouse button is pressed on a component and then dragged.voidInvoked when the mouse enters a component.voidInvoked when the mouse exits a component.voidInvoked when the mouse cursor has been moved onto a component but no buttons have been pushed.voidInvoked when a mouse button has been pressed on a component.voidInvoked when a mouse button has been released on a component.protected voidpostProcessSelection(MouseEvent e, Object cell, boolean wasSelected) Invoked after a cell has been selected in the mouseReleased method.voidvoidvoidsetCell(org.jgraph.graph.CellView cell) voidvoidvoidvoidsetFocus(org.jgraph.graph.CellView focus) voidsetHandle(org.jgraph.graph.CellHandle handle) voidsetHandler(Object handler) voidsetInsertState(String className) voidvoidsetPreviousCursor(Cursor cursor) void
-
Field Details
-
currentState
protected jsimgraph.controller.UIState currentState -
connect
protected jsimgraph.controller.UIState connect -
bezierconnect
protected jsimgraph.controller.UIState bezierconnect -
delete
protected jsimgraph.controller.UIState delete -
insert
protected jsimgraph.controller.UIState insert -
paste
protected jsimgraph.controller.UIState paste -
select
protected jsimgraph.controller.UIState select -
bezierSelect
protected jsimgraph.controller.UIState bezierSelect -
nothing
protected jsimgraph.controller.UIState nothing -
focus
protected org.jgraph.graph.CellView focusThe focused cell under the mousepointer. -
cell
protected org.jgraph.graph.CellView cellThe cell under the mousepointer. -
handler
The object that handles mouse operations. -
handle
protected org.jgraph.graph.CellHandle handleHandle that we are going to use. -
marquee
protected org.jgraph.graph.BasicMarqueeHandler marqueeMarquee that we are going to use. -
previousCursor
-
-
Constructor Details
-
GraphMouseListener
-
-
Method Details
-
mouseClicked
Invoked when the mouse button has been clicked (pressed and released) on a component.- Specified by:
mouseClickedin interfaceMouseListener
-
mousePressed
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
Invoked when the mouse enters a component.- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
Invoked when the mouse exits a component.- Specified by:
mouseExitedin interfaceMouseListener
-
mouseDragged
Invoked when a mouse button is pressed on a component and then dragged.MOUSE_DRAGGEDevents will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).Due to platform-dependent Drag&Drop implementations,
MOUSE_DRAGGEDevents may not be delivered during a native Drag&Drop operation.- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mouseMoved
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.- Specified by:
mouseMovedin interfaceMouseMotionListener
-
setConnectState
public void setConnectState() -
setBezierConnectState
public void setBezierConnectState() -
setDeleteState
public void setDeleteState() -
setDefaultState
public void setDefaultState() -
setInsertState
-
setPasteState
public void setPasteState() -
setSelectState
public void setSelectState() -
setBezierEdgeModificationState
-
postProcessSelection
Invoked after a cell has been selected in the mouseReleased method. This can be used to do something interesting if the cell was already selected, in which case this implementation selects the parent. Override if you want different behaviour, such as start editing. -
isDescendant
protected boolean isDescendant(org.jgraph.graph.CellView parentView, org.jgraph.graph.CellView childView) -
setHandle
public void setHandle(org.jgraph.graph.CellHandle handle) -
getHandle
public org.jgraph.graph.CellHandle getHandle() -
getFocus
public org.jgraph.graph.CellView getFocus() -
getHandler
-
getMarquee
public org.jgraph.graph.BasicMarqueeHandler getMarquee() -
getPreviousCursor
-
getCell
public org.jgraph.graph.CellView getCell() -
setHandler
-
setFocus
public void setFocus(org.jgraph.graph.CellView focus) -
setCell
public void setCell(org.jgraph.graph.CellView cell) -
handleEditTrigger
-
getCurrentState
public jsimgraph.controller.UIState getCurrentState() -
setPreviousCursor
-
cellDeleted
public void cellDeleted()Modify graphMouseListener when a cell has been deleted
-