• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java BaseTheme类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.vaadin.ui.themes.BaseTheme的典型用法代码示例。如果您正苦于以下问题:Java BaseTheme类的具体用法?Java BaseTheme怎么用?Java BaseTheme使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BaseTheme类属于com.vaadin.ui.themes包,在下文中一共展示了BaseTheme类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initLayout

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
private void initLayout() {
	
	if (parent == null) {
		minMaxCtrlBtn.setVisible(false);
		ctrlMinified = false;
	}
	
	addEditorBtn.setDescription("Add editor");
	addEditorBtn.setStyleName(BaseTheme.BUTTON_LINK);
	addEditorBtn.addClickListener(this);
	
	groupToConnectorBtn.setDescription("Group to connector");
	groupToConnectorBtn.setStyleName(BaseTheme.BUTTON_LINK);
	groupToConnectorBtn.addClickListener(this);
	
	HorizontalLayout extraControlBtns = new HorizontalLayout();
	
	extraControlBtns.addComponents(addEditorBtn, groupToConnectorBtn);
	
	controlsLayout.addComponent(new Label("|"));
	controlsLayout.addComponent(extraControlBtns);
	
	updateGroupToState();
	updateLayout();
}
 
开发者ID:villeteam,项目名称:vexer,代码行数:26,代码来源:StatSubmInfoFilterEditor.java


示例2: initComponents

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
/**
 * Setup UI.
 */
private void initComponents() {
	List<User> users = UserList.INSTANCE.getUsers();
	userSwitchBox = new ComboBox(Messages.getString("UserSwitchPanel.boxCaption")); //$NON-NLS-1$
	setUsers(users);
	User current = (User) VaadinSession.getCurrent().getAttribute(SessionStorageKey.USER.name());
	userSwitchBox.setValue(current);
	
	userSwitchBox.setDescription(
		Messages.getString("UserSwitchPanel.boxDescription")); //$NON-NLS-1$
	userSwitchBox.setNewItemsAllowed(false);
	userSwitchBox.setNullSelectionAllowed(false);
	
	addComponent(userSwitchBox);
	btReload = new Button(Messages.getString("UserSwitchPanel.reloadCaption")); //$NON-NLS-1$
	btReload.setStyleName(BaseTheme.BUTTON_LINK);
	btReload.addStyleName("plain-link"); //$NON-NLS-1$
	
	addComponent(btReload);
}
 
开发者ID:ADHO,项目名称:dhconvalidator,代码行数:23,代码来源:UserSwitchPanel.java


