當前位置: 首頁>>代碼示例>>Java>>正文


Java Anchor.addStyleName方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.Anchor.addStyleName方法的典型用法代碼示例。如果您正苦於以下問題:Java Anchor.addStyleName方法的具體用法?Java Anchor.addStyleName怎麽用?Java Anchor.addStyleName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.Anchor的用法示例。


在下文中一共展示了Anchor.addStyleName方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PageIndexWidget

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
/**
 * THe basic constructor
 * @param searchData the original search object with the pageIndex field indicating he currently selected page
 * @param pageIndex the page index is the index for which this page-index widget is created
 * @param isEnabled true to create the widget in the enabled mode, false in the disabled
 * @param siteSectionPrefix the history token site section prefix
 */
public PageIndexWidget( final ForumSearchData searchData, final int pageIndex,
						final boolean isEnabled, final String siteSectionPrefix ) {
	this.isCurrentPage = (searchData.pageIndex == pageIndex );
	//Create a copy in order to be able to set the proper search object index and not spoil the original search object
	final ForumSearchData localSearchData = searchData.clone();
	localSearchData.pageIndex = pageIndex;
	hyperLink = new Anchor("" + pageIndex, CommonResourcesContainer.URI_HASH_SYMBOL + siteSectionPrefix + localSearchData.serialize(encoder));
	if( isCurrentPage ) {
		hyperLink.addStyleName( CommonResourcesContainer.CURRENT_PAGE_INDEX_STYLE );
		//the current page index widget is always disabled
		setEnabled( false );
	} else {
		//Set the link as enabled/disabled
		setEnabled( isEnabled );
	}
	
	initWidget(hyperLink);
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:26,代碼來源:PageIndexWidget.java

示例2: AlertStackWidget

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public AlertStackWidget() {
	alertWidgets = new ArrayList<AlertWidget>();
	VerticalPanel rootPanel = new VerticalPanel();
	rootPanel.setWidth("100%");
	alertsPanel = new VerticalPanel();
	alertsPanel.setWidth("100%");
	rootPanel.add(alertsPanel);
	showHideAnchor = new Anchor(
			I18nUtils.tr(visible ? "hide.alerts" : "show.alerts"));
	showHideAnchor.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			visible = !visible;
			alertsPanel.setVisible(visible);
			showHideAnchor.setText(
					I18nUtils.tr(visible ? "hide.alerts" : "show.alerts"));
		}
	});
	showHideAnchor.addStyleName("alert-showhide-link");
	showHideAnchor.setVisible(false);
	rootPanel.add(showHideAnchor);
	initWidget(rootPanel);
}
 
開發者ID:mecatran,項目名稱:OpenTripPlanner-client-gwt,代碼行數:24,代碼來源:AlertStackWidget.java

示例3: addLink

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public void addLink(String label, final String target) {
    final Anchor anchor = new Anchor(new SafeHtmlBuilder().appendEscapedLines(label).toSafeHtml());
    // this link relies on the org.apache.cordova.inappbrowser which offers secure viewing of external html pages and handles user navigation such as back navigation.
    // in this case the link will be opend in the system browser rather than in the cordova application.
    outerPanel.add(anchor);
    final SingleShotEventListner singleShotEventListner = new SingleShotEventListner() {

        @Override
        protected void singleShotFired() {
            Window.open(target, "_system", "");
        }
    };
    anchor.addClickHandler(singleShotEventListner);
    anchor.addTouchStartHandler(singleShotEventListner);
    anchor.addTouchMoveHandler(singleShotEventListner);
    anchor.addTouchEndHandler(singleShotEventListner);
    anchor.addStyleName("pageLink");
}
 
開發者ID:languageininteraction,項目名稱:GraphemeColourSynaesthesiaApp,代碼行數:19,代碼來源:ComplexView.java

示例4: GlobalChartPanel

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public GlobalChartPanel(String title) {
	mainPanel = new FramedPanel();
	mainPanel.setHeadingText(title);
	mainPanel.setCollapsible(true);

	Anchor officialAnchor = new Anchor(false);
	officialAnchor.addStyleName("officialAnchor");
	officialAnchor.setText("Official");
	officialAnchor.setHref("http://www.middlecoin.com");
	officialAnchor.setTarget("_blank");
	mainPanel.getHeader().addTool(officialAnchor);

	lastRefreshLabel = new RefreshLabel();
	mainPanel.getHeader().addTool(lastRefreshLabel);

	contentPanel = new VerticalLayoutContainer();
	contentPanel.addStyleName("whiteBackground");
	mainPanel.add(contentPanel);

	initBTCChart();
	initPowerChart();
}
 
