Here are the examples of the java api com.vaadin.server.FontAwesome.EXPAND taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
6
Source : AbstractDashboardView.java
with Apache License 2.0
from ijazfx
with Apache License 2.0
from ijazfx
private Component buildDashlet(final Component content) {
final CssLayout slot = new CssLayout();
slot.setWidth("100%");
slot.addStyleName("dashboard-panel-slot");
CssLayout card = new CssLayout();
card.setWidth("100%");
card.addStyleName(ValoTheme.LAYOUT_CARD);
MHorizontalLayout toolbar = new MHorizontalLayout();
toolbar.addStyleName("dashboard-panel-toolbar");
toolbar.setWidth("100%");
Label caption = new Label(content.getCaption());
caption.addStyleName(ValoTheme.LABEL_H4);
caption.addStyleName(ValoTheme.LABEL_COLORED);
caption.addStyleName(ValoTheme.LABEL_NO_MARGIN);
content.setCaption(null);
MenuBar tools = new MenuBar();
tools.addStyleName(ValoTheme.MENUBAR_BORDERLESS);
MenuItem max = tools.addItem("", FontAwesome.EXPAND, new Command() {
@Override
public void menuSelected(final MenuItem selectedItem) {
if (!slot.getStyleName().contains("max")) {
selectedItem.setIcon(FontAwesome.COMPRESS);
toggleMaximized(slot, true);
} else {
slot.removeStyleName("max");
selectedItem.setIcon(FontAwesome.EXPAND);
toggleMaximized(slot, false);
}
}
});
max.setStyleName("icon-only");
MenuItem root = tools.addItem("", FontAwesome.ELLIPSIS_V, null);
root.addItem("Configure", new Command() {
@Override
public void menuSelected(final MenuItem selectedItem) {
Notification.show("Not implemented in this demo");
}
});
root.addSeparator();
root.addItem("Close", new Command() {
@Override
public void menuSelected(final MenuItem selectedItem) {
Notification.show("Not implemented in this demo");
}
});
toolbar.addComponents(caption, tools);
toolbar.setExpandRatio(caption, 1);
toolbar.setComponentAlignment(caption, Alignment.MIDDLE_LEFT);
card.addComponents(toolbar, content);
slot.addComponent(card);
return slot;
}