示例3: generateCell

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
@Override
public Object generateCell(Table source, Object itemId, Object columnId) {
	final Property nodeIdProperty = source.getContainerProperty(itemId, m_nodeIdProperty);
	Object cellValue = m_generator.generateCell(source, itemId, columnId);
	if (cellValue == null) {
		return null;
	} else {
		if (nodeIdProperty.getValue() == null) {
			return cellValue;
		} else {
			Button button = new Button((String)cellValue);
			button.setStyleName(BaseTheme.BUTTON_LINK);
			button.setDescription(nodeIdProperty.getValue().toString());
			button.addListener(new ClickListener() {
				@Override
				public void buttonClick(ClickEvent event) {
					SelectionContext context = new DefaultSelectionContext();
					context.selectVertexRefs(Collections.singleton(new AbstractVertexRef("nodes", nodeIdProperty.getValue().toString(), nodeIdProperty.getValue().toString())));
					fireSelectionChangedEvent(context);
				}
			});
			return button;
		}
	}
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:26,代码来源:NodeSelectionLinkGenerator.java


示例4: generateCell

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public Component generateCell(Table source, final Object itemId,
		Object columnId) {

	Button link = new Button("Output");
	link.setStyleName(BaseTheme.BUTTON_LINK);
	link.setDescription("Show job output");

	link.addClickListener(new Button.ClickListener() {

		public void buttonClick(ClickEvent event) {

			select(itemId);
			view.showOutput(itemId);
		}
	});

	return link;
}
 
开发者ID:chipster,项目名称:chipster,代码行数:19,代码来源:JobLogTable.java


示例5: generateCell

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public Component generateCell(Table source, final Object itemId,
		Object columnId) {

	Button link = new Button("Cancel");
	link.setStyleName(BaseTheme.BUTTON_LINK);
	link.setDescription("Cancel running job");

	link.addClickListener(new Button.ClickListener() {

		public void buttonClick(ClickEvent event) {

			select(itemId);
			
			if (itemId instanceof JobsEntry) {
				JobsEntry job = (JobsEntry) itemId;
				
				view.cancel(job);
			}
		}
	});

	return link;
}
 
开发者ID:chipster,项目名称:chipster,代码行数:24,代码来源:JobsTable.java


示例6: generateCell

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public Component generateCell(Table source, final Object itemId,
	            Object columnId) {
	    	
//	        Property prop = source.getItem(itemId).getItemProperty(columnId);
//	        if (prop != null && prop.getType() != null && prop.getType().equals(Long.class)) {
	        	
	    		Button link = new Button("Delete");
	    		link.setStyleName(BaseTheme.BUTTON_LINK);
	    		
	    		link.addClickListener(new Button.ClickListener() {

					public void buttonClick(ClickEvent event) {
						
						view.delete(itemId);
					}
	    		});
	    		
	            return link;
//	        }
//	        return null;
	    }
 
开发者ID:chipster,项目名称:chipster,代码行数:22,代码来源:StorageEntryTable.java


示例7: UploadComponent

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public UploadComponent(Project project, Category category) {
	this.project = project;
	this.category = category;
	
	VerticalLayout verticalLayout = new VerticalLayout();
	verticalLayout.setSpacing(true);
	verticalLayout.setMargin(true);
	setCompositionRoot(verticalLayout);
	
	verticalLayout.addComponent(filesVerticalLayout);
	
	Button button = new Button(CisConstants.uiAddAnother);
	button.setStyleName(BaseTheme.BUTTON_LINK);
	button.addListener(this);
	verticalLayout.addComponent(button);
	
	add();
}
 
开发者ID:alejandro-du,项目名称:cis,代码行数:19,代码来源:UploadComponent.java


示例8: SessionControlComponent

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public SessionControlComponent(User user) {
	HorizontalLayout layout = new HorizontalLayout();
	layout.setSpacing(true);
	layout.setMargin(false, false, false, true);
	
	if(user == null || user.getId() == null) {
		layout.addComponent(restoreButton);
		layout.addComponent(loginButton);
		restoreButton.addListener(this);
		loginButton.addListener(this);
		restoreButton.setStyleName(BaseTheme.BUTTON_LINK);
		loginButton.setStyleName(BaseTheme.BUTTON_LINK);
	} else {
		layout.addComponent(new Label(user.getLogin() + " - "));
		layout.addComponent(updateButton);
		layout.addComponent(logoutButton);
		updateButton.addListener(this);
		logoutButton.addListener(this);
		updateButton.setStyleName(BaseTheme.BUTTON_LINK);
		logoutButton.setStyleName(BaseTheme.BUTTON_LINK);
	}
	
	setCompositionRoot(layout);
}
 
开发者ID:alejandro-du,项目名称:cis,代码行数:25,代码来源:SessionControlComponent.java


示例9: authSuccessful

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
@Override
public void authSuccessful(final String accessToken,
		final String accessTokenSecret, String oauthRawResponse) {
	hola.addComponent(new Label("Authorized."));
	Button testButton = new Button("Test " + service.name + " API");
	testButton.addStyleName(BaseTheme.BUTTON_LINK);
	hola.addComponent(testButton);
	testButton.addClickListener(new ClickListener() {
		@Override
		public void buttonClick(ClickEvent event) {
			GetTestComponent get = new GetTestComponent(service,
					accessToken, accessTokenSecret);
			Window w = new Window(service.name, get);
			w.center();
			w.setWidth("75%");
			w.setHeight("75%");
			addWindow(w);
		}
	});
}
 
开发者ID:ahn,项目名称:vaadin-oauthpopup,代码行数:21,代码来源:DemoUI.java


示例10: update

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public void update() {
    AppUI ui = AppUI.getCurrent();
    boolean isTestMode = ui.isTestMode();

    linksLayout.removeAllComponents();
    btn2win.clear();
    for (Iterator<Window> it = windows.iterator(); it.hasNext();) {
        Window window = it.next();
        Button button = new CubaButton(StringUtils.trimToEmpty(window.getCaption()), new BtnClickListener());
        button.setSizeUndefined();
        button.setStyleName(BaseTheme.BUTTON_LINK);
        button.setTabIndex(-1);

        if (isTestMode) {
            button.setCubaId("breadCrubms_Button_" + window.getId());
            button.setId(ui.getTestIdManager().getTestId("breadCrubms_Button_" + window.getId()));
        }

        btn2win.put(button, window);

        if (it.hasNext()) {
            linksLayout.addComponent(button);

            Label separatorLab = new Label("&nbsp;&gt;&nbsp;");
            separatorLab.setStyleName("c-breadcrumbs-separator");
            separatorLab.setSizeUndefined();
            separatorLab.setContentMode(ContentMode.HTML);
            linksLayout.addComponent(separatorLab);
        } else {
            Label captionLabel = new Label(window.getCaption());
            captionLabel.setStyleName("c-breadcrumbs-win-caption");
            captionLabel.setSizeUndefined();
            linksLayout.addComponent(captionLabel);

            this.label = captionLabel;
        }
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:39,代码来源:WindowBreadCrumbs.java


示例11: AboutLink

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public AboutLink() {
	super(Messages.getString("AboutLink.title")); //$NON-NLS-1$
	setStyleName(BaseTheme.BUTTON_LINK);
	addStyleName("plain-link"); //$NON-NLS-1$
	addClickListener(new ClickListener() {
		
		@Override
		public void buttonClick(ClickEvent event) {
			UI.getCurrent().addWindow(new AboutWindow());
		}
	});
}
 
开发者ID:ADHO,项目名称:dhconvalidator,代码行数:13,代码来源:AboutLink.java


示例12: BackLink

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public BackLink(final ServicesViewName backstepService) {
	super(Messages.getString("BackLink.title")); //$NON-NLS-1$
	setStyleName(BaseTheme.BUTTON_LINK);
	addStyleName("plain-link"); //$NON-NLS-1$
	addClickListener(new ClickListener() {
		
		@Override
		public void buttonClick(ClickEvent event) {
			UI.getCurrent().getNavigator().navigateTo((backstepService==null)?"":backstepService.name()); //$NON-NLS-1$
		}
	});
}
 
开发者ID:ADHO,项目名称:dhconvalidator,代码行数:13,代码来源:BackLink.java


示例13: LogoutLink

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public LogoutLink() {
	super(Messages.getString("LogoutLink.title")); //$NON-NLS-1$
	setStyleName(BaseTheme.BUTTON_LINK);
	addStyleName("plain-link"); //$NON-NLS-1$
	addClickListener(new ClickListener() {
		
		@Override
		public void buttonClick(ClickEvent event) {
			List<Page> pages = new ArrayList<>();
			// keep the pages...
			for (UI ui : VaadinSession.getCurrent().getUIs()) {
				Page page = ui.getPage();
				if (page != null){
					pages.add(page);
				}
			}
				
			VaadinSession.getCurrent().close();

			//... to notify them of the session close
			for (Page p : pages) {
				try {
					p.reload();
				}
				catch (Exception e) {
					Logger.getLogger(""); //$NON-NLS-1$
				}
			}			
		}
	});
}
 
开发者ID:ADHO,项目名称:dhconvalidator,代码行数:32,代码来源:LogoutLink.java


示例14: RenderButton

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public RenderButton(boolean b) {
	super();
	setImmediate(true);
	setStyleName(BaseTheme.BUTTON_LINK);
	setState(b);
	setDescription("Preview the layer");
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:8,代码来源:FindLayersViewComponent.java


示例15: IndeterminateCheckBox

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public IndeterminateCheckBox() {
	super();
	setImmediate(true);
	setStyleName(BaseTheme.BUTTON_LINK);
	setState(OFF);
	setDescription("Select the layer for export");
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:8,代码来源:FindLayersViewComponent.java


示例16: getDeleteButton

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
private Button getDeleteButton(final Object itemId) {
	Button btDelete = new Button();
	btDelete.setIcon(new ThemeResource("images/close.png"));
	btDelete.setStyleName(BaseTheme.BUTTON_LINK);
	btDelete.addClickListener(new ClickListener() {
		private static final long serialVersionUID = -3695725710938486562L;

		@Override
		public void buttonClick(ClickEvent event) {
			typeTable.removeItem(itemId);
			enumDefaultValue.removeItem(itemId);
		}
	});
	return btDelete;
}
 
开发者ID:chipster,项目名称:chipster,代码行数:16,代码来源:Parameter.java


示例17: ProjectOverviewComponent

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public ProjectOverviewComponent(User user, Project project) {
	
	this.project = project;
	
	updatePhoneButton.addListener(this);
	updateCellPhoneButton.addListener(this);
	updatePhoneButton.setStyleName(BaseTheme.BUTTON_LINK);
	updateCellPhoneButton.setStyleName(BaseTheme.BUTTON_LINK);
	
	VerticalLayout verticalLayout = new VerticalLayout();
	verticalLayout.setSpacing(true);
	
	verticalLayout.addComponent(getComponent(CisConstants.uiProject, project.getName()));
	verticalLayout.addComponent(getComponent(CisConstants.uiCustomer, user.getName()));
	verticalLayout.addComponent(getComponent(CisConstants.uiEmail, user.getEmail()));
	verticalLayout.addComponent(getComponent(CisConstants.uiPhoneNumber, user.getPhoneNumber(), updatePhoneButton));
	verticalLayout.addComponent(getComponent(CisConstants.uiCellPhoneNumber, user.getPhoneNumber(), updateCellPhoneButton));
	
	if(project.getComments() != null && !project.getComments().isEmpty()) {
		verticalLayout.addComponent(getComponent(CisConstants.uiComments, project.getComments()));
	}
	
	HorizontalLayout horizontalLayout = new HorizontalLayout();
	horizontalLayout.setSizeFull();
	horizontalLayout.setSpacing(true);
	horizontalLayout.addComponent(logo);
	horizontalLayout.addComponent(verticalLayout);
	horizontalLayout.setExpandRatio(verticalLayout, 1);
	
	setCompositionRoot(horizontalLayout);
}
 
开发者ID:alejandro-du,项目名称:cis,代码行数:32,代码来源:ProjectOverviewComponent.java


示例18: initContent

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
@Override
protected Component initContent() {
    Button button = new CubaButton();
    button.setStyleName(BaseTheme.BUTTON_LINK);
    return button;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:7,代码来源:CubaButtonField.java


示例19: createContentLayout

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
protected AbstractOrderedLayout createContentLayout() {
    HorizontalLayout contentLayout = new HorizontalLayout();
    contentLayout.setStyleName("c-paging-wrap");
    contentLayout.setSpacing(true);

    firstButton = new CubaButton();
    firstButton.setIcon(WebComponentsHelper.getIcon("icons/rows-count-first.png"));
    firstButton.setStyleName("c-paging-change-page");
    firstButton.addStyleName("c-paging-first");
    contentLayout.addComponent(firstButton);

    contentLayout.setComponentAlignment(firstButton, Alignment.MIDDLE_CENTER);

    prevButton = new CubaButton();
    prevButton.setIcon(WebComponentsHelper.getIcon("icons/rows-count-prev.png"));
    prevButton.setStyleName("c-paging-change-page");
    prevButton.addStyleName("c-paging-prev");
    contentLayout.addComponent(prevButton);
    contentLayout.setComponentAlignment(prevButton, Alignment.MIDDLE_CENTER);

    label = new Label();
    label.setWidthUndefined();
    label.setStyleName("c-paging-status");
    contentLayout.addComponent(label);
    contentLayout.setComponentAlignment(label, Alignment.MIDDLE_CENTER);

    countButton = new CubaButton("[?]");
    countButton.setWidthUndefined();
    countButton.setStyleName(BaseTheme.BUTTON_LINK);
    countButton.addStyleName("c-paging-count");
    countButton.setTabIndex(-1);
    contentLayout.addComponent(countButton);
    contentLayout.setComponentAlignment(countButton, Alignment.MIDDLE_CENTER);

    nextButton = new CubaButton();
    nextButton.setIcon(WebComponentsHelper.getIcon("icons/rows-count-next.png"));
    nextButton.setStyleName("c-paging-change-page");
    nextButton.addStyleName("c-paging-next");
    contentLayout.addComponent(nextButton);
    contentLayout.setComponentAlignment(nextButton, Alignment.MIDDLE_CENTER);

    lastButton = new CubaButton();
    lastButton.setIcon(WebComponentsHelper.getIcon("icons/rows-count-last.png"));
    lastButton.setStyleName("c-paging-change-page");
    lastButton.addStyleName("c-paging-last");
    contentLayout.addComponent(lastButton);
    contentLayout.setComponentAlignment(lastButton, Alignment.MIDDLE_CENTER);

    return contentLayout;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:51,代码来源:CubaRowsCount.java


示例20: WebLinkButton

import com.vaadin.ui.themes.BaseTheme; //导入依赖的package包/类
public WebLinkButton() {
    component.addStyleName(BaseTheme.BUTTON_LINK);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:4,代码来源:WebLinkButton.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HasSupportFragmentInjector类代码示例发布时间:2022-05-21
下一篇:
Java ANTLRReaderStream类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap