Example usage for com.vaadin.ui Button addStyleName

List of usage examples for com.vaadin.ui Button addStyleName

Introduction

In this page you can find the example usage for com.vaadin.ui Button addStyleName.

Prototype

@Override
    public void addStyleName(String style) 

Source Link

Usage

From source file:nl.kpmg.lcm.ui.view.administration.RemoteLcmPanel.java

License:Apache License

private Button initCreateButton(RestClientService restClientService1) {
    Button createButton = new Button("Create");
    createButton.addStyleName("margin-10");
    createButton.addClickListener((Button.ClickEvent event) -> {
        RemoteLcmCreateWindow remoteLcmCreateWindow = new RemoteLcmCreateWindow(restClientService1, this);
        UI.getCurrent().addWindow(remoteLcmCreateWindow);
    });//from   ww  w . j  ava2 s .co  m

    return createButton;
}

From source file:nl.kpmg.lcm.ui.view.administration.RemoteLcmPanel.java

License:Apache License

private HorizontalLayout createActionsLayout(RemoteLcmRepresentation item) {

    HorizontalLayout actionsLayout = new HorizontalLayout();

    Button viewButton = new Button("view");
    viewButton.setData(item);/*from www.  j  a v a2  s  .co  m*/
    viewButton.addClickListener((event) -> {
        RemoteLcmRepresentation data = (RemoteLcmRepresentation) event.getButton().getData();
        setSelectedRemoteLcm(data);
    });
    viewButton.addStyleName("link");

    Button editButton = new Button("edit");
    editButton.setData(item);
    editButton.addClickListener(new EditRemoteLcmListener(this, restClientService));
    editButton.addStyleName("link");

    Button deleteButton = new Button("delete");
    deleteButton.setData(item);
    deleteButton.addClickListener(new DeleteRemoteLcmListener(this, restClientService));
    deleteButton.addStyleName("link");

    Button exportUsersButton = new Button("export users");
    exportUsersButton.setData(item);
    exportUsersButton.addClickListener(new ExportUsersToRemoteLcmListener(this, restClientService));
    exportUsersButton.addStyleName("link");

    Button testButton = new Button("test");
    testButton.setData(item);
    testButton.addClickListener(new TestRemoteLcmListener(this, restClientService));
    testButton.addStyleName("link");

    actionsLayout.addComponent(viewButton);
    actionsLayout.addComponent(editButton);
    actionsLayout.addComponent(deleteButton);
    actionsLayout.addComponent(exportUsersButton);
    actionsLayout.addComponent(testButton);

    return actionsLayout;
}

From source file:nl.kpmg.lcm.ui.view.administration.StoragePanel.java

License:Apache License

private Button initRefreshButton() {
    Button refreshButton = new Button("Refresh");
    refreshButton.addClickListener((Button.ClickEvent event) -> {
        updateStorageTable();//from  w w  w . j a va 2  s .  co m
    });
    refreshButton.addStyleName("margin-10");

    return refreshButton;
}

From source file:nl.kpmg.lcm.ui.view.administration.StoragePanel.java

License:Apache License

private Button initCreateButton(RestClientService restClientService1) {
    Button createButton = new Button("Create");
    createButton.addClickListener((Button.ClickEvent event) -> {
        StorageCreateWindow storageCreateWindow = new StorageCreateWindow(restClientService1, this);
        UI.getCurrent().addWindow(storageCreateWindow);
    });/* w ww  . j  a  va 2s.  c  o m*/
    createButton.addStyleName("margin-10");

    return createButton;
}

From source file:nl.kpmg.lcm.ui.view.administration.StoragePanel.java

License:Apache License

private HorizontalLayout createActionsLayout(StorageRepresentation item) {

    HorizontalLayout actionsLayout = new HorizontalLayout();

    Button viewButton = new Button("view");
    viewButton.setData(item);/* w  ww .j a v a2  s. c  o m*/
    viewButton.addClickListener((event) -> {
        StorageRepresentation data = (StorageRepresentation) event.getButton().getData();
        setSelectedStorage(data);
    });
    viewButton.addStyleName("link");

    Button editButton = new Button("edit");
    editButton.setData(item);
    editButton.addClickListener(new EditStorageListener(this, restClientService));
    editButton.addStyleName("link");

    Button deleteButton = new Button("delete");
    deleteButton.setData(item);
    deleteButton.addClickListener(new DeleteStorageListener(this, restClientService));
    deleteButton.addStyleName("link");

    Button testButton = new Button("test connection");
    testButton.setData(item);
    testButton.addClickListener(new TestStorageListener(this, restClientService));
    testButton.addStyleName("link");

    actionsLayout.addComponent(viewButton);
    actionsLayout.addComponent(editButton);
    actionsLayout.addComponent(deleteButton);
    actionsLayout.addComponent(testButton);

    return actionsLayout;
}

From source file:nl.kpmg.lcm.ui.view.administration.UserGroupPanel.java

License:Apache License

private Button initRefreshButton() {
    Button refreshButton = new Button("Refresh");
    refreshButton.addClickListener((Button.ClickEvent event) -> {
        updateUserTable();//from  w  w  w. j  a  v a 2 s .co  m
    });
    refreshButton.addStyleName("margin-10");

    return refreshButton;
}

From source file:nl.kpmg.lcm.ui.view.administration.UserGroupPanel.java

License:Apache License

private Button initCreateButton(RestClientService restClientService1) {
    Button createButton = new Button("Create");
    createButton.addClickListener((Button.ClickEvent event) -> {
        UserGroupCreateWindow userGroupCreateWindow = new UserGroupCreateWindow(restClientService1, this);
        UI.getCurrent().addWindow(userGroupCreateWindow);
    });/*from  ww w. j  a v  a 2s.  c o m*/
    createButton.addStyleName("margin-10");

    return createButton;
}

From source file:nl.kpmg.lcm.ui.view.administration.UserGroupPanel.java

License:Apache License

private HorizontalLayout createActionsLayout(UserGroupRepresentation item) {

    HorizontalLayout actionsLayout = new HorizontalLayout();

    Button viewButton = new Button("view");
    viewButton.setData(item);//ww  w .jav a2s .c  om
    viewButton.addClickListener((event) -> {
        UserGroupRepresentation data = (UserGroupRepresentation) event.getButton().getData();
        setSelectedUser(data);
    });
    viewButton.addStyleName("link");

    Button editButton = new Button("edit");
    editButton.setData(item);
    editButton.addClickListener(new EditUserGroupListener(this, restClientService));
    editButton.addStyleName("link");

    Button deleteButton = new Button("delete");
    deleteButton.setData(item);
    deleteButton.addClickListener(new DeleteUserGroupListener(this, restClientService));
    deleteButton.addStyleName("link");

    actionsLayout.addComponent(viewButton);
    actionsLayout.addComponent(editButton);
    actionsLayout.addComponent(deleteButton);

    return actionsLayout;
}

From source file:nl.kpmg.lcm.ui.view.administration.UserPanel.java

License:Apache License

private Button initCreateButton(RestClientService restClientService1) {
    Button createButton = new Button("Create");
    createButton.addClickListener((Button.ClickEvent event) -> {
        UserCreateWindow userCreateWindow = new UserCreateWindow(restClientService1, this);
        UI.getCurrent().addWindow(userCreateWindow);
    });/*from   w  ww.  ja va  2 s . com*/
    createButton.addStyleName("margin-10");

    return createButton;
}