本文整理汇总了Java中com.vaadin.terminal.ThemeResource类的典型用法代码示例。如果您正苦于以下问题:Java ThemeResource类的具体用法?Java ThemeResource怎么用?Java ThemeResource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ThemeResource类属于com.vaadin.terminal包,在下文中一共展示了ThemeResource类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildMainLayout
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
@Override
public void buildMainLayout() {
Embedded logo = new Embedded(null, new ThemeResource(MAINPAGE_PANEL_ANMELDEN_LOGO_PATH));
logo.setType(Embedded.TYPE_IMAGE);
logo.setWidth("100px");
logo.setHeight("96px");
headlineApp.addComponent(logo,"logo");
headlineApp.addComponent(authorizerLayout,"authorizerLayout");
headlineApp.addStyleName("headlineApp");
layout.addComponent(headlineApp,"headlineApp");
getMainWindow().setContent(layout);
getMainWindow().addComponent(getAnimator());
if(getLoginLehrer().getIsAdmin()){
layout.addComponent(getAdminDashboard(), "admin");
} else {
layout.addComponent(main, "main");
buildAppLayout();
}
}
开发者ID:fossaag,项目名称:rolp,代码行数:23,代码来源:RolpApplication.java
示例2: updateSubmitEnabledState
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
private void updateSubmitEnabledState() {
boolean jobDetailsValid = txtJobName.isValid() && (getUserNotation().isEmpty() || txtUserNotation.isValid());
if (txtEmail.isEnabled()) {
if (!txtEmail.getValue().toString().isEmpty()) {
jobDetailsValid &= txtEmail.isValid();
}
}
boolean outputValid = txtDimHeight.isValid() && txtDimWidth.isValid();
if (gridCheckbox.booleanValue()) {
String gridOpt = (String) optGridOpt.getValue();
if (gridOpt.equals(GRID_TILE_DIMENSIONS)) {
outputValid &= xPixelsTextBox.isValid() && yPixelsTextBox.isValid();
} else if (gridOpt.equals(GRID_NUM_TILES)) {
outputValid &= xTilesTextBox.isValid() && yTilesTextBox.isValid();
} else if (gridOpt.equals(GRID_GROUND_DISTANCE)) {
outputValid &= xDistanceTextBox.isValid() && yDistanceTextBox.isValid();
}
}
accordian.getTab(jobDetailsLayout).setIcon(jobDetailsValid ? null : new ThemeResource("img/error.png"));
accordian.getTab(outputDetails).setIcon(outputValid ? null : new ThemeResource("img/error.png"));
submitButton.setEnabled(jobDetailsValid && outputValid);
}
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:26,代码来源:ExportOptionsViewComponent.java
示例3: setState
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
public void setState(int state) {
this.state = state;
switch (state) {
case OFF:
setIcon(new ThemeResource("img/LayerChooseLayer16px.png"));
break;
case ON:
setIcon(new ThemeResource("img/LayerChosen16px.png"));
break;
case INDETERMINATE:
setIcon(new ThemeResource("img/LayerChildrenChosen16px.png"));
break;
default:
break;
}
}
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:18,代码来源:FindLayersViewComponent.java
示例4: buildToolbarLayout
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
@AutoGenerated
private HorizontalLayout buildToolbarLayout() {
// common part: create layout
toolbarLayout = new HorizontalLayout();
toolbarLayout.setImmediate(false);
toolbarLayout.setSpacing(true);
ButtonGroup calendarButtonGroup = new ButtonGroup();
toolbarLayout.addComponent(calendarButtonGroup);
// btnSave
btnSave = new Button();
btnSave.setCaption("Grabar Calendario");
btnSave.setIcon(new ThemeResource("../konekti/images/icons/calendar-module/calendar-select-days-span.png"));
btnSave.setImmediate(true);
btnSave.setWidth("-1px");
btnSave.setHeight("-1px");
calendarButtonGroup.addButton(btnSave);
return toolbarLayout;
}
开发者ID:thingtrack,项目名称:konekti,代码行数:23,代码来源:CalendarToolbar.java
示例5: buildToolbarLayout
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
@AutoGenerated
private HorizontalLayout buildToolbarLayout() {
toolbarLayout = new HorizontalLayout();
toolbarLayout.setImmediate(false);
toolbarLayout.setSpacing(true);
ButtonGroup editionButtonGroup = new ButtonGroup();
toolbarLayout.addComponent(editionButtonGroup);
// btnAlarmConfirmation
btnAlarmConfirmation = new Button();
btnAlarmConfirmation.setCaption("Iniciar Job");
btnAlarmConfirmation.setImmediate(true);
btnAlarmConfirmation.setWidth("-1px");
btnAlarmConfirmation.setHeight("-1px");
btnAlarmConfirmation.setIcon(new ThemeResource("../konekti/images/icons/job-toolbar/bell--arrow.png"));
editionButtonGroup.addButton(btnAlarmConfirmation);
return toolbarLayout;
}
开发者ID:thingtrack,项目名称:konekti,代码行数:22,代码来源:AlarmToolbar.java
示例6: buildToolbarLayout
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
@AutoGenerated
private HorizontalLayout buildToolbarLayout() {
toolbarLayout = new HorizontalLayout();
toolbarLayout.setImmediate(false);
toolbarLayout.setSpacing(true);
ButtonGroup editionButtonGroup = new ButtonGroup();
toolbarLayout.addComponent(editionButtonGroup);
// btnActiveKnowledge
btnActiveKnowledge = new Button();
btnActiveKnowledge.setCaption("Desactivar Workflow");
btnActiveKnowledge.setImmediate(true);
btnActiveKnowledge.setWidth("-1px");
btnActiveKnowledge.setHeight("-1px");
btnActiveKnowledge.setIcon(new ThemeResource("../konekti/images/icons/knowledge-toolbar/node-delete-previous.png"));
editionButtonGroup.addButton(btnActiveKnowledge);
return toolbarLayout;
}
开发者ID:thingtrack,项目名称:konekti,代码行数:22,代码来源:KnowledgeToolbar.java
示例7: buildToolbarLayout
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
@AutoGenerated
private HorizontalLayout buildToolbarLayout() {
toolbarLayout = new HorizontalLayout();
toolbarLayout.setImmediate(false);
toolbarLayout.setSpacing(true);
ButtonGroup editionButtonGroup = new ButtonGroup();
toolbarLayout.addComponent(editionButtonGroup);
// btnExecuteReport
btnExecuteReport = new Button();
btnExecuteReport.setCaption("Ejecutar Informe");
btnExecuteReport.setImmediate(true);
btnExecuteReport.setWidth("-1px");
btnExecuteReport.setHeight("-1px");
btnExecuteReport.setIcon(new ThemeResource("../konekti/images/icons/report-module/report-share.png"));
editionButtonGroup.addButton(btnExecuteReport);
return toolbarLayout;
}
开发者ID:thingtrack,项目名称:konekti,代码行数:22,代码来源:ReportToolbar.java
示例8: ImageField
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
public ImageField() {
buildMainLayout();
setCompositionRoot(mainLayout);
uploadImage.setButtonCaption("Subir");
final ImageUploader uploader = new ImageUploader();
uploadImage.setReceiver(uploader);
uploadImage.addListener(uploader);
btnClearImage.addListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
embeddedImage.setSource(new ThemeResource("images/imageNotAvailable.png"));
image = null;
}
});
}
开发者ID:thingtrack,项目名称:konekti,代码行数:21,代码来源:ImageField.java
示例9: createStopMarker
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
private Marker createStopMarker(GeocodedLocation geocodedLocation) {
Marker marker = new Marker(geocodedLocation.getLon(), geocodedLocation.getLat());
marker.setIcon(new ThemeResource("images/icons/scheduler-module/marker.png"));
String street = geocodedLocation.getGeocodedAddress() != null ? geocodedLocation.getGeocodedAddress() : "";
final Popup popup = new Popup(marker.getLon(), marker.getLat(), "</b></p><p><b>Dirección: </b>" + street);
// + "</p><p><b> Localidad: </b>" + locality
// + "</p><p><b> Código Postal: </b>" + postalCode
// + "</p><p><b> Provincia: </b>" + province
// + "</p><p><b> País: </b>" + country + "</p>");
popup.setPopupStyle(PopupStyle.FRAMED_CLOUD);
popup.setAnchor(marker);
marker.addClickListener(new ClickListener() {
@Override
public void click(ClickEvent event) {
openLayersMap.addPopup(popup);
}
});
return marker;
}
开发者ID:thingtrack,项目名称:konekti,代码行数:26,代码来源:AddressField.java
示例10: LoginViewForm
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor. yy
*/
public LoginViewForm(String version, String logo, boolean demo) {
this.version = version;
this.logo = logo;
this.demo = demo;
buildMainLayout();
setCompositionRoot(mainLayout);
applicationLogoEmbedded.setSource(new ThemeResource("images/" + this.logo));
demoField.setValue("<b><h1>DEMO</h1></b>");
versionField.setValue("<font color=\"grey\">Version: " + this.version + "<br>©Copyright Konekti 2010-2014</font>");
// TODO add user code here
usernameField.setNullRepresentation("");
passwordField.setNullRepresentation("");
usernameField.focus();
if (this.demo) {
demoField.setVisible(true);
usernameField.setVisible(false);
passwordField.setVisible(false);
}
}
开发者ID:thingtrack,项目名称:konekti,代码行数:33,代码来源:LoginViewForm.java
示例11: attach
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
@Override
public void attach() {
super.attach();
if(rootCategory.getIcon() != null) {
StreamResource streamResource = new StreamResource(new StreamResource.StreamSource() {
private static final long serialVersionUID = 1L;
public InputStream getStream() {
return new ByteArrayInputStream(rootCategory.getIcon());
}
}, rootCategory.getName() + ".png", getApplication());
iconLayout.addComponent(new Embedded(null, streamResource));
} else {
iconLayout.addComponent(new Embedded("", new ThemeResource("category.png")));
}
}
开发者ID:alejandro-du,项目名称:cis,代码行数:17,代码来源:FileComponent.java
示例12: ButtonMiddle
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
/**
* Konstruktor für einen Button mit einzeiligem Label
*
* @author Tobias Lindner
*
* @param iconPfad
* String: Pfad zum Icon Image
* @param text
* String: Text für den Button
* @param lcl
* LayoutClickListener: Listener, der Aktionen bei Klick auf den ButtonMiddle ausführt.
*/
public ButtonMiddle (String iconPfad, String text, LayoutClickListener lcl) {
this.lcl = lcl;
setHeight(95, UNITS_PIXELS);
setWidth(100, UNITS_PERCENTAGE);
setStyleName("buttonMiddle");
gap1 = new Label ();
gap1.setWidth(15, UNITS_PIXELS);
icon = new Embedded(null, new ThemeResource(iconPfad));
icon.setWidth(40, UNITS_PIXELS);
icon.setStyleName("buttonIconMiddle");
gap2 = new Label();
gap2.setWidth(10, UNITS_PIXELS);
label = new Label (text);
label.setStyleName("buttonLabelMiddle");
label.setWidth(Sizeable.SIZE_UNDEFINED, 0);
label.setHeight(Sizeable.SIZE_UNDEFINED, 0);
vl = new VerticalLayout();
vl.addComponent(label);
vl.setSizeUndefined();
gap3 = new Label();
gap3.setSizeFull();
addComponent(gap1);
addComponent(icon);
addComponent(gap2);
addComponent(vl);
addComponent(gap3);
setExpandRatio(gap3, 1.0f);
setComponentAlignment(icon, Alignment.MIDDLE_CENTER);
setComponentAlignment(vl, Alignment.MIDDLE_CENTER);
addListener(lcl);
}
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:52,代码来源:ButtonMiddle.java
示例13: setDetails
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
/**
* Anpassung an einem Button mit einzeiliger Textangabe.
* @param iconPfad
* @param text
* @param lcl
*/
public void setDetails (String iconPfad, String text, LayoutClickListener lcl) {
if (vl.getComponentIndex(label2)!= -1 ){
vl.removeComponent(label2);
}
this.icon.setSource(new ThemeResource(iconPfad));
setDetails(text, lcl);
logger.debug ("ButtonDetails geändert");
}
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:15,代码来源:ButtonMiddle.java
示例14: setPageDescription
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
public void setPageDescription(String source, String page, String[] description){
int labelCount = descriptionLayout.getComponentCount();
Label oldLabel;
int i;
homeIcon.setSource(new ThemeResource(source));
seitenLabel.setValue(page);
for(i = 0; i < labelCount && i < description.length; i++){
oldLabel = (Label) descriptionLayout.getComponent(i);
oldLabel.setValue(description[i]);
if(i == 0){
descriptionLayout.setComponentAlignment(oldLabel, Alignment.BOTTOM_CENTER);
}
else{
descriptionLayout.setComponentAlignment(oldLabel, Alignment.TOP_CENTER);
}
}
// descriptionLabel.setValue(description[0]);
for(int a = i; a < description.length; a++){
Label newLabel = new Label(description[a]);
newLabel.setStyleName("descriptionLabel");
newLabel.setWidth(Sizeable.SIZE_UNDEFINED, 0);
descriptionLayout.addComponent(newLabel);
descriptionLayout.setComponentAlignment(newLabel, Alignment.TOP_CENTER);
}
for(int b = i; b < labelCount; b++){
descriptionLayout.removeComponent(descriptionLayout.getComponent(b));
}
}
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:29,代码来源:InitialScreenViewImpl.java
示例15: FossaBooleanCellImageHandler
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
public FossaBooleanCellImageHandler(boolean datasource) {
super(null);
if (datasource) {
setSource(new ThemeResource("images/check.gif"));
} else {
setSource(new ThemeResource("images/uncheck.gif"));
}
setType(Embedded.TYPE_IMAGE);
}
开发者ID:fossaag,项目名称:rolp,代码行数:10,代码来源:FossaBooleanCellImageHandler.java
示例16: FachlehrerDashboard
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
public FachlehrerDashboard(RolpApplication app) {
super(app);
this.app = app;
setCaption(" - FachlehrerDashboard - ");
setWidth("100%");
setHeight("100%");
buildButtonBatteries();
CustomLayout layout = new CustomLayout("./lehrerDashboards/fachLehrerDashboardMain");
setContent(layout);
CustomLayout headline = new CustomLayout("./lehrerDashboards/headline");
headline.addStyleName("headline");
Embedded logo = new Embedded(null, new ThemeResource(MAINPAGE_PANEL_ANMELDEN_LOGO_PATH));
logo.setType(Embedded.TYPE_IMAGE);
logo.setWidth("100px");
logo.setHeight("96px");
headline.addComponent(logo,"logo");
CustomLayout faecherListe = new CustomLayout("./lehrerDashboards/liste");
faecherListe.addStyleName("liste");
faecherList = getFaecherList();
faecherList.setHeight("250px");
faecherList.setStyleName("list");
faecherListe.addComponent(faecherList, "list");
faecherListe.setHeight("260px");
layout.addComponent(faecherListe,"liste");
layout.addComponent(headline,"headline");
layout.addComponent(horizontalButtonBattery,"horizontalButtonBattery");
lehrerBlog = getLehrerBlog();
layout.addComponent(lehrerBlog,"blog");
windowCloseButton.setWidth("100%");
layout.addComponent(windowCloseButton, "windowCloseButton");
}
开发者ID:fossaag,项目名称:rolp,代码行数:41,代码来源:FachlehrerDashboard.java
示例17: buildToolbarLayout
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
@AutoGenerated
private HorizontalLayout buildToolbarLayout() {
toolbarLayout = new HorizontalLayout();
toolbarLayout.setImmediate(false);
toolbarLayout.setSpacing(true);
ButtonGroup editionButtonGroup = new ButtonGroup();
toolbarLayout.addComponent(editionButtonGroup);
// btnStartJob
btnStartJob = new Button();
btnStartJob.setCaption("Iniciar Job");
btnStartJob.setImmediate(true);
btnStartJob.setWidth("-1px");
btnStartJob.setHeight("-1px");
btnStartJob.setIcon(new ThemeResource("../konekti/images/icons/job-toolbar/gear--arrow.png"));
editionButtonGroup.addButton(btnStartJob);
// btnStopJob
btnStopJob = new Button();
btnStopJob.setCaption("Parar Job");
btnStopJob.setImmediate(true);
btnStopJob.setWidth("-1px");
btnStopJob.setHeight("-1px");
btnStopJob.setIcon(new ThemeResource("../konekti/images/icons/job-toolbar/gear--exclamation.png"));
editionButtonGroup.addButton(btnStopJob);
return toolbarLayout;
}
开发者ID:thingtrack,项目名称:konekti,代码行数:32,代码来源:JobToolbar.java
示例18: buildToolbarLayout
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
@AutoGenerated
private HorizontalLayout buildToolbarLayout() {
toolbarLayout = new HorizontalLayout();
toolbarLayout.setImmediate(false);
toolbarLayout.setSpacing(true);
ButtonGroup editionButtonGroup = new ButtonGroup();
toolbarLayout.addComponent(editionButtonGroup);
// btnAlarmRefresh
btnAlarmRefresh = new Button();
btnAlarmRefresh.setCaption("Refrescar Alarmas");
btnAlarmRefresh.setImmediate(true);
btnAlarmRefresh.setWidth("-1px");
btnAlarmRefresh.setHeight("-1px");
btnAlarmRefresh.setIcon(new ThemeResource("../konekti/images/icons/navigation-toolbar/arrow-circle-double.png"));
editionButtonGroup.addButton(btnAlarmRefresh);
// btnAlarmConfirmation
btnAlarmConfirmation = new Button();
btnAlarmConfirmation.setCaption("Iniciar Job");
btnAlarmConfirmation.setImmediate(true);
btnAlarmConfirmation.setWidth("-1px");
btnAlarmConfirmation.setHeight("-1px");
btnAlarmConfirmation.setIcon(new ThemeResource("../konekti/images/icons/job-toolbar/bell--arrow.png"));
editionButtonGroup.addButton(btnAlarmConfirmation);
return toolbarLayout;
}
开发者ID:thingtrack,项目名称:konekti,代码行数:32,代码来源:AlarmPortletToolbar.java
示例19: bindingSourceIndexChange
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
@Override
public void bindingSourceIndexChange(IndexChangeEvent event) {
if (bindingSource != null) {
knowledgeSelected = (Knowledge)event.getRegister();
if(knowledgeSelected == null)
return;
if (getI18N() == null)
return;
if (knowledgeSelected != null && knowledgeSelected.getActive()) {
btnActiveKnowledge.setCaption(getI18N().getMessage("com.thingtrack.konekti.view.module.knowledge.addon.KnowledgeToolbar.btnActiveKnowledge.unActivateStatus.caption"));
btnActiveKnowledge.setDescription(getI18N().getMessage("com.thingtrack.konekti.view.module.knowledge.addon.KnowledgeToolbar.unActivateStatus.description"));
btnActiveKnowledge.setIcon(new ThemeResource("../konekti/images/icons/knowledge-toolbar/node-delete-previous.png"));
}
else {
btnActiveKnowledge.setCaption(getI18N().getMessage("com.thingtrack.konekti.view.module.knowledge.addon.KnowledgeToolbar.btnActiveKnowledge.activateStatus.caption"));
btnActiveKnowledge.setDescription(getI18N().getMessage("com.thingtrack.konekti.view.module.knowledge.addon.KnowledgeToolbar.btnActiveKnowledge.activateStatus.description"));
btnActiveKnowledge.setIcon(new ThemeResource("../konekti/images/icons/knowledge-toolbar/node-insert-previous.png"));
}
}
}
开发者ID:thingtrack,项目名称:konekti,代码行数:26,代码来源:KnowledgeToolbar.java
示例20: buildToolbarLayout
import com.vaadin.terminal.ThemeResource; //导入依赖的package包/类
@AutoGenerated
private HorizontalLayout buildToolbarLayout() {
toolbarLayout = new HorizontalLayout();
toolbarLayout.setImmediate(false);
toolbarLayout.setSpacing(true);
ButtonGroup organizationButtonGroup = new ButtonGroup();
toolbarLayout.addComponent(organizationButtonGroup);
// btnLockEquipment
btnRefreshOrganization = new Button();
btnRefreshOrganization.setCaption("Refrescar Organización");
btnRefreshOrganization.setImmediate(true);
btnRefreshOrganization.setWidth("-1px");
btnRefreshOrganization.setHeight("-1px");
btnRefreshOrganization.setIcon(new ThemeResource("../konekti/images/icons/organization-module/arrow-circle-315-left.png"));
organizationButtonGroup.addButton(btnRefreshOrganization);
// btnLockEquipment
btnAddOrganization = new Button();
btnAddOrganization.setCaption("Añadir Organización");
btnAddOrganization.setImmediate(true);
btnAddOrganization.setWidth("-1px");
btnAddOrganization.setHeight("-1px");
btnAddOrganization.setIcon(new ThemeResource("../konekti/images/icons/organization-module/building--plus.png"));
organizationButtonGroup.addButton(btnAddOrganization);
return toolbarLayout;
}
开发者ID:thingtrack,项目名称:konekti,代码行数:32,代码来源:OrganizationToolbar.java
注:本文中的com.vaadin.terminal.ThemeResource类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论