当前位置: 首页>>代码示例>>Java>>正文


Java HTML.addStyleName方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.HTML.addStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java HTML.addStyleName方法的具体用法?Java HTML.addStyleName怎么用?Java HTML.addStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.HTML的用法示例。


在下文中一共展示了HTML.addStyleName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initAppShare

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
/**
 * Helper method called by constructor to initialize the report section
 */
private void initAppShare() {
  final HTML sharePrompt = new HTML();
  sharePrompt.setHTML(MESSAGES.gallerySharePrompt());
  sharePrompt.addStyleName("primary-prompt");
  final TextBox urlText = new TextBox();
  urlText.addStyleName("action-textbox");
  urlText.setText(Window.Location.getHost() + MESSAGES.galleryGalleryIdAction() + app.getGalleryAppId());
  urlText.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      urlText.selectAll();
    }
  });
  appSharePanel.add(sharePrompt);
  appSharePanel.add(urlText);
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:20,代码来源:GalleryPage.java

示例2: DropDown

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public DropDown() {
    current = new FlexTable();
    current.addStyleName("datatable");
    itemlist = new FlexTable();
    dropdown = new PopupPanel(true);
    scroller = new ScrollPanel();
    scroller.add(itemlist);
    dropdown.add(scroller);
    down =new HTML(" ▼");
    down.addStyleName("current-item");
    initWidget(current);
    HTML load = new HTML("loading...");
    load.addStyleName("current-item");
    current.setWidget(0, 0, load);
    current.setWidget(0, 1, down);
    current.addClickHandler(show);
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:18,代码来源:DropDown.java

示例3: ImageUnitWidget

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public ImageUnitWidget(ImageUnit unit) {

		super();
		
		MaterialColumn imageColumn = new MaterialColumn();
		imageColumn.setGrid("s12");
		imageColumn.setTextAlign(TextAlign.CENTER);
			image = new MaterialImage();
		imageColumn.add(image);
		getContentRow().add(imageColumn);

		captionColumn = new MaterialColumn();
		captionColumn.setGrid("s12");
		captionColumn.setTextAlign(TextAlign.CENTER);
			caption = new HTML();
			caption.addStyleName(res.style().caption());
		captionColumn.add(caption);
		getContentRow().add(captionColumn);

		if (unit != null)
			setUnit(unit);
		
	}
 
开发者ID:vsite-hr,项目名称:mentor,代码行数:24,代码来源:ImageUnitWidget.java

示例4: insertFileRow

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
private void insertFileRow(final FileWrapper file) {
	int numRows = folderDisplayTable.getRowCount();

	CheckBox checkBox = new CheckBox();
	final String fileName = file.getName();
	FolderTableRow fileTableRow = new FolderTableRow(checkBox, file);
	folderTableRows.add(fileTableRow);
	folderDisplayTable.setWidget(numRows, 0, checkBox);
	HTML fileIconedName = getFileIconedName(fileName, file.getKind());
	fileIconedName.addStyleName(FolderManagementConstants.CURSOR_HAND);
	addHandlersToFileIconedName(file, fileName, fileIconedName);

	folderDisplayTable.setWidget(numRows, 1, fileIconedName);
	folderDisplayTable.setText(numRows, 2, file.getModified());
	folderDisplayTable.setText(numRows, 3, file.getKind().toString());
	folderDisplayTable.getCellFormatter().addStyleName(numRows, 0, FolderManagementConstants.FILES_TABLE_SMALL_COLUMN);
	folderDisplayTable.getCellFormatter().addStyleName(numRows, 1, FolderManagementConstants.TOP_LINKS);
	folderDisplayTable.getCellFormatter().addStyleName(numRows, 2, FolderManagementConstants.TOP_LINKS);
	folderDisplayTable.getCellFormatter().addStyleName(numRows, 3, FolderManagementConstants.TOP_LINKS);
	if (numRows % 2 != 0) {
		folderDisplayTable.getRowFormatter().addStyleName(numRows, FolderManagementConstants.FILES_TABLE_ODD);
	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:24,代码来源:FolderTableView.java

示例5: getEndPointDetails

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
private Widget getEndPointDetails(final String css, Date time,
		String address, final Wgs84LatLonBean position) {
	HTML line = new HTML();
	line.addStyleName("itinerary-details-line");
	line.addStyleName("itinerary-details-" + css);
	line.addStyleName(css + "-icon");
	String html = "<span class='time'>" + FormatUtils.formatTime(time)
			+ "</span> - " + FormatUtils.formatAddress(address);
	line.setHTML(html);
	final String infoHtml = "<div class='info-panel-" + css + " " + css
			+ "-icon'>" + html + "</div>";
	line.addMouseOverHandler(new MouseOverHandler() {

		@Override
		public void onMouseOver(MouseOverEvent event) {
			if (selected)
				listener.onItineraryStepClicked(infoHtml, position);
		}
	});
	return line;
}
 
开发者ID:mecatran,项目名称:OpenTripPlanner-client-gwt,代码行数:22,代码来源:ItineraryDetailsWidget.java

示例6: makeFailureMessage

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public Panel makeFailureMessage(String message, int width, int height, boolean decorated) {
    VerticalPanel panel= new VerticalPanel();
    HTML header = new HTML(getTitle());
    Widget msg = GwtUtil.centerAlign(new HTML(message));
    header.addStyleName("preview-title");
    GwtUtil.setStyle(msg, "padding", "5px");
    panel.add(header);
    panel.add(msg);
    panel.setPixelSize(width, height);

    Panel retval= panel;

    if (decorated) {
        DecoratorPanel dp= new DecoratorPanel();
        dp.setWidget(panel);
        retval= dp;
    }
    return retval;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:20,代码来源:MiniPlotWidget.java

示例7: setNews

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
protected void setNews(List<NewsItem> news) {
	newsPanel.clear();

	if (!news.isEmpty()) {
		// newsPanel.setWidth("100%");
		SimpleCaptionPanel border = new SimpleCaptionPanel("News");
		// border.setWidth("100%");
		newsPanel.add(border);

		VerticalPanel panel = new VerticalPanel();
		border.setContentWidget(panel);

		for (NewsItem n : news) {
			HorizontalPanel row = new HorizontalPanel();
			HTML label = new HTML(n.getText());
			label.addStyleName("boldText");
			row.add(label);
			panel.add(row);
		}
	}

}
 
开发者ID:dawg6,项目名称:dhcalc,代码行数:23,代码来源:MainPanel.java

示例8: initComponents

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
/**
   * Helper method called by constructor to initialize ui components
   */
  private void initComponents() {
    // Initialize UI
    panel = new VerticalPanel();
    panel.setWidth("100%");
    galleryGUI = new FlowPanel();
    appSingle = new FlowPanel();
    appDetails = new FlowPanel();
    appHeader = new FlowPanel();
    appInfo = new FlowPanel();
    appAction = new FlowPanel();
    appAuthor = new FlowPanel();
    appMeta = new FlowPanel();
    appDates = new FlowPanel();
    appPrimaryWrapper = new FlowPanel();
    appSecondaryWrapper = new FlowPanel();
    appDescPanel = new FlowPanel();
    appReportPanel = new FlowPanel();
    appSharePanel = new FlowPanel();
    appActionTabs = new TabPanel();
    sidebarTabs = new TabPanel();
    appComments = new FlowPanel();
    appCommentsList = new FlowPanel();
    appsByAuthor = new FlowPanel();
    appsByTags = new FlowPanel();
    appsRemixes = new FlowPanel();
    returnToGallery = new FlowPanel();
//    tagSelected = "";

    appCreated = new Label();
    appChanged = new Label();
    descBox = new FlowPanel();
    titleBox = new FlowPanel();
    desc = new TextArea();
    titleText = new TextArea();
    moreInfoText = new TextArea();
    creditText = new TextArea();
    ccLicenseRef = new HTML(MESSAGES.galleryCcLicenseRef());
    ccLicenseRef.addStyleName("app-action-html");
  }
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:43,代码来源:GalleryPage.java

示例9: setSelectedIndex

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public void setSelectedIndex(int index) {
    if (index >= 0 && index < items.size() ) {
        value = items.get(index);
        HTML html = new HTML(value);
        html.addStyleName("current-item");
        current.setWidget(0, 0, html);
        selectedIndex = index;
    }
    
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:11,代码来源:DropDown.java

示例10: addItem

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public void addItem(String item) {
    items.add(item);
    if ( items.size() == 1 ) {
        value = item;
        HTML currentValue = new HTML(value);
        currentValue.addStyleName("current-item");
        current.setWidget(0, 0, currentValue);
    }
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:10,代码来源:DropDown.java

示例11: updateItemTitle

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
private void updateItemTitle() {
    HTML titleHTML= new HTML(_title);
    titleHTML.addStyleName("group-title");
    FlexTable.FlexCellFormatter formatter= _content.getFlexCellFormatter();
    _content.setWidget(0, TITLE_POS,titleHTML);
    String width;
    if (_title.length()< 20)  width= "200px";
    else if (_title.length()< 20)  width= "250px";
    else if (_title.length()< 25)  width= "300px";
    else                          width= "350px";

    formatter.setWidth(0, TITLE_POS, width);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:14,代码来源:DownloadGroupPanel.java

示例12: makeFaddedHelp

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public static HTML makeFaddedHelp(String s) {
    FireflyCss ffCss = CssData.Creator.getInstance().getFireflyCss();
    HTML desc = new HTML(s);
    desc.addStyleName("field-desc");
    desc.addStyleName(ffCss.fadedText());
    return desc;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:8,代码来源:GwtUtil.java

示例13: XYPlotBasicWidget

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public XYPlotBasicWidget(XYPlotMeta meta) {
        super(300,180);
//        super(300, 180);
        _meta = meta;
        GChart.setCanvasFactory(ChartingFactory.getInstance());
        _popoutWidgetSet = false;

        _actionHelp = new HTML();
        _actionHelp.setWidth("100%");
        _actionHelp.addStyleName(_ffCss.fadedText());

        /**
        final CheckBox outOfBoundCheck = GwtUtil.makeCheckBox("Connect Out of Bounds Points",
                "Take into account out of bounds points that are reasonably close", false);
        outOfBoundCheck.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

            public void onValueChange(ValueChangeEvent valueChangeEvent) {
                if (_chart != null && _data != null) {
                    preserveOutOfBoundPoints = outOfBoundCheck.getValue();
                    if (preserveOutOfBoundPoints) {
                        _chart.getYAxis().setOutOfBoundsMultiplier(Double.NaN);
                        _chart.getY2Axis().setAxisMin(_chart.getY2Axis().getAxisMin());
                        _chart.update();
                    } else {
                        _chart.getYAxis().setOutOfBoundsMultiplier(0);
                        _chart.getY2Axis().setAxisMin(_chart.getY2Axis().getAxisMin());
                        _chart.update();
                    }
                }
            }
        });
         */

    }
 
开发者ID:lsst,项目名称:firefly,代码行数:35,代码来源:XYPlotBasicWidget.java

示例14: initReportSection

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
/**
 * Helper method called by constructor to initialize the report section
 */
private void initReportSection() {
  final HTML reportPrompt = new HTML();
  reportPrompt.setHTML(MESSAGES.galleryReportPrompt());
  reportPrompt.addStyleName("primary-prompt");
  final TextArea reportText = new TextArea();
  reportText.addStyleName("action-textarea");
  final Button submitReport = new Button(MESSAGES.galleryReportButton());
  submitReport.addStyleName("action-button");
  final Label descriptionError = new Label();
  descriptionError.setText("Description required");
  descriptionError.setStyleName("ode-ErrorMessage");
  descriptionError.setVisible(false);
  appReportPanel.add(reportPrompt);
  appReportPanel.add(descriptionError);
  appReportPanel.add(reportText);
  appReportPanel.add(submitReport);

  final OdeAsyncCallback<Boolean> isReportdByUserCallback = new OdeAsyncCallback<Boolean>(
      // failure message
      MESSAGES.galleryError()) {
        @Override
        public void onSuccess(Boolean isAlreadyReported) {
          if(isAlreadyReported) { //already reported, cannot report again
            reportPrompt.setHTML(MESSAGES.galleryAlreadyReportedPrompt());
            reportText.setVisible(false);
            submitReport.setVisible(false);
            submitReport.setEnabled(false);
          } else {
            submitReport.addClickHandler(new ClickHandler() {
              public void onClick(ClickEvent event) {
                final OdeAsyncCallback<Long> reportClickCallback = new OdeAsyncCallback<Long>(
                    // failure message
                    MESSAGES.galleryError()) {
                      @Override
                      public void onSuccess(Long id) {
                        reportPrompt.setHTML(MESSAGES.galleryReportCompletionPrompt());
                        reportText.setVisible(false);
                        submitReport.setVisible(false);
                        submitReport.setEnabled(false);
                      }
                  };
                if (!reportText.getText().trim().isEmpty()){
                  Ode.getInstance().getGalleryService().addAppReport(app, reportText.getText(),
                    reportClickCallback);
                  descriptionError.setVisible(false);
                } else {
                  descriptionError.setVisible(true);
                }
              }
            });
          }
        }
    };
  Ode.getInstance().getGalleryService().isReportedByUser(app.getGalleryAppId(),
      isReportdByUserCallback);
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:60,代码来源:GalleryPage.java

示例15: createSelectable

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
/**
 * Generate selectable widget text
 */
public static HTML createSelectable(String html) {
	HTML widget = new HTML(html);
	widget.addStyleName("okm-EnableSelect");
	return widget;
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:9,代码来源:Util.java


注:本文中的com.google.gwt.user.client.ui.HTML.addStyleName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。