Class ConnectionEnding.ConnectionEndingMouseListener
- java.lang.Object
-
- org.eclipse.draw2d.MouseMotionListener.Stub
-
- com._1c.g5.v8.dt.bp.scheme.ui.model.draw2d.ConnectionEnding.ConnectionEndingMouseListener
-
- All Implemented Interfaces:
org.eclipse.draw2d.MouseListener
,org.eclipse.draw2d.MouseMotionListener
- Enclosing class:
- ConnectionEnding
protected class ConnectionEnding.ConnectionEndingMouseListener extends org.eclipse.draw2d.MouseMotionListener.Stub implements org.eclipse.draw2d.MouseListener
Connection ending mouse listener.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConnectionEndingMouseListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canConnectFigures(org.eclipse.draw2d.IFigure figure, org.eclipse.draw2d.IFigure otherFigure)
Returnstrue
if figures can be connected.protected boolean
connectToFigure(AbstractBpFigure bpFigure)
Connects owner connection to given figure (to highlited anchor).protected int
getAhcnorType()
Returns anchor type to which ending can connect.org.eclipse.draw2d.ConnectionAnchor
getDraggingAnchor()
Returns dragging anchor.protected org.eclipse.draw2d.ConnectionAnchor
getInitialSourceAnchor()
Returns initial source anchor.protected org.eclipse.draw2d.ConnectionAnchor
getInitialTargetAnchor()
Returns initial target anchor.protected boolean
isRightSourceFigure(com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramFigure figure)
Returnstrue
anchors of given figure should be highlited for source ending.protected boolean
isRightTargetFigure(com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramFigure figure)
Returnstrue
anchors of given figure should be highlited for target ending.void
mouseDoubleClicked(org.eclipse.draw2d.MouseEvent me)
void
mouseDragged(org.eclipse.draw2d.MouseEvent me)
void
mouseMoved(org.eclipse.draw2d.MouseEvent me)
void
mousePressed(org.eclipse.draw2d.MouseEvent me)
void
mouseReleased(org.eclipse.draw2d.MouseEvent me)
protected void
resetOwner()
Resets owner if not connected to figure anchor.protected void
saveState()
Saves state on mouse press.
-
-
-
Method Detail
-
mousePressed
public void mousePressed(org.eclipse.draw2d.MouseEvent me)
- Specified by:
mousePressed
in interfaceorg.eclipse.draw2d.MouseListener
-
mouseReleased
public void mouseReleased(org.eclipse.draw2d.MouseEvent me)
- Specified by:
mouseReleased
in interfaceorg.eclipse.draw2d.MouseListener
-
mouseDoubleClicked
public void mouseDoubleClicked(org.eclipse.draw2d.MouseEvent me)
- Specified by:
mouseDoubleClicked
in interfaceorg.eclipse.draw2d.MouseListener
-
mouseDragged
public void mouseDragged(org.eclipse.draw2d.MouseEvent me)
- Specified by:
mouseDragged
in interfaceorg.eclipse.draw2d.MouseMotionListener
- Overrides:
mouseDragged
in classorg.eclipse.draw2d.MouseMotionListener.Stub
-
mouseMoved
public void mouseMoved(org.eclipse.draw2d.MouseEvent me)
- Specified by:
mouseMoved
in interfaceorg.eclipse.draw2d.MouseMotionListener
- Overrides:
mouseMoved
in classorg.eclipse.draw2d.MouseMotionListener.Stub
-
getDraggingAnchor
public org.eclipse.draw2d.ConnectionAnchor getDraggingAnchor()
Returns dragging anchor.- Returns:
- dragging anchor. Can return
null
.
-
saveState
protected void saveState()
Saves state on mouse press.
-
canConnectFigures
protected boolean canConnectFigures(org.eclipse.draw2d.IFigure figure, org.eclipse.draw2d.IFigure otherFigure)
Returnstrue
if figures can be connected.- Parameters:
figure
- - figure to check. Can't benull
.otherFigure
- - other figure to check. Can't benull
.- Returns:
true
if figures can be connected.
-
connectToFigure
protected boolean connectToFigure(AbstractBpFigure bpFigure)
Connects owner connection to given figure (to highlited anchor).- Parameters:
bpFigure
- - figure to connect to. Can't benull
.- Returns:
true
if connected.
-
getAhcnorType
protected int getAhcnorType()
Returns anchor type to which ending can connect.- Returns:
- anchor type to which ending can connect.
-
isRightSourceFigure
protected boolean isRightSourceFigure(com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramFigure figure)
Returnstrue
anchors of given figure should be highlited for source ending.- Parameters:
figure
- - figure. Can't benull
.- Returns:
true
anchors of given figure should be highlited for source ending.
-
isRightTargetFigure
protected boolean isRightTargetFigure(com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramFigure figure)
Returnstrue
anchors of given figure should be highlited for target ending.- Parameters:
figure
- - figure. Can't benull
.- Returns:
true
anchors of given figure should be highlited for target ending.
-
resetOwner
protected void resetOwner()
Resets owner if not connected to figure anchor.
-
getInitialSourceAnchor
protected org.eclipse.draw2d.ConnectionAnchor getInitialSourceAnchor()
Returns initial source anchor.- Returns:
- initial source anchor. Can't return
null
.
-
getInitialTargetAnchor
protected org.eclipse.draw2d.ConnectionAnchor getInitialTargetAnchor()
Returns initial target anchor.- Returns:
- initial target anchor. Can't return
null
.
-
-