com.ebmwebsourcing.gwt.raphael.client.diagram.connector
Class DiagramConnector

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.ebmwebsourcing.gwt.raphael.client.diagram.connector.DiagramConnector
All Implemented Interfaces:
com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener

public class DiagramConnector
extends com.google.gwt.user.client.ui.Widget


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
static int X2_DISTANCE
           
static int Y2_DISTANCE
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DiagramConnector(java.lang.String id, int x1, int y1)
          Default constructor, with default begin point and end point
DiagramConnector(java.lang.String id, com.ebmwebsourcing.gwt.raphael.client.core.SVGElement beginPoint, com.ebmwebsourcing.gwt.raphael.client.core.SVGElement endPoint)
          Constructor to set a specific begin point and a specif end point svg Element
 
Method Summary
 void addListener(DiagramConnectorListener listener)
           
 void connect(Connectable source, Connectable target)
          Connect connectable target and source together once the connector is loaded
 ConnectorBeginPoint getBeginPoint()
           
 ConnectorEndPoint getEndPoint()
           
 java.lang.String getId()
           
 com.ebmwebsourcing.gwt.raphael.client.core.Line getLine()
           
 java.util.ArrayList<DiagramConnectorListener> getListeners()
           
 Connectable getSource()
           
 Connectable getTarget()
           
 void hide()
           
 void init()
           
 void onLoad()
           
 void refresh()
           
 void remove()
           
 void setBackgroundColor(java.lang.String color)
           
 void setBorderColor(java.lang.String color)
           
 void setDiagramPanel(DiagramPanel diagramPanel)
           
 void setId(java.lang.String id)
           
 void setSource(Connectable source)
           
 void setTarget(Connectable target)
           
 void show()
           
protected  void update(int x1, int y1, int x2, int y2)
           
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

X2_DISTANCE

public static int X2_DISTANCE

Y2_DISTANCE

public static int Y2_DISTANCE
Constructor Detail

DiagramConnector

public DiagramConnector(java.lang.String id,
                        int x1,
                        int y1)
Default constructor, with default begin point and end point

Parameters:
x1 -
y1 -

DiagramConnector

public DiagramConnector(java.lang.String id,
                        com.ebmwebsourcing.gwt.raphael.client.core.SVGElement beginPoint,
                        com.ebmwebsourcing.gwt.raphael.client.core.SVGElement endPoint)
Constructor to set a specific begin point and a specif end point svg Element

Parameters:
beginPoint -
endPoint -
Method Detail

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)

connect

public void connect(Connectable source,
                    Connectable target)
Connect connectable target and source together once the connector is loaded

Parameters:
target -
source -

setBorderColor

public void setBorderColor(java.lang.String color)

setBackgroundColor

public void setBackgroundColor(java.lang.String color)

remove

public void remove()

addListener

public void addListener(DiagramConnectorListener listener)

getListeners

public java.util.ArrayList<DiagramConnectorListener> getListeners()

init

public void init()

getLine

public com.ebmwebsourcing.gwt.raphael.client.core.Line getLine()

update

protected void update(int x1,
                      int y1,
                      int x2,
                      int y2)

getBeginPoint

public ConnectorBeginPoint getBeginPoint()

getEndPoint

public ConnectorEndPoint getEndPoint()

setDiagramPanel

public void setDiagramPanel(DiagramPanel diagramPanel)

refresh

public void refresh()

onLoad

public void onLoad()
Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget

getSource

public Connectable getSource()

setSource

public void setSource(Connectable source)

getTarget

public Connectable getTarget()

setTarget

public void setTarget(Connectable target)

hide

public void hide()

show

public void show()


Copyright © 2010 eBM WebSourcing. All Rights Reserved.