Tabnine Logo
IConnector
Code IndexAdd Tabnine to your IDE (free)

How to use
IConnector
in
com.ebmwebsourcing.geasytools.geasyui.api.connectable

Best Java code snippets using com.ebmwebsourcing.geasytools.geasyui.api.connectable.IConnector (Showing top 20 results out of 315)

origin: com.ebmwebsourcing.petalsbpm/bpmn-diagram

@Override
public boolean isConform(IDiagramElementView diagramElementView) {
  
  IConnector connector = (IConnector) diagramElementView;
  
  if (connector.getSource()==null || connector.getTarget()==null){
    return false;
  }
  
  return true;
}
origin: com.ebmwebsourcing.geasytools/geasy-ui

private void refreshConnectors(){
  
  for(IUIElement el:uiPanel.getUIElements().values()){
    
    if (el instanceof IConnector){
      
      IConnector connector = (IConnector) el;
      connector.refresh();
      connector.show();
    }
    
  }
  
}

origin: com.ebmwebsourcing.geasytools/geasy-ui

@Override
public void attachDefaultHandlers() {
  this.connector.addMouseMoveHandler(new MouseMoveHandler() {
  this.connector.addMouseDownHandler(new MouseDownHandler() {
  this.connector.addDoubleClickHandler(new DoubleClickHandler() {
origin: com.ebmwebsourcing.geasytools/geasy-ui

  if (incomingC.getTarget().equals(connectable)) incomingC.setTarget(null);
  for(IConnectorPoint m:incomingC.getAllConnectorPoints()){
  if (outgoingC.getSource().equals(connectable)) outgoingC.setSource(null);
  for(IConnectorPoint m:outgoingC.getAllConnectorPoints()){
if (connector.getSource()!=null) connector.getSource().getOutgoingConnectors().remove(connector);
if (connector.getTarget()!=null) connector.getTarget().getIncommingConnectors().remove(connector);
origin: com.ebmwebsourcing.geasytools.diagrameditor/geasy-diagram-editor

IConnectorPoint previousPoint = connector.getConnectorStartPoint();
IConnectorPoint nextPoint = connector.getConnectorEndPoint();
    IConnectorPoint pointToAdd = connector.createConnectorPoint((int)actualWayPoint.getX(), (int)actualWayPoint.getY());
    connector.addIntermediateConnectorPoint(pointToAdd, previousPoint, nextPoint);
  connector.connect(connectableSourceElement, connectableTargetElement);						
origin: com.ebmwebsourcing.geasytools/geasy-ui

@Override
public void onStart(IDragStartEvent event) {
  this.getConnector().refresh();
  
  //if current point is already attached => detach it
  if (this.getConnectedToMagnet()!=null){
    this.getConnectedToMagnet().removeConnectorPoint(this);
    
  
    //remove incoming or outgoing connector
    this.getConnectedToMagnet().getConnectableElement().getIncommingConnectors().remove(this.getConnector());			
    this.getConnectedToMagnet().getConnectableElement().getOutgoingConnectors().remove(this.getConnector());
    
    this.setConnectedToMagnet(null);
    
    if (this instanceof IConnectorStart){
      
      this.getConnector().setSource(null);
    
    }else if (this instanceof IConnectorEnd){
    
      this.getConnector().setTarget(null);
    
    }
    
    
  }
  
}

origin: com.ebmwebsourcing.geasytools/geasy-ui

@Override
public void onMove(IDragMoveEvent event) {
  this.getConnector().refresh();
}

origin: com.ebmwebsourcing.geasytools/geasy-ui

for(IConnectorPoint p : (HashSet<IConnectorPoint>)connector.getAllConnectorPoints()){
connector.refresh();
origin: com.ebmwebsourcing.petalsbpm/bpmn-diagram

@Override
public boolean isConform(IDiagramElementView diagramElementView) {
  
  Participant connectable = (Participant) diagramElementView;
  
  int nb = 0;
  for(IConnector connector : connectable.getOutgoingConnectors()){
    
    if (connector instanceof Association && connector.getTarget() instanceof Message){
      nb++;
    }
    
  }
  
  if (nb>1){
    return false;
  }
  
  return true;
}
origin: com.ebmwebsourcing.petalsbpm/bpmn-diagram

IDiagramElementView source = (IDiagramElementView) connector.getSource();
origin: com.ebmwebsourcing.geasytools/geasy-ui

public ClosestPoints getClosestPoints(Point point) {
  IConnectorPoint minPoint = this.connector.getConnectorStartPoint();
  IConnectorPoint currentPoint = minPoint;
  while (currentPoint.getNextPoint() != null) {
    Point previousPoint = new Point(currentPoint.getAbsoluteLeft(),currentPoint.getAbsoluteTop());
    Point nextPoint        = new Point(currentPoint.getNextPoint().getAbsoluteLeft(),currentPoint.getNextPoint().getAbsoluteTop());
    
    Region            r    = new Region(previousPoint,nextPoint);
    
    if (r.contains(point)){
      
      minPoint = currentPoint;
      
      break;
    }
    
    currentPoint = currentPoint.getNextPoint();
  }
  IConnectorPoint maxPoint = minPoint.getNextPoint();
  ClosestPoints closesPoints = new ClosestPoints(minPoint, maxPoint);
  return closesPoints;
}
origin: com.ebmwebsourcing.geasytools.diagrameditor/geasy-diagram-editor

  @Override
  public void execute() {
    
    IDiagramElementView connector = (IDiagramElementView) diagramView.getElementFactory().getElement(new FakeDragProxy(connectorClazz));	
    
    assert connector!=null;
    assert (source.getDiagramElement() instanceof IConnectable);
    assert (target.getDiagramElement() instanceof IConnectable);
    
    if (connector instanceof IConnector){
      
      ((IConnector) connector).connect((IConnectable)source.getDiagramElement(),(IConnectable)target.getDiagramElement());
      
    }else{
      
      throw new IllegalStateException(connector + " is not instance of "+IConnector.class); 
      
    }
    
  }
});
origin: com.ebmwebsourcing.geasytools/geasy-ui

  cp.getConnector().setSource(connectableElement);
  cp.getConnector().setTarget(connectableElement);
cp.getConnector().refresh();
origin: com.ebmwebsourcing.geasytools/geasy-ui

@Override
public void onStop(IDragStopEvent event) {
  this.getConnector().refresh();
}

origin: com.ebmwebsourcing.petalsbpm/bpmn-diagram

@Override
public boolean isConform(IDiagramElementView diagramElementView) {
  
  
  Participant connectable = (Participant) diagramElementView;
  
  if (connectable.getOutgoingConnectors().size()>0){
    
    IConnector connector = connectable.getOutgoingConnectors().iterator().next();
    
    if (connector instanceof Association){
      
      IConnectableElement target = connector.getTarget();
      
      if (target instanceof Message){
        
        Message message = (Message) target;
        
        if (connectable.isInitiating()!=message.isInitiating()){
          return false;
        }
        
      }
      
    }
    
  }
  
  return true;
}
origin: com.ebmwebsourcing.petalsbpm/bpmn-diagram

@Override
public boolean isConform(IDiagramElementView diagramElementView) {
  
  IConnector connector = (IConnector) diagramElementView;
  
  IDiagramElementView source = (IDiagramElementView) connector.getSource();
  IDiagramElementView target = (IDiagramElementView) connector.getTarget();
  
  if (source==target){
    return false;
  }
  
  return true;
}
origin: com.ebmwebsourcing.petalsbpm/bpmn-diagram

p.getConnector().refresh();
origin: com.ebmwebsourcing.petalsbpm/bpmn-diagram

IDiagramElementView source = (IDiagramElementView) connector.getSource();
IDiagramElementView target = (IDiagramElementView) connector.getTarget();
origin: com.ebmwebsourcing.petalsbpm/bpmn-diagram

p.getConnector().refresh();
origin: com.ebmwebsourcing.petalsbpm/bpmn-diagram

IDiagramElementView source = (IDiagramElementView) connector.getSource();
IDiagramElementView target = (IDiagramElementView) connector.getTarget();
com.ebmwebsourcing.geasytools.geasyui.api.connectableIConnector

Most used methods

  • getConnectorStartPoint
  • getSource
  • getTarget
  • refresh
  • addDoubleClickHandler
  • addIntermediateConnectorPoint
  • addMouseDownHandler
  • addMouseMoveHandler
  • connect
  • createConnectorPoint
  • fireEvent
  • getAllConnectorPoints
  • fireEvent,
  • getAllConnectorPoints,
  • getConnectorEndPoint,
  • getId,
  • getUIPanel,
  • hide,
  • removeIntermediateConnectorPoint,
  • setSource,
  • setTarget,
  • show

Popular in Java

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JOptionPane (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Join (org.hibernate.mapping)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now