Examples of Anchor


Examples of com.dianping.cat.home.nettopo.entity.Anchor

    NetGraph to = new NetGraph();
    for (NetTopology netTopologyA : netGraph.getNetTopologies()) {
      NetTopology netTopologyB = new NetTopology();

      for (Anchor anchorA : netTopologyA.getAnchors()) {
        Anchor anchorB = new Anchor();
        anchorB.setName(anchorA.getName());
        anchorB.setX(anchorA.getX());
        anchorB.setY(anchorA.getY());
        netTopologyB.addAnchor(anchorB);
      }

      for (Switch switchA : netTopologyA.getSwitchs()) {
        Switch switchB = new Switch();
View Full Code Here

Examples of com.dodo.blog.ui.component.input.Anchor

                addColumn( article.isPublished().toString() );
                addColumn( article.getCreatedDate(), FormatUtil.DATE_FORMAT_MONTH_YEAR );
                addColumn( article.getUpdatedDate(), FormatUtil.DATE_FORMAT_MONTH_YEAR );
                addColumn(
                        publish,
                        new Anchor( "edit", localize( "button.edit" ), ArticleEdit.class ).addParameter( ArticleEdit.ARTICLE_ID, article.getId() ),
                        new Button( "delete", article.getId().toString(), localize( "button.delete" ) ).setAjaxMethod( DELETE_ARTICLE_METHOD )
                );
            }
        };
        add( table );

        add( new Anchor( "new-article", localize( "button.new" ), ArticleEdit.class ) );
    }
View Full Code Here

Examples of com.evelopers.unimod.glayout.fast.extensions.Anchor

            int[] xpoints     = new int[3];
            int[] ypoints     = new int[3];
            SimpleVertex src  = e.getSource();
            SimpleVertex dest = e.getTarget();
            Anchor srca       = e.getEdgeext()
                                 .getSrcAnchor();
            Anchor targeta = e.getEdgeext()
                              .getTargetAnchor();

            Point2D spoint = src.getVertexext()
                                .getAnchorPoint(srca);
View Full Code Here

Examples of com.google.collide.shared.document.anchor.Anchor

   * @param height the height in pixels of the spacer
   */
  Spacer createSpacer(LineInfo lineInfo, int height, Buffer buffer, String cssClass) {
    int lineNumber = lineInfo.number();
    // create an anchor on the current line
    Anchor anchor =
        document.getAnchorManager().createAnchor(SPACER_ANCHOR_TYPE, lineInfo.line(), lineNumber,
            AnchorManager.IGNORE_COLUMN);
    anchor.setRemovalStrategy(RemovalStrategy.SHIFT);
    // account for the height of the line the spacer is on
    Spacer spacer = new Spacer(anchor, height, this, buffer, cssClass);
    spacers.add(spacer);
    totalSpacerHeight += height;
    invalidateLineNumberAndFollowing(lineNumber);
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.ILayoutPanelInfo.Anchor

    anchor_removeEmptyLine_inEditor();
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // initial anchor
    {
      Anchor anchor = frame.getAnchor(button, horizontal);
      assertSame(initialAnchor, anchor);
      assertNotNull(anchor.getImage(horizontal));
      assertNotNull(anchor.getSmallImage(horizontal));
    }
    // set new anchor
    frame.command_ANCHOR(button, horizontal, newAnchor);
    anchor_assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
        "    {",
        "      Button button = new Button();",
        "      rootPanel.add(button);",
        "      " + getAnchorLine(expectedDesc),
        "    }",
        "  }",
        "}");
    {
      Anchor anchor = frame.getAnchor(button, horizontal);
      assertSame(newAnchor, anchor);
    }
  }
View Full Code Here

Examples of com.google.gwt.topspin.ui.client.Anchor

    if (ClientConfig.isMockMode()) {
      new MockTestDataPanel().addButtonToController(resources, this,
          controllerContainer);
    }

    final Anchor helpButton = new Anchor(controllerContainer);
    final Element helpButtonElem = helpButton.getElement();
    helpButton.setStyleName(css.helpButton());
    helpButton.setHref(Constants.HELP_URL);
    helpButtonElem.setAttribute("title", "Help");
    helpButtonElem.setAttribute("target", "_blank");
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.Anchor

      public String getValue(UserProxy user) {
        return user.getUsername();
      }
      @Override
      public void render(Context context, UserProxy object, SafeHtmlBuilder sb) {
        Anchor anchor = new Anchor(SafeHtmlUtils.htmlEscape(getValue(object)));
        sb.append(SafeHtmlUtils.fromTrustedString(anchor.toString()));
      };
    }, i18n.user_username());
        table.setColumnWidth(columnNumber++, "25%");
       
        paths.add("firstName");
        paths.add("lastName");
        table.addColumn(new CustomColumn<UserProxy, String>("firstName", true) {

      @Override
      public String getValue(UserProxy user) {
        return user.getFirstName() + " " + user.getLastName();
      }
    }, i18n.activeUsers_fullName());
        table.setColumnWidth(columnNumber++, "34%");
       
        paths.add("email");
        table.addColumn(new CustomColumn<UserProxy, String>("email", true) {

      @Override
      public String getValue(UserProxy user) {
        return user.getEmail();
      }
      @Override
      public void render(Context context, UserProxy object, SafeHtmlBuilder sb) {
        String email = object.getEmail();
        Anchor anchor = new Anchor(SafeHtmlUtils.htmlEscape(email), "mailto:" + email);
        sb.append(SafeHtmlUtils.fromTrustedString(anchor.toString()));
      };     
    }, i18n.user_email());          
        table.setColumnWidth(columnNumber++, "25%");
       
        paths.add("enabled");
