当前位置: 首页>>代码示例>>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;未经允许,请勿转载。