開發者ID:Stratehm,項目名稱:multipool-stats-backend,代碼行數:23,代碼來源:GlobalChartPanel.java

示例5: AddressChartPanel

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public AddressChartPanel(String title, boolean isTotal) {
	mainPanel = new FramedPanel();
	mainPanel.setHeadingText(title);
	mainPanel.setCollapsible(true);

	if (!isTotal) {
		Anchor officialAnchor = new Anchor(false);
		officialAnchor.addStyleName("officialAnchor");
		officialAnchor.setText("Official");
		officialAnchor.setHref("http://www.middlecoin.com/reports/" + title + ".html");
		officialAnchor.setTarget("_blank");
		mainPanel.getHeader().addTool(officialAnchor);
	}

	lastRefreshLabel = new RefreshLabel();
	mainPanel.getHeader().addTool(lastRefreshLabel);

	contentPanel = new VerticalLayoutContainer();
	contentPanel.addStyleName("whiteBackground");
	mainPanel.add(contentPanel);

	initBTCChart();
	initPowerChart();
}
 
開發者ID:Stratehm,項目名稱:multipool-stats-backend,代碼行數:25,代碼來源:AddressChartPanel.java

示例6: GlobalChartPanel

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public GlobalChartPanel(String title) {
	mainPanel = new FramedPanel();
	mainPanel.setHeadingText(title);
	mainPanel.setCollapsible(true);

	Anchor officialAnchor = new Anchor(false);
	officialAnchor.addStyleName("officialAnchor");
	officialAnchor.setText("Official");
	officialAnchor.setHref("http://coinshift.com/stats");
	officialAnchor.setTarget("_blank");
	mainPanel.getHeader().addTool(officialAnchor);

	lastRefreshLabel = new RefreshLabel();
	mainPanel.getHeader().addTool(lastRefreshLabel);

	contentPanel = new VerticalLayoutContainer();
	contentPanel.addStyleName("whiteBackground");
	mainPanel.add(contentPanel);

	initBTCChart();
	initPowerChart();
}
 
開發者ID:Stratehm,項目名稱:multipool-stats-backend,代碼行數:23,代碼來源:GlobalChartPanel.java

示例7: AddressChartPanel

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public AddressChartPanel(String title, boolean isTotal) {
	mainPanel = new FramedPanel();
	mainPanel.setHeadingText(title);
	mainPanel.setCollapsible(true);

	if (!isTotal) {
		Anchor officialAnchor = new Anchor(false);
		officialAnchor.addStyleName("officialAnchor");
		officialAnchor.setText("Official");
		officialAnchor.setHref("http://coinshift.com/account/" + title);
		officialAnchor.setTarget("_blank");
		mainPanel.getHeader().addTool(officialAnchor);
	}

	lastRefreshLabel = new RefreshLabel();
	mainPanel.getHeader().addTool(lastRefreshLabel);

	contentPanel = new VerticalLayoutContainer();
	contentPanel.addStyleName("whiteBackground");
	mainPanel.add(contentPanel);

	initBTCChart();
	initPowerChart();
}
 
開發者ID:Stratehm,項目名稱:multipool-stats-backend,代碼行數:25,代碼來源:AddressChartPanel.java

示例8: GlobalChartPanel

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public GlobalChartPanel(String title) {
	mainPanel = new FramedPanel();
	mainPanel.setHeadingText(title);
	mainPanel.setCollapsible(true);

	Anchor officialAnchor = new Anchor(false);
	officialAnchor.addStyleName("officialAnchor");
	officialAnchor.setText("Official");
	officialAnchor.setHref("http://coinsolver.com/poolstats.php");
	officialAnchor.setTarget("_blank");
	mainPanel.getHeader().addTool(officialAnchor);

	lastRefreshLabel = new RefreshLabel();
	mainPanel.getHeader().addTool(lastRefreshLabel);

	contentPanel = new VerticalLayoutContainer();
	contentPanel.addStyleName("whiteBackground");
	mainPanel.add(contentPanel);

	initBTCChart();
	initPowerChart();
}
 
開發者ID:Stratehm,項目名稱:multipool-stats-backend,代碼行數:23,代碼來源:GlobalChartPanel.java

