com.smartgwt.client.widgets.Label.setStyleName()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(10.0k)|赞(0)|评价(0)|浏览(185)

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

Label.setStyleName介绍

暂无

代码示例

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

public void setExportButtonActiv(boolean activ) {
  if (activ) {
    exportButton.setDisabled(false);
    exportButton.setStyleName("n52_sensorweb_client_legendbutton");
  }
  else {
    exportButton.setDisabled(true);
    exportButton.setStyleName("n52_sensorweb_client_legendbuttonDisabled");
  }
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Label getSeparator(){
  Label pipe = new Label("|");
  pipe.setStyleName("n52_sensorweb_client_pipe");
  pipe.setAutoWidth();
  return pipe;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Label getSeparator(){
  Label pipe = new Label("|");
  pipe.setStyleName("n52_sensorweb_client_pipe");
  pipe.setAutoWidth();
  return pipe;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Label getHeaderLinkLabel(String labelText) {
  Label label = new Label(labelText);
  label.setStyleName("n52_sensorweb_client_headerlink");
  label.setAutoWidth();
  label.setWrap(false);
  return label;
}

代码示例来源:origin: org.geomajas.widget/geomajas-widget-advancedviews-gwt

public Canvas createCategory(String title) {
  Label cat = new Label(title);
  cat.setStyleName("themeWidget-selectionPanelTitle");
  cat.setWidth100();
  cat.setHeight(20);
  return cat;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Label createAddTimeSeriesLabelButton() {
  Label addTS = new Label(i18n.picker());
  addTS.setStyleName("n52_sensorweb_client_legendbuttonPrimary");
  addTS.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      StationSelector.getInst().show();
    }
  });
  return addTS;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Label getHeaderLinkLabel(String labelText) {
  Label label = new Label(labelText);
  label.setStyleName("n52_sensorweb_client_headerlink");
  label.setAutoWidth();
  label.setWrap(false);
  return label;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

public void addMessage(String msg) {

    Date d = new Date();
    String timeStamp = DateTimeFormat.getFormat("dd.MM.yyyy HH:mm").format(d);

    Label l = new Label(timeStamp + " " + msg);
    l.setCanSelectText(true);
    l.setStyleName("n52_sensorweb_client_toasterMsg");
    l.setAutoHeight();

    this.messages.add(l);

    for (int i = 0; i < this.messages.size(); i++) {
      if (this.layout.hasMember(this.messages.get(i))) {
        this.layout.removeMember(this.messages.get(i));
      }
    }
    for (int i = this.messages.size() - 1; i >= 0; i--) {
      this.layout.addMember(this.messages.get(i));
    }

//        this.left = this.toasterWindow.getParentElement().getWidth().intValue() - this.width - 10;
//        this.top = this.toasterWindow.getParentElement().getHeight().intValue() - this.height - 30;
//
//        this.toasterWindow.setLeft(this.left);
//        this.toasterWindow.setTop(this.top);

    animateToaster();
  }

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Label createSESTabLabelButton() {
  Label sesTabLabelButton = new Label(i18n.editProfile());
  sesTabLabelButton.setStyleName("n52_sensorweb_client_legendbutton");
  sesTabLabelButton.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      Legend.this.showProfileWindow();
    }
  });
  sesTabLabelButton.setVisible(true);
  return sesTabLabelButton;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Label createExportLabelButton() {
  Label export = new Label(i18n.export());
  export.setStyleName("n52_sensorweb_client_legendbuttonDisabled");
  export.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      if (exportMenu.isVisible()) {
        exportMenu.hide();
      }
      else {
        exportMenu.setLeft(exportButton.getAbsoluteLeft() - 2);
        exportMenu.setWidth(exportButton.getWidth());
        exportMenu.show();
      }
    }
  });
  return export;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

public void addErrorMessage(String error) {
  Date d = new Date();
  String timeStamp = DateTimeFormat.getFormat("dd.MM.yyyy HH:mm").format(d);
  Label l = new Label(timeStamp + " " + error);
  l.setCanSelectText(true);
  l.setStyleName("n52_sensorweb_client_toasterErrorMsg");
  l.setAutoHeight();
  for (int i = 0; i < this.messages.size(); i++) {
    this.layout.removeMember(this.messages.get(i));
  }
  this.messages.add(l);
  for (int i = this.messages.size() - 1; i >= 0; i--) {
    this.layout.addMember(this.messages.get(i));
  }
  this.left = this.toasterWindow.getParentElement().getWidth().intValue() - this.width - 10;
  this.top = this.toasterWindow.getParentElement().getHeight().intValue() - this.height - 30;
  this.toasterWindow.setLeft(this.left);
  this.toasterWindow.setTop(this.top);
  animateToaster();
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Canvas createLegendInfo() {
  this.legendInfo = new VLayout();
  this.legendInfo.setTabIndex(-1);
  // this.offeringLabel = new Label();
  // this.procedureLabel = new Label();
  this.phenonmenonLabel = new Label();
  this.stationLabel = new Label();
  this.firstValueInterval = new Label();
  this.lastValueInterval = new Label();
  
  this.phenonmenonLabel.setStyleName("n52_sensorweb_client_legendInfoRow");
  this.stationLabel.setStyleName("n52_sensorweb_client_legendInfoRow");
  // this.offeringLabel.setHeight(15);
  // this.procedureLabel.setHeight(15);
  this.phenonmenonLabel.setAutoHeight();
  this.stationLabel.setAutoHeight();
  // this.legendInfo.addMember(this.offeringLabel);
  // this.legendInfo.addMember(this.procedureLabel);
  this.legendInfo.addMember(this.phenonmenonLabel);
  this.legendInfo.addMember(this.stationLabel);
  this.legendInfo.addMember(createValueIntervalLabel());
  
  return this.legendInfo;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Canvas createValueIntervalLabel() {
  Layout interval = new HLayout();
  interval.setAutoWidth();
  interval.setStyleName("n52_sensorweb_client_legendInfoRow");
  this.firstValueInterval.setAutoWidth();
  this.firstValueInterval.setWrap(false);
  this.firstValueInterval.setStyleName("n52_sensorweb_client_legendlink");
  this.lastValueInterval.setAutoWidth();
  this.lastValueInterval.setWrap(false);
  this.lastValueInterval.setStyleName("n52_sensorweb_client_legendlink");
  Label separator = new Label(i18n.to());
  separator.setAlign(Alignment.CENTER);
  separator.setWidth(20);
  interval.addMember(this.firstValueInterval);
  interval.addMember(separator);
  interval.addMember(this.lastValueInterval);
  return interval;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Canvas createAutoScaleButton() {
  Layout layout = new Layout();
  layout.setStyleName("n52_sensorweb_client_scaleButtonLayout");
  autoScaleButton = new Label(i18n.resetScale());
  autoScaleButton.setStyleName("n52_sensorweb_client_scaleButton");
  autoScaleButton.addClickHandler(new ClickHandler() {
    public void onClick(ClickEvent event) {
      EventBus.getMainEventBus().fireEvent(new SwitchAutoscaleEvent(true), new EventCallback() {
        public void onEventFired() {
          EventBus.getMainEventBus().fireEvent(new RequestDataEvent());
        }
      });
    }
  });
  autoScaleButton.setWidth(80);
  autoScaleButton.setWrap(false);
  return autoScaleButton;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Label createCSVLabel() {
  Label toCSV = new Label(i18n.toCSV());
  toCSV.setWrap(false);
  toCSV.setAutoFit(true);
  toCSV.setPadding(3);
  toCSV.setWidth100();
  toCSV.setStyleName("n52_sensorweb_client_exportEntry");
  toCSV.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      controller.exportTo(ExportType.CSV_ZIP);
      exportMenu.hide();
    }
  });
  return toCSV;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Label createPDFLabel() {
  Label toPDF = new Label(i18n.toPDF());
  toPDF.setWrap(false);
  toPDF.setAutoFit(true);
  toPDF.setPadding(3);
  toPDF.setWidth100();
  toPDF.setStyleName("n52_sensorweb_client_exportEntry");
  toPDF.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      controller.exportTo(ExportType.PDF_ALL_IN_ONE);
      exportMenu.hide();
    }
  });
  return toPDF;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

public InteractionWindow(Layout content) {
  this.setContent(content);
  
  title = new Label();
  title.setWidth100();
  title.setAutoHeight();
  title.setStyleName("n52_sensorweb_client_interactionmenuHeader");
  title.setWrap(false);
  title.hide();
  addMember(title);
  addMember(content);
  
  setStyleName("n52_sensorweb_client_interactionmenu");
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Canvas createSelectionMenuButton() {
  showSelectionMenuButton = new Label(i18n.chooseDataSource());
  showSelectionMenuButton.setStyleName("n52_sensorweb_client_legendbuttonPrimary");
  showSelectionMenuButton.setZIndex(1000000);
  showSelectionMenuButton.setAutoHeight();
  showSelectionMenuButton.setAutoWidth();
  showSelectionMenuButton.setWrap(false);
  showSelectionMenuButton.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      if (selectionMenu.isVisible()) {
        selectionMenu.animateHide(AnimationEffect.SLIDE);
      } else {
        selectionMenu.animateShow(AnimationEffect.SLIDE);
      }
    }
  });
  setSelectionMenuButtonPosition();
  return showSelectionMenuButton;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Canvas createGridToggleButton() {
  Layout layout = new Layout();
  layout.setStyleName("n52_sensorweb_client_gridButtonLayout");
  gridShown = true;
  gridButton = new Label(i18n.hideGrid());
  gridButton.setStyleName("n52_sensorweb_client_gridButton");
  gridButton.addClickHandler(new ClickHandler() {
    public void onClick(ClickEvent event) {
      EventBus.getMainEventBus().fireEvent(new SwitchGridEvent(), new EventCallback() {
        public void onEventFired() {
          EventBus.getMainEventBus().fireEvent(new RequestDataEvent());
          final boolean gridShown = DataControlsTimeSeries.this.gridShown;
          if (gridShown) {
            String contents = "<html>" + i18n.showGrid() + "</html>";
            gridButton.setContents(contents);
          } else {
            String contents = "<html>" + i18n.hideGrid() + "</html>";
            gridButton.setContents(contents);
          }
          DataControlsTimeSeries.this.gridShown = !gridShown;
        }
      });
    }
  });
  gridButton.setWidth(80);
  gridButton.setWrap(false);
  layout.addMember(gridButton);
  return layout;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

user.setStyleName("n52_sensorweb_client_headerLoggedInAs");
user.setAutoWidth();
user.setWrap(false);

相关文章