|
JGraph X 1.4.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mxgraph.swing.util.mxMouseAdapter
com.mxgraph.swing.handler.mxConnectionHandler
public class mxConnectionHandler
Connection handler creates new connections between cells. This control is used to display the connector icon, while the preview is used to draw the line.
Field Summary | |
---|---|
protected Rectangle |
bounds
|
static Cursor |
CONNECT_CURSOR
|
protected ImageIcon |
connectIcon
Specifies the icon to be used for creating new connections. |
protected mxConnectPreview |
connectPreview
|
protected boolean |
createTarget
Specifies if the source should be cloned and used as a target if no target was selected. |
protected boolean |
enabled
|
protected String |
error
|
protected Point |
first
|
protected mxGraphComponent |
graphComponent
|
protected boolean |
handleEnabled
Specifies if a handle should be used for creating new connections. |
protected int |
handleSize
Specifies the size of the handle to be used for creating new connections. |
protected boolean |
keepOnTop
Appearance and event handling order wrt subhandles. |
protected mxCellMarker |
marker
|
protected mxEventSource.mxIEventListener |
resetHandler
|
protected boolean |
select
|
protected mxCellState |
source
|
Constructor Summary | |
---|---|
mxConnectionHandler(mxGraphComponent graphComponent)
|
Method Summary | |
---|---|
protected mxConnectPreview |
createConnectPreview()
|
Object |
createTargetVertex(MouseEvent e,
Object source)
|
ImageIcon |
getConnecIcon()
|
mxConnectPreview |
getConnectPreview()
|
int |
getHandleSize()
|
mxCellMarker |
getMarker()
|
boolean |
isConnecting()
Returns true if the source terminal has been clicked and a new connection is currently being previewed. |
boolean |
isCreateTarget()
|
boolean |
isEnabled()
|
boolean |
isHandleEnabled()
|
boolean |
isHighlighting()
Returns true if no connectIcon is specified and handleEnabled is false. |
boolean |
isKeepOnTop()
|
boolean |
isSelect()
|
boolean |
isValidSource(Object cell)
|
boolean |
isValidTarget(Object cell)
Returns true. |
void |
mouseDragged(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
paint(Graphics g)
|
void |
reset()
|
void |
setBounds(Rectangle value)
|
void |
setConnectIcon(ImageIcon value)
|
void |
setConnectPreview(mxConnectPreview value)
|
void |
setCreateTarget(boolean value)
|
void |
setEnabled(boolean value)
|
void |
setHandleEnabled(boolean value)
|
void |
setHandleSize(int value)
|
void |
setKeepOnTop(boolean value)
|
void |
setMarker(mxCellMarker value)
|
void |
setSelect(boolean value)
|
void |
start(MouseEvent e,
mxCellState state)
|
String |
validateConnection(Object source,
Object target)
Returns the error message or an empty string if the connection for the given source target pair is not valid. |
Methods inherited from class com.mxgraph.swing.util.mxMouseAdapter |
---|
mouseClicked, mouseEntered, mouseExited |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Cursor CONNECT_CURSOR
protected mxGraphComponent graphComponent
protected mxConnectPreview connectPreview
protected ImageIcon connectIcon
protected int handleSize
protected boolean handleEnabled
protected boolean select
protected boolean createTarget
protected boolean keepOnTop
protected transient Point first
protected transient Rectangle bounds
protected transient mxCellState source
protected transient mxCellMarker marker
protected transient String error
protected boolean enabled
protected transient mxEventSource.mxIEventListener resetHandler
Constructor Detail |
---|
public mxConnectionHandler(mxGraphComponent graphComponent)
graphComponent
- Method Detail |
---|
protected mxConnectPreview createConnectPreview()
public mxConnectPreview getConnectPreview()
public void setConnectPreview(mxConnectPreview value)
public boolean isConnecting()
public boolean isHighlighting()
public boolean isEnabled()
public void setEnabled(boolean value)
public boolean isKeepOnTop()
public void setKeepOnTop(boolean value)
public void setConnectIcon(ImageIcon value)
public ImageIcon getConnecIcon()
public void setHandleEnabled(boolean value)
public boolean isHandleEnabled()
public void setHandleSize(int value)
public int getHandleSize()
public mxCellMarker getMarker()
public void setMarker(mxCellMarker value)
public void setCreateTarget(boolean value)
public boolean isCreateTarget()
public void setSelect(boolean value)
public boolean isSelect()
public void reset()
public Object createTargetVertex(MouseEvent e, Object source)
public boolean isValidSource(Object cell)
public boolean isValidTarget(Object cell)
public String validateConnection(Object source, Object target)
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
mousePressed
in class mxMouseAdapter
public void start(MouseEvent e, mxCellState state)
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
mouseMoved
in class mxMouseAdapter
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
mouseDragged
in class mxMouseAdapter
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
mouseReleased
in class mxMouseAdapter
public void setBounds(Rectangle value)
public void paint(Graphics g)
|
JGraph X 1.4.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |