com.google.gwt.user.client.ui.Panel.setStyleName()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中com.google.gwt.user.client.ui.Panel.setStyleName()方法的一些代码示例,展示了Panel.setStyleName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Panel.setStyleName()方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.Panel
类名称:Panel
方法名:setStyleName

Panel.setStyleName介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

public PreloaderCallback getPreloaderCallback () {
  final Panel preloaderPanel = new VerticalPanel();
  preloaderPanel.setStyleName("gdx-preloader");
  final Image logo = new Image(GWT.getModuleBaseURL() + "logo.png");
  logo.setStyleName("logo");		
  preloaderPanel.add(logo);
  final Panel meterPanel = new SimplePanel();
  meterPanel.setStyleName("gdx-meter");
  meterPanel.addStyleName("red");
  final InlineHTML meter = new InlineHTML();
  final Style meterStyle = meter.getElement().getStyle();
  meterStyle.setWidth(0, Unit.PCT);
  meterPanel.add(meter);
  preloaderPanel.add(meterPanel);
  getRootPanel().add(preloaderPanel);
  return new PreloaderCallback() {
    @Override
    public void error (String file) {
      System.out.println("error: " + file);
    }
    
    @Override
    public void update (PreloaderState state) {
      meterStyle.setWidth(100f * state.getProgress(), Unit.PCT);
    }            
    
  };
}

代码示例来源:origin: libgdx/libgdx

public PreloaderCallback getPreloaderCallback () {
  final Panel preloaderPanel = new VerticalPanel();
  preloaderPanel.setStyleName("gdx-preloader");
  final Image logo = new Image(GWT.getModuleBaseURL() + "logo.png");
  logo.setStyleName("logo");		
  preloaderPanel.add(logo);
  final Panel meterPanel = new SimplePanel();
  meterPanel.setStyleName("gdx-meter");
  meterPanel.addStyleName("red");
  final InlineHTML meter = new InlineHTML();
  final Style meterStyle = meter.getElement().getStyle();
  meterStyle.setWidth(0, Unit.PCT);
  meterPanel.add(meter);
  preloaderPanel.add(meterPanel);
  getRootPanel().add(preloaderPanel);
  return new PreloaderCallback() {
    @Override
    public void error (String file) {
      System.out.println("error: " + file);
    }
    
    @Override
    public void update (PreloaderState state) {
      meterStyle.setWidth(100f * state.getProgress(), Unit.PCT);
    }            
    
  };
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-gwt-api

private void setDefaultSettings() {
  this.setWidget(this.contentPanel);
  this.contentPanel.setStyleName("gwt-ModalDialog-Content");
}

代码示例来源:origin: de.esoco/gewt

/***************************************
 * {@inheritDoc}
 */
@Override
public HasWidgets createLayoutContainer(
  Container rContainer,
  StyleData rContainerStyle)
{
  HasWidgets rLayoutPanel =
    createLayoutWidget(rContainer, rContainerStyle);
  aContentPanel = createContentPanel(rLayoutPanel);
  aContentPanel.setStyleName(EWT.CSS.ewtContentPanel());
  rLayoutPanel.add(aContentPanel);
  return rLayoutPanel;
}

代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-gwt

public PreloaderCallback getPreloaderCallback () {
  final Panel preloaderPanel = new VerticalPanel();
  preloaderPanel.setStyleName("gdx-preloader");
  final Image logo = new Image(GWT.getModuleBaseURL() + "logo.png");
  logo.setStyleName("logo");		
  preloaderPanel.add(logo);
  final Panel meterPanel = new SimplePanel();
  meterPanel.setStyleName("gdx-meter");
  meterPanel.addStyleName("red");
  final InlineHTML meter = new InlineHTML();
  final Style meterStyle = meter.getElement().getStyle();
  meterStyle.setWidth(0, Unit.PCT);
  meterPanel.add(meter);
  preloaderPanel.add(meterPanel);
  getRootPanel().add(preloaderPanel);
  return new PreloaderCallback() {
    @Override
    public void error (String file) {
      System.out.println("error: " + file);
    }
    
    @Override
    public void update (PreloaderState state) {
      meterStyle.setWidth(100f * state.getProgress(), Unit.PCT);
    }            
    
  };
}

代码示例来源:origin: org.kuali.student.core/ks-common-ui

private void init(boolean canEdit, boolean hasDetails, DataHelper dataParser) {
  classInstanceId++;
  instanceId = classInstanceId;
  mainPanel = new FlowPanel();
  mainPanel.setStyleName("ks-selected-list-value");
  panel = new HTMLPanel(PANEL_CONTENT_OPEN + PANEL_CONTENT_BACKGROUND);
  panel.getElement().setId(id);
  this.dataHelper = dataParser;
  mainPanel.add(panel);
  if (hasDetails) {
    viewDetails.getElement().getStyle().setProperty("position", "absolute");
    viewDetails.getElement().getStyle().setProperty("right", "25px");
    viewDetails.getElement().getStyle().setProperty("top", "1px");
    mainPanel.add(viewDetails);
  }
  if(canEdit) {
    delete.getElement().getStyle().setProperty("position", "absolute");
    delete.getElement().getStyle().setProperty("right", "3px");
    delete.getElement().getStyle().setProperty("top", "8px");
    mainPanel.add(delete);
    initDeleteHandlers();
    mainPanel.add(validationPanel);
  }
  String labelText = "";
  panel.getElementById(contentId).setInnerText(labelText);
  panel.setVisible(false);
  mainPanel.setVisible(false);
  super.initWidget(mainPanel);
}

代码示例来源:origin: org.switchyard.console.wildfly/switchyard-console-wildfly-extension

_content.setStyleName("fill-layout"); //$NON-NLS-1$

代码示例来源:origin: com.googlecode.gwtupload/gwtupload

/**
 * Initialize widget components and layout elements.
 *
 * @param type
 *   file input to use
 * @param form
 *   An existing form panel to use
 */
public Uploader(FileInputType type, FormPanel form) {
 thisInstance = this;
 this.fileInputType = type;
 if (form == null) {
  form = new FormFlowPanel();
 }
 uploadForm = form;
 uploadForm.setEncoding(FormPanel.ENCODING_MULTIPART);
 uploadForm.setMethod(FormPanel.METHOD_POST);
 uploadForm.addSubmitHandler(onSubmitFormHandler);
 uploadForm.addSubmitCompleteHandler(onSubmitCompleteHandler);
 // Issue #206
 FormElement.as(uploadForm.getElement()).setAcceptCharset("UTF-8");
 uploaderPanel = getUploaderPanel();
 uploaderPanel.add(uploadForm);
 uploaderPanel.setStyleName(STYLE_MAIN);
 setFileInput(fileInputType.getInstance());
 setStatusWidget(statusWidget);
 super.initWidget(uploaderPanel);
}

代码示例来源:origin: sk.seges.acris/acris-widgets-beantable

container.setStyleName(Styles.CONTAINER);
master.add(container, 0, 0);
setState(State.EXPANDED);

相关文章