Example usage for com.google.gwt.user.client.ui Anchor setName

List of usage examples for com.google.gwt.user.client.ui Anchor setName

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui Anchor setName.

Prototype

public void setName(String name) 

Source Link

Usage

From source file:com.edgenius.wiki.gwt.client.page.PageMain.java

License:Open Source License

public void initContentPanel() {
    //clean navbar
    List<NavItem> linkList = new ArrayList<NavItem>();
    linkList.add(new NavItem(Msg.consts.dashboard(), "", null));
    refreshNavbar(linkList);//from  ww  w  . j  a  v a2s .co  m

    //location
    location = new LocationButton(this, false);
    printBtn = new PrintButton(this, false);

    Anchor topAnchor = new Anchor();
    topAnchor.setName(PAGE_TOP_ANCHOR_NAME);
    addBeforeNav(topAnchor);

    addBeforeNav(location);
    printSep = addAfterLogin(printBtn);
    //this will be reset when page filled: according to PageAttribute.NO_PRINT
    setPrintBtnVisible(false);

    History.addValueChangeHandler(this);

    downloadFrm.setVisible(false);
    downloadFrm.setSize("0px", "0px");
    DOM.setStyleAttribute(downloadFrm.getElement(), "border", "0px");
    DOM.setStyleAttribute(downloadFrm.getElement(), "position", "absolute");

    loadingPanel.addWidget(downloadFrm);
    deck.insert(loadingPanel, LOADING_PANEL);
    deck.insert(viewPanel, VIEW_PANEL);
    deck.insert(editPanel, EDIT_PANEL);
    deck.insert(previewPanel, PREVIEW_PANEL);
    deck.insert(dashboardPanel, DASHBOARD_PANEL);
    deck.insert(editSidebarPanel, EDIT_SIDEBAR_PANEL);
    deck.insert(editTemplatePanel, EDIT_TEMPLATE_PANEL);

    this.setSideMenuPanel(ClientConstants.RIGHT, sidebar);

    deck.setStyleName(Css.MAIN_PANEL);

    RootPanel.get(CONTENT_PANEL).add(deck);

    exposeJSMethods();
}

From source file:com.google.gwt.maps.testing.client.maps.PolylineMapWidget.java

License:Apache License

private void draw() {

    pWidget.clear();/* ww  w  .  j a  v a  2 s .co  m*/

    Anchor sectionAnchor = new Anchor();
    sectionAnchor.setName("polylineExample");
    pWidget.add(sectionAnchor);

    pWidget.add(new HTML("<br>Map with Polyline. 3 lines of 12 points, 12 points and 165 points."));

    drawMap();
    drawPolyline();
}

From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java

private void addEditRegularScheduleColumnAllRow(FlexTable ft) {
    for (int i = 1; i < ft.getRowCount(); i++) {
        Anchor edit = new Anchor("Edit");
        ft.setWidget(i, ft.getCellCount(i), edit);
        edit.setName(ft.getText(i, 0));
        setEditRegularScheduleClickHandler(edit);
    }//from  ww w  .  j a v a  2s  .c  o m
}

From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java

private void addEditSpecialScheduleColumnAllRow(FlexTable ft) {
    for (int i = 1; i < ft.getRowCount(); i++) {
        Anchor edit = new Anchor("Edit");
        ft.setWidget(i, ft.getCellCount(i), edit);
        edit.setName(ft.getText(i, 0));
        setEditSpecialScheduleClickHandler(edit);
    }//ww  w.j  ava2s  .c o  m
}

From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java

private void addEditRuleColumnAllRow(FlexTable ft) {
    for (int i = 1; i < ft.getRowCount(); i++) {
        final Anchor edit = new Anchor("Edit");
        ft.setWidget(i, ft.getCellCount(i), edit);
        edit.setName(ft.getText(i, 0));
        setEditRuleClickHandler(edit);//from   www  . j  ava  2s . com
    }
}

From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java

private void addEditRuleColumnLatestRow(FlexTable ft) {

    int lastRow = ft.getRowCount() - 1;

    final Anchor edit = new Anchor("Edit");
    ft.setWidget(lastRow, ft.getCellCount(lastRow), edit);
    edit.setName(ft.getText(lastRow, 0));
    setEditRuleClickHandler(edit);//from  w  w w .  java 2  s  .  co m
}

From source file:com.google.gwt.sample.stockwatcher.client.SensorActuatorResponsePage.java

private void addEditResponseColumnAllRow(FlexTable ft) {
    for (int i = 1; i < ft.getRowCount(); i++) {
        final Anchor edit = new Anchor("Edit");
        ft.setWidget(i, ft.getCellCount(i), edit);
        edit.setName(ft.getText(i, 0));
        setEditResponseClickHandler(edit);
    }/*from  w w w .  j a  v  a  2s  .  c  o  m*/
}

From source file:com.google.gwt.sample.stockwatcher.client.UserNotificationPage.java

private void addUnsubscribeControllerColumnAllRow(FlexTable ft) {
    for (int i = 1; i < ft.getRowCount(); i++) {
        if (ft.getText(i, 0).equals(noSubscription)) {
            break;
        }/*from  ww  w  .jav a 2  s  .c o m*/
        Anchor Unsubscribe = new Anchor("Unsubscribe");
        ft.setWidget(i, ft.getCellCount(i), Unsubscribe);
        Unsubscribe.setName(ft.getText(i, 0));
        setUnsubscribeControllerClickHandler(Unsubscribe);
    }
}

From source file:com.google.gwt.sample.stockwatcher.client.UserNotificationPage.java

private void addUnsubscribeSensorColumnAllRow(FlexTable ft) {
    for (int i = 1; i < ft.getRowCount(); i++) {
        if (ft.getText(i, 0).equals(noSubscription)) {
            break;
        }//from w ww  . ja  v  a 2  s.  c  om
        Anchor Unsubscribe = new Anchor("Unsubscribe");
        ft.setWidget(i, ft.getCellCount(i), Unsubscribe);
        Unsubscribe.setName(ft.getText(i, 0));
        setUnsubscribeSensorClickHandler(Unsubscribe);
    }
}

From source file:com.google.gwt.sample.stockwatcher.client.UserNotificationPage.java

private void addUnsubscribeActuatorColumnAllRow(FlexTable ft) {
    for (int i = 1; i < ft.getRowCount(); i++) {
        if (ft.getText(i, 0).equals(noSubscription)) {
            break;
        }/*  ww  w .  j  a  v  a  2 s .c  o  m*/
        Anchor Unsubscribe = new Anchor("Unsubscribe");
        ft.setWidget(i, ft.getCellCount(i), Unsubscribe);
        Unsubscribe.setName(ft.getText(i, 0));
        setUnsubscribeActuatorClickHandler(Unsubscribe);
    }
}