View Full Code Here

Examples of com.google.gwt.user.client.ui.Anchor

        signupParaElement.setInnerHTML(i18n.login_signup("#" + SignUpPlace.PREFIX + ":"));

        final HTMLPanel passwordHintHtml = new HTMLPanel(i18n.login_passwordHint());
        final NodeList<Element> anchors = passwordHintHtml.getElement().getElementsByTagName("a");
        final Element a = anchors.getItem(0);
        final Anchor link = new Anchor(a.getInnerHTML());
        link.getElement().setId("signUpLink");
        link.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(final ClickEvent event) {
                delegate.onPasswordHintClick();
            }
        });
        passwordHintHtml.addAndReplaceElement(link, a);
        try {// fails on dev mode..
            HTMLPanel.wrap(passwordHintParaElement).add(passwordHintHtml);
        } catch (final Throwable e) {
            e.printStackTrace();
        }

        final HTMLPanel passwordRecoveryParaHtml = new HTMLPanel(i18n.updatePassword_requestRecoveryTokenLink());
        final Element passwordRecoveryA = passwordRecoveryParaHtml.getElement().getElementsByTagName("a").getItem(0);
        final Anchor passwordRecoveryLink = new Anchor(passwordRecoveryA.getInnerHTML());
        passwordRecoveryLink.getElement().setId("requestRecoveryTokenLink");
        passwordRecoveryLink.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(final ClickEvent event) {
                delegate.onRequestPasswordRecoveryClick();
            }
View Full Code Here

Examples of com.google.gwt.user.client.ui.Anchor

      // The short description label
      Label msgLabel = new Label(m.getMsg());
      hpanel.add(msgLabel);
      msgLabel.getElement().getParentElement().getStyle().setProperty("border", "none");
      if (m.getAnchor() != null) {
        Anchor showElement = new Anchor(L10n.get("show"), "/alerts/#" + m.getAnchor());
        hpanel.add(showElement);
        showElement.getElement().getParentElement().getStyle().setProperty("border", "none");
      }

      if (m.isCanDismiss()) {
        // The hide link, it will hide the message if clicked on
        Anchor hideElement = new Anchor(L10n.get("hide"));
        hideElement.addMouseDownHandler(new MouseDownHandler() {
          @Override
          public void onMouseDown(MouseDownEvent event) {
            // Only send a request if the message is originated from the server
            if (m.getAnchor() != null) {
              FreenetRequest.sendRequest(UpdaterConstants.dismissAlertPath, new QueryParameter("anchor", m.getAnchor()), new RequestCallback() {
                @Override
                public void onResponseReceived(Request request, Response response) {
                  // When a response is got, the server is already removed the message. We can remove it too safely
                  removeMessage(m);
                }

                @Override
                public void onError(Request request, Throwable exception) {
                  // Don't do anything. If the server removed the message, it will push the change, if not, the user will try again
                }
              });
            } else {
              // If it is originated from the client, then simply hide it
              messages.remove(m);
              redrawMessages();
            }
          }
        });
        hpanel.add(hideElement);
        hideElement.getElement().getParentElement().getStyle().setProperty("border", "none");
      }

      // Adds the message to the panel
      messagesPanel.add(hpanel);
    }
View Full Code Here

Examples of com.google.gwt.user.client.ui.Anchor

    this.messagePanel.add(new Label(errorCommand.getDescription()));
    ScrollPanel detailPanel = new ScrollPanel();
    detailPanel.setWidth("480px");
    detailPanel.setHeight("60px");
    detailPanel.add(new Label("Error details:\n\n" + error.getMessage()));
    Anchor issueTrackerLink = new Anchor("Submit to the issue tracker", "http://code.google.com/p/latex-lab/issues/entry", "_blank");
    this.messagePanel.add(issueTrackerLink);
    this.messagePanel.add(detailPanel);
  }
View Full Code Here
TOP
Copyright © 2015 www.massapi.com. 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.