本文整理汇总了Java中com.vaadin.ui.themes.BaseTheme类的典型用法代码示例。如果您正苦于以下问题:Java BaseTheme类的具体用法?Java BaseTheme怎么用?Java BaseTheme使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseTheme类属于com.vaadin.ui.themes包,在下文中一共展示了BaseTheme类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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);
}
示例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;
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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);
}
示例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);
}
});
}
示例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(" > ");
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;
}
}
}
示例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());
}
});
}
示例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$
}
});
}
示例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$
}
}
}
});
}
示例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");
}
示例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");
}