示例9: AddressChartPanel

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public AddressChartPanel(String title, boolean isTotal) {
	mainPanel = new FramedPanel();
	mainPanel.setHeadingText(title);
	mainPanel.setCollapsible(true);

	if (!isTotal) {
		Anchor officialAnchor = new Anchor(false);
		officialAnchor.addStyleName("officialAnchor");
		officialAnchor.setText("Official");
		officialAnchor.setHref("http://www.coinsolver.com/user-details.php?account=" + title);
		officialAnchor.setTarget("_blank");
		mainPanel.getHeader().addTool(officialAnchor);
	}

	lastRefreshLabel = new RefreshLabel();
	mainPanel.getHeader().addTool(lastRefreshLabel);

	contentPanel = new VerticalLayoutContainer();
	contentPanel.addStyleName("whiteBackground");
	mainPanel.add(contentPanel);

	initBTCChart();
	initPowerChart();
}
 
開發者ID:Stratehm,項目名稱:multipool-stats-backend,代碼行數:25,代碼來源:AddressChartPanel.java

示例10: GlobalChartPanel

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public GlobalChartPanel(String title) {
	mainPanel = new FramedPanel();
	mainPanel.setHeadingText(title);
	mainPanel.setCollapsible(true);

	Anchor officialAnchor = new Anchor(false);
	officialAnchor.addStyleName("officialAnchor");
	officialAnchor.setText("Official");
	officialAnchor.setHref("http://wafflepool.com");
	officialAnchor.setTarget("_blank");
	mainPanel.getHeader().addTool(officialAnchor);

	lastRefreshLabel = new RefreshLabel();
	mainPanel.getHeader().addTool(lastRefreshLabel);

	contentPanel = new VerticalLayoutContainer();
	contentPanel.addStyleName("whiteBackground");
	mainPanel.add(contentPanel);

	initBTCChart();
	initPowerChart();
}
 
開發者ID:Stratehm,項目名稱:multipool-stats-backend,代碼行數:23,代碼來源:GlobalChartPanel.java

示例11: getMouseOverhandler

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
private MouseOverHandler getMouseOverhandler(final Anchor anchor) {
	return new MouseOverHandler() {
		@Override
		public void onMouseOver(MouseOverEvent event) {
			anchor.addStyleName(ThemeStyles.get().style().borderBottom());
		}
	};
}
 
開發者ID:geowe,項目名稱:sig-seguimiento-vehiculos,代碼行數:9,代碼來源:AnchorBuilder.java

示例12: initFeedbackPanel

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
private void initFeedbackPanel() {
  playgroundUI.feedbackPanel.setHorizontalAlignment(
      HasHorizontalAlignment.ALIGN_RIGHT);
  for (Menu menu : Menu.values()) {
    Anchor menuItem = new Anchor();
    menuItem.setHTML(menu.description);
    menuItem.setHref(menu.url);
    menuItem.setWordWrap(false);
    menuItem.addStyleName("menuItems");
    playgroundUI.feedbackPanel.add(menuItem);
    playgroundUI.feedbackPanel.setCellWidth(menuItem, "100%");
  }
}
 
開發者ID:google,項目名稱:caja,代碼行數:14,代碼來源:PlaygroundView.java

示例13: setAnchorEnabled

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
/**
 * Update css of button.
 * @param anchor
 * @param enabled 
 */
private void setAnchorEnabled(Anchor anchor, boolean enabled) {
       anchor.setEnabled(enabled);
       if(enabled) {
           anchor.removeStyleName("offline-action-disabled");
       } else {
           anchor.addStyleName("offline-action-disabled");
       }
}
 
開發者ID:sigmah-dev,項目名稱:sigmah,代碼行數:14,代碼來源:OfflineBannerView.java

示例14: setAction

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
private void setAction(int row, int column, String text, int actionType, String id, String styleName) {
	formatCell(row, column);
	Anchor actionHyperlink = new Anchor(text);
	actionHyperlink.addClickHandler(this);
	if (styleName != null)
		actionHyperlink.addStyleName(styleName);
	itemFlexTable.setWidget(row, column, actionHyperlink);
	actionMap.put(actionHyperlink, actionType + id);
}
 
開發者ID:Rise-Vision,項目名稱:rva,代碼行數:10,代碼來源:PlaceholderItemListWidget.java

示例15: selectTag

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
/**
 * <p>selectTag</p>
 *
 * @param tag a {@link java.lang.String} object.
 */
public void selectTag(String tag) {
    for (Widget widget : tagPanel) {
        if (widget instanceof Anchor) {
            Anchor anchor = (Anchor)widget;
            if (tag != null && tag.replaceAll(" ", "&nbsp;").equals(anchor.getHTML())) {
                anchor.addStyleName(tagStyles.selectedTag());
            } else {
                anchor.removeStyleName(tagStyles.selectedTag());
            }
        }
    }
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:18,代碼來源:TagPanel.java


注:本文中的com.google.gwt.user.client.ui.Anchor.addStyleName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。