org.joone.edit
Class LayerConnection
- java.lang.Object
-
- CH.ifa.draw.standard.AbstractFigure
-
- CH.ifa.draw.figures.PolyLineFigure
-
- CH.ifa.draw.figures.LineConnection
-
- org.joone.edit.LayerConnection
-
- All Implemented Interfaces:
- ConnectionFigure, Figure, FigureChangeListener, Storable, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, GenericFigure, UpdatableFigure
- Direct Known Subclasses:
- ChartHandleConnection, DesiredLayerConnection, ErrorLayerConnection, InputLayerConnection, InputPluginConnection, OutputPluginConnection, ValidationLayerConnection
public class LayerConnection extends LineConnection implements GenericFigure, UpdatableFigure
Graphic representation of a connection between two layers- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class CH.ifa.draw.figures.PolyLineFigure
ARROW_TIP_BOTH, ARROW_TIP_END, ARROW_TIP_NONE, ARROW_TIP_START
-
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
-
-
Constructor Summary
Constructors Constructor and Description LayerConnection()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleancanConnect(Figure start, Figure end)determines if the two layers can be connectedbooleancanConnect(GenericFigure start, ConnectionFigure conn)voiddraw(java.awt.Graphics g)Draws the figure.java.lang.ObjectgetParam(java.lang.Object key)Used to get a parameter by namejavax.swing.JPopupMenugetPopupMenu(PropertySheet ps, DrawingView view)Get the popup menu for this connection.SynapsegetSynapse()Get the internal Synapse objectWrappergetWrapper()Returns the wrapper for the FigurevoidhandleConnect(Figure start, Figure end)handle the connection behaviourvoidhandleDisconnect(Figure start, Figure end)handle the disconnection behaviourjava.util.Vectorhandles()Gets the handles of the figure.voidsetParam(java.lang.Object key, java.lang.Object newParam)Sets a parameter of the synapsevoidsetParams(java.util.Hashtable newParams)Used to set all parameters of the synapsevoidsetSynapse(Synapse newMySynapse)Set the internal Synapse objectvoidupdate()-
Methods inherited from class CH.ifa.draw.figures.LineConnection
canConnect, connectEnd, connectsSame, connectStart, disconnectEnd, disconnectStart, end, endFigure, endPoint, endPoint, figureChanged, figureInvalidated, figureRemoved, figureRequestRemove, figureRequestUpdate, insertPointAt, layoutConnection, read, release, removePointAt, setPointAt, start, startFigure, startPoint, startPoint, updateConnection, write
-
Methods inherited from class CH.ifa.draw.figures.PolyLineFigure
addPoint, basicDisplayBox, connectorAt, containsPoint, displayBox, findSegment, getAttribute, getEndDecoration, getStartDecoration, isEmpty, joinSegments, locator, pointAt, pointCount, points, setAttribute, setEndDecoration, setStartDecoration, splitSegment
-
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, center, changed, clone, connectedTextLocator, connectionInsets, connectorVisibility, decompose, displayBox, displayBox, figures, findFigureInside, includes, invalidate, listener, moveBy, removeFigureChangeListener, removeFromContainer, size, willChange
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface CH.ifa.draw.framework.ConnectionFigure
joinSegments, pointAt, pointCount, splitSegment
-
Methods inherited from interface CH.ifa.draw.framework.Figure
addFigureChangeListener, addToContainer, basicDisplayBox, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, displayBox, figures, findFigureInside, getAttribute, includes, invalidate, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, setAttribute, size, willChange
-
-
-
-
Method Detail
-
handleConnect
public void handleConnect(Figure start, Figure end)
handle the connection behaviour- Parameters:
start- starting layerend- ending layer
-
handleDisconnect
public void handleDisconnect(Figure start, Figure end)
handle the disconnection behaviour- Parameters:
start- starting layerend- ending layer
-
canConnect
public boolean canConnect(Figure start, Figure end)
determines if the two layers can be connected- Specified by:
canConnectin interfaceConnectionFigure- Overrides:
canConnectin classLineConnection- Parameters:
start- starting layerend- ending layer- Returns:
- true if can be connected
-
handles
public java.util.Vector handles()
Description copied from class:LineConnectionGets the handles of the figure. It returns the normal PolyLineHandles but adds ChangeConnectionHandles at the start and end.- Specified by:
handlesin interfaceFigure- Overrides:
handlesin classLineConnection- Returns:
- a Vector of handles
- See Also:
Handle
-
getSynapse
public Synapse getSynapse()
Get the internal Synapse object- Returns:
- the Synapse represented
-
setSynapse
public void setSynapse(Synapse newMySynapse)
Set the internal Synapse object- Parameters:
newMySynapse- the Synapse to represent
-
getParam
public java.lang.Object getParam(java.lang.Object key)
Used to get a parameter by name- Specified by:
getParamin interfaceGenericFigure- Parameters:
key- the parameter's name- Returns:
- the parameter's value
-
setParam
public void setParam(java.lang.Object key, java.lang.Object newParam)Sets a parameter of the synapse- Specified by:
setParamin interfaceGenericFigure- Parameters:
key- the parameter's namenewParam- The parameter's value
-
setParams
public void setParams(java.util.Hashtable newParams)
Used to set all parameters of the synapse- Specified by:
setParamsin interfaceGenericFigure- Parameters:
newParams- java.util.Hashtable
-
getWrapper
public Wrapper getWrapper()
Returns the wrapper for the Figure- Specified by:
getWrapperin interfaceGenericFigure- Returns:
- the Wrapper object
-
update
public void update()
- Specified by:
updatein interfaceUpdatableFigure
-
canConnect
public boolean canConnect(GenericFigure start, ConnectionFigure conn)
- Specified by:
canConnectin interfaceGenericFigure
-
draw
public void draw(java.awt.Graphics g)
Description copied from interface:FigureDraws the figure.- Specified by:
drawin interfaceFigure- Overrides:
drawin classPolyLineFigure- Parameters:
g- the Graphics to draw into
-
getPopupMenu
public javax.swing.JPopupMenu getPopupMenu(PropertySheet ps, DrawingView view)
Get the popup menu for this connection. Put here all the popup menu items common to all the connections; override this method to differentiate the menu items.- Parameters:
ps- the property sheet to use in the Properties option.- Returns:
- the popup menu.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG