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


Java SimplePanel.addStyleName方法代码示例

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


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

示例1: Thumb

import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public Thumb() {
	visibleThumb = new SimplePanel();
	Element visibleElem = visibleThumb.getElement();
	Element touchElem = getElement();
	
	visibleThumb.setStylePrimaryName(THUMB_CLASS_NAME);
	
	BrowserUtils.setStyleAttributeAllBrowsers(visibleElem, "boxSizing", "border-box");
	BrowserUtils.setStyleAttributeAllBrowsers(touchElem, "boxSizing", "border-box");

	this.setWidget(visibleThumb);
	
	if (!isPassive)
	{
		visibleThumb.addStyleName(INTERACTIVE_CLASS_NAME);
	}
}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:18,代码来源:SliderComponent.java

示例2: addContentWidgetWebKit

import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
protected void addContentWidgetWebKit( final FlowPanel content, final Widget wid ) {
	Widget widToAdd = wid;
	//Somehow Chrome and Safari do not understand inline in this context, so we use float left
	if( BrowserDetect.getBrowserDetect().isSafari() || BrowserDetect.getBrowserDetect().isChrome() ) {
		SimplePanel panelWrap = new SimplePanel();
		panelWrap.add( wid );
		panelWrap.addStyleName( CommonResourcesContainer.FLOAT_LEFT_INSTEAD_OF_INLINE_STYLE );
		widToAdd = panelWrap;
	}
	MessageTextToFlowPanel.addContentWidget( content, widToAdd, false );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:12,代码来源:ForumMessageWidget.java

示例3: makeSideHeader

import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
protected Widget makeSideHeader() {

        Widget close = makeCloseButton(false);

        SimplePanel panel= new SimplePanel();
        panel.addStyleName(_ffCss.titleBgColor());
        panel.addStyleName(_ffCss.titleColor());
        panel.setHeight("100%");


        VerticalPanel header = new VerticalPanel();
        titleLabel.addStyleName("title-label");
        titleLabel.setHeight("100%");
        DOM.setStyleAttribute(titleLabel.getElement(), "cursor", "default");

        GwtUtil.setStyle(header, "paddingTop", "3px");

        titleLabel.setHTML(" ");

        header.addStyleName(_ffCss.popupTitleVerticalBackground());
        header.addStyleName(_ffCss.titleBgColor());
        header.addStyleName(_ffCss.titleColor());
//        header.addStyleName(_ffCss.popupBackground());

        header.add(close);
        header.add(titleLabel);
        header.setCellHeight(titleLabel, "100%");
        header.setWidth("15px");
        header.setHeight("100%");

        panel.setWidget(header);
        return panel;
    }
 
开发者ID:lsst,项目名称:firefly,代码行数:34,代码来源:PopupPane.java

示例4: wrap

import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public static Widget wrap(Widget w, int top, int right, int bottom, int left, boolean fullSize) {
    SimplePanel wrapper = new SimplePanelWithLayout(w);
    wrapper.addStyleName("wrapper-for-layout");
    GwtUtil.setStyle(wrapper, "position", "relative");
    GwtUtil.setStyles(w, "position", "absolute",
                      "left", left + "px",
                      "right", right + "px",
                      "top", top + "px",
                      "bottom", bottom + "px",
                      "width",  "auto",
                      "height",  "auto");
    if (fullSize) GwtUtil.setStyles(wrapper, "width", "100%",  "height", "100%");
    return wrapper;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:15,代码来源:GwtUtil.java

示例5: TablePanel

import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public TablePanel(String name, Loader<TableDataView> loader) {
    setInit(false);
    this.name = name;
    dataModel = new DataSetTableModel(loader);
    dataModel.addHandler(modelEventHandler);

    mainWrapper = new SimplePanel();
    mainWrapper.addStyleName("mainWrapper");
    mainWrapper.setSize("100%", "100%");
    mainPanel.setSize("100%", "100%");
    mainPanel.addStyleName("mainPanel");
    DOM.setStyleAttribute(mainPanel.getElement(), "borderSpacing", "0px");
    toolbarWrapper = new HorizontalPanel();
    toolbarWrapper.setStyleName("firefly-toolbar");
    stateId = name;
    mainWrapper.add(mainPanel);
    initWidget(mainWrapper);
    sinkEvents(Event.ONMOUSEOVER);

    WebEventManager.getAppEvManager().addListener(Name.DOWNLOAD_REQUEST_READY, new WebEventListener() {
        public void eventNotify(WebEvent ev) {
            if (ev.getName().equals(Name.DOWNLOAD_REQUEST_READY)) {
                if (ev.getSource() instanceof DownloadRequest) {
                    downloadRequest = (DownloadRequest) ev.getSource();
                }
            }
        }
    });
    helpButton.setVisible(false);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:31,代码来源:TablePanel.java

示例6: createInDiv

import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
private static MiniPlotWidget createInDiv(SimplePanel panel,
                                          String target,
                                          String groupName,
                                          boolean enableCatalogs) {
    MiniPlotWidget mpw= makeMPW(groupName);
    mpw.addStyleName("standard-border");
    mpw.setCatalogButtonEnable(enableCatalogs);
    panel.setWidget(mpw);
    panel.addStyleName("fits-input-cmd-main-widget");
    mpwMap.put(target, mpw);
    return mpw;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:13,代码来源:FitsViewerJSInterface.java

示例7: addDialogWidgets

import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();
	SimplePanel decPanel = new SimplePanel();
	Grid grid = new Grid(4,2);
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	
	Label commentsLabel = new Label("Comments:");
	Button cancelButton = new Button("Cancel");
	
	decPanel.addStyleName("decorator-panel");
	replacementLabel.addStyleName("dialog-label");
	commentsLabel.addStyleName("dialog-label");
	
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			dialogBox.hide();
			relationship = null;
			commentsField.setValue(null);
			errorLabel.setVisible(false);
		}
	});
	
	grid.addStyleName("gwt-Grid");
	buttonsHPanel.addStyleName("dialog-buttons");
	buttonsHPanel.addStyleName("centered-hortz");
	vertPanel.addStyleName("dialog-vpanel");		
	//vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
			
	int row = 0, col = 0;
	grid.setWidget(row, col, new Label("Ontology:"));
	grid.setWidget(++row, col, new Label("Term:"));
	grid.setWidget(++row, col, new Label("Relationship:"));
	grid.setWidget(++row, col, new Label("Related Term:"));
	row = 0;
	col = 1;
	grid.setWidget(row, col, ontologyLabel);
	grid.setWidget(++row, col, termLabel);
	grid.setWidget(++row, col, typeLabel);
	grid.setWidget(++row, col, relatedTermLabel);
	
	for(row = col = 0; row < grid.getRowCount(); row++) {
		Label label = (Label)grid.getWidget(row, col);
		label.addStyleName("dialog-label");
	}			
							
	buttonsHPanel.add(obsoleteButton);
	buttonsHPanel.add(cancelButton);
	
	decPanel.setWidget(grid);
	//vertPanel.add(grid);
	vertPanel.add(decPanel);
	vertPanel.add(replacementLabel);
	vertPanel.add(table);
	vertPanel.add(commentsLabel);
	vertPanel.add(commentsField);
	vertPanel.add(errorLabel);
	vertPanel.add(buttonsHPanel);
	
	dialogBox.setWidget(vertPanel);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:61,代码来源:ReplaceRelationshipPopup.java

示例8: addDialogWidgets

import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();
	SimplePanel decPanel = new SimplePanel();
   	Grid grid = new Grid(5,2);
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	
	Label comments = new Label("Comments:");
	Button cancelButton = new Button("Cancel");
	
	decPanel.addStyleName("decorator-panel");		
	comments.addStyleName("dialog-label");
							
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			dialogBox.hide();
			synonym = null;
			commentsField.setValue(null);
			errorLabel.setVisible(false);
		}
	});
	
	grid.addStyleName("gwt-Grid");
	errorLabel.addStyleName("dialog-error");
	buttonsHPanel.addStyleName("dialog-buttons");
	buttonsHPanel.addStyleName("centered-hortz");
	vertPanel.addStyleName("dialog-vpanel");		
	//vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
			
	int row = 0, col = 0;
	grid.setWidget(row, col, ontologyHeadingLabel);
	grid.setWidget(++row, col, new Label("Term:"));
	grid.setWidget(++row, col, new Label("Synonym:"));
	grid.setWidget(++row, col, new Label("Source:"));
	grid.setWidget(++row, col, new Label("Reference Id:"));
	row = 0;
	col = 1;
	grid.setWidget(row, col, ontologyLabel);
	grid.setWidget(++row, col, termLabel);
	grid.setWidget(++row, col, synonymLabel);
	grid.setWidget(++row, col, sourceLabel);
	grid.setWidget(++row, col, referenceIdLabel);
	
	for(row = col = 0; row < grid.getRowCount(); row++) {
		Label label = (Label)grid.getWidget(row, col);
		label.addStyleName("dialog-label");
	}			
							
	buttonsHPanel.add(obsoleteButton);
	buttonsHPanel.add(cancelButton);
	
	decPanel.setWidget(grid);
	//vertPanel.add(grid);
	vertPanel.add(decPanel);
	vertPanel.add(comments);
	vertPanel.add(commentsField);
	vertPanel.add(errorLabel);
	vertPanel.add(buttonsHPanel);
	
	dialogBox.setWidget(vertPanel);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:61,代码来源:ReplaceSynonymPopup.java

示例9: AlertWidget

import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public AlertWidget(AlertBean alert) {
	VerticalPanel rootPanel = new VerticalPanel();

	FocusPanel headerPanel = new FocusPanel();
	rootPanel.add(headerPanel);
	headerPanel.addStyleName("alert-header");
	HorizontalPanel titleAndButtonPanel = new HorizontalPanel();
	headerPanel.add(titleAndButtonPanel);
	Label icon = new Label("");
	icon.addStyleName(alert.getLevel() == AlertBean.LEVEL_INFO ? "info-icon"
			: "warn-icon");
	titleAndButtonPanel.add(icon);
	Label alertTitle = new Label(alert.getTitle());
	alertTitle.addStyleName("alert-title");
	titleAndButtonPanel.add(alertTitle);

	final SimplePanel collapsibleOuterPanel = new SimplePanel();
	rootPanel.add(collapsibleOuterPanel);
	collapsibleOuterPanel.addStyleName("alert-details-outer");
	VerticalPanel collapsibleInnerPanel = new VerticalPanel();
	collapsibleOuterPanel.add(collapsibleInnerPanel);
	collapsibleInnerPanel.addStyleName("alert-details-inner");
	if (DISPLAY_ALERT_DATE && alert.isPublishActiveRange()
			&& (alert.getFrom() != null || alert.getTo() != null)) {
		Label dateRangeLabel = new Label(
				formatDateRange(alert.getFrom(), alert.getTo()));
		collapsibleInnerPanel.add(dateRangeLabel);
		dateRangeLabel.addStyleName("alert-datetime");
	}
	Label descriptionLabel = new Label(alert.getDescription());
	collapsibleInnerPanel.add(descriptionLabel);
	descriptionLabel.addStyleName("alert-description");
	if (alert.getUrl() != null && alert.getUrl().length() > 0) {
		final String url = alert.getUrl();
		Anchor moreInfoAnchor = new Anchor(I18nUtils.tr("more.info.alert"));
		moreInfoAnchor.addClickHandler(new ClickHandler() {
			@Override
			public void onClick(ClickEvent event) {
				Window.open(url, "_blank", "");
			}
		});
		moreInfoAnchor.addStyleName("alert-url");
		collapsibleInnerPanel.add(moreInfoAnchor);
	}
	initWidget(rootPanel);
}
 
开发者ID:mecatran,项目名称:OpenTripPlanner-client-gwt,代码行数:47,代码来源:AlertWidget.java


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