Package pl.tecna.gwt.connectors.client.elements

Examples of pl.tecna.gwt.connectors.client.elements.SectionDecoration


    return Keyboard.getInstance().removeListener(keyboardListener);
  }

  public Connector createConnector(int startLeft, int startTop, int endLeft, int endTop, EndPoint endEndPoint,
      ConnectorStyle style) {
    SectionDecoration endDecoration;
    if (style == ConnectorStyle.SOLID) {
      endDecoration = new SectionDecoration(DecorationType.ARROW_SOLID);
    } else {
      endDecoration = new SectionDecoration(DecorationType.ARROW_LINE);
    }
    return new Connector(startLeft, startTop, endLeft, endTop, null, endDecoration, endEndPoint, Diagram.this, style);
  }
View Full Code Here


    RootPanel.get().add(viewPanel, 0, 0);
   
    final Diagram diagram = new Diagram(boundaryPanel);

    boundaryPanel.add(new Label("Connectors example for GWT 2.4"), 10, 2);
    Connector connector1 = new Connector(50, 80, 150, 200, new SectionDecoration(DecorationType.ARROW_SOLID), new SectionDecoration(DecorationType.ARROW_SOLID));
    connector1.showOnDiagram(diagram);

    ArrayList<CornerPoint> cp = new ArrayList<CornerPoint>();
    cp.add(new CornerPoint(370, 200));
    cp.add(new CornerPoint(370, 120));
    cp.add(new CornerPoint(270, 120));
    SectionDecoration startDecoration = new SectionDecoration(DecorationType.ARROW_LINE);
    SectionDecoration endDecoration = new SectionDecoration(
        new Image("http://code.google.com/images/code_sm.png"),
        new Image("http://code.google.com/images/code_sm.png"));
    Connector connector2 = new Connector(350, 200, 270, 80, cp, startDecoration, endDecoration);
    connector2.style = ConnectorStyle.DASHED;
    connector2.showOnDiagram(diagram);

    Connector connector3 = new Connector(450, 120, 500, 80, new SectionDecoration(DecorationType.ARROW_SOLID), new SectionDecoration(DecorationType.ARROW_SOLID));
    connector3.style = ConnectorStyle.DOTTED;
    connector3.showOnDiagram(diagram);

    FocusPanel diamond = new FocusPanel();
    Image img = AbstractImagePrototype.create(ConnectorsBundle.INSTANCE.diamondImg()).createImage();
View Full Code Here

TOP

Related Classes of pl.tecna.gwt.connectors.client.elements.SectionDecoration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.