use of com.vaadin.ui.VerticalLayout in project opennms by OpenNMS.
the class PluginManagerAdminApplication method init.
/* (non-Javadoc)
* @see com.vaadin.ui.UI#init(com.vaadin.server.VaadinRequest)
*/
@Override
public void init(VaadinRequest request) {
m_rootLayout = new VerticalLayout();
m_rootLayout.setSizeFull();
m_rootLayout.addStyleName("root-layout");
setContent(m_rootLayout);
// dynamically inject style for non write borders - avoids changing themes css
// Get the stylesheet of the page
Styles styles = Page.getCurrent().getStyles();
// inject the new font size as a style. We need .v-app to override Vaadin's default styles here
styles.add(".v-app .v-textfield-readonly {border: 1px solid #b6b6b6!important;" + " border-top-color: #9d9d9d!important;" + "border-bottom-color: #d6d6d6!important;" + "border-right-color: #d6d6d6!important;" + " opacity: 1.0!important;" + "filter: none; }");
styles.add(".v-app .v-textarea-readonly {border: 1px solid #b6b6b6!important;" + " border-top-color: #9d9d9d!important;" + "border-bottom-color: #d6d6d6!important;" + "border-right-color: #d6d6d6!important;" + " opacity: 1.0!important;" + "filter: none; }");
addHeader(request);
//add diagnostic page links
if (headerLinks != null) {
// defining 2 horizontal layouts to force links to stay together
HorizontalLayout horizontalLayout1 = new HorizontalLayout();
horizontalLayout1.setWidth("100%");
horizontalLayout1.setDefaultComponentAlignment(Alignment.TOP_RIGHT);
HorizontalLayout horizontalLayout2 = new HorizontalLayout();
horizontalLayout1.addComponent(horizontalLayout2);
for (String name : headerLinks.keySet()) {
String urlStr = headerLinks.get(name);
ExternalResource urlResource = new ExternalResource(urlStr);
Link link = new Link(name, urlResource);
// adds space between links
Label label = new Label(" ", ContentMode.HTML);
horizontalLayout2.addComponent(link);
horizontalLayout2.addComponent(label);
}
m_rootLayout.addComponent(horizontalLayout1);
}
PluginManagerUIMainPanel pluginManagerUIMainPanel = new PluginManagerUIMainPanel(sessionPluginManager);
m_rootLayout.addComponent(pluginManagerUIMainPanel);
// this forces the UI panel to use up all the available space below the header
m_rootLayout.setExpandRatio(pluginManagerUIMainPanel, 1.0f);
}
use of com.vaadin.ui.VerticalLayout in project opennms by OpenNMS.
the class MibObjField method initContent.
/* (non-Javadoc)
* @see com.vaadin.ui.CustomField#initContent()
*/
@Override
public Component initContent() {
VerticalLayout layout = new VerticalLayout();
layout.addComponent(table);
layout.addComponent(toolbar);
layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT);
return layout;
}
use of com.vaadin.ui.VerticalLayout in project opennms by OpenNMS.
the class ToolbarPanel method handleLayerButton.
private void handleLayerButton(GraphContainer graphContainer) {
// Toggle layer button
boolean enableLayerButton = graphContainer.getTopologyServiceClient().getGraphProviders().size() > 1;
layerButton.setEnabled(enableLayerButton);
// update the layer layout
layerLayout.removeAllComponents();
if (enableLayerButton) {
graphContainer.getTopologyServiceClient().getGraphProviders().forEach(topologyProvider -> {
boolean selected = topologyProvider.getNamespace().equals(graphContainer.getTopologyServiceClient().getNamespace());
final TopologyProviderInfo topologyProviderInfo = topologyProvider.getTopologyProviderInfo();
final Label nameLabel = new Label(topologyProviderInfo.getName());
VerticalLayout verticalLayout = new VerticalLayout();
verticalLayout.addComponent(nameLabel);
verticalLayout.addStyleName(Styles.LAYOUT);
if (selected) {
verticalLayout.addStyleName(Styles.SELECTED);
}
verticalLayout.addLayoutClickListener((event) -> graphContainer.selectTopologyProvider(topologyProvider, Callbacks.applyDefaults()));
layerLayout.addComponent(verticalLayout);
});
} else {
setLayerLayoutVisible(false);
}
}
use of com.vaadin.ui.VerticalLayout in project opennms by OpenNMS.
the class NodeMapsApplication method addContentLayout.
private void addContentLayout() {
m_layout = new VerticalLayout();
m_layout.setSizeFull();
m_rootLayout.addComponent(m_layout);
m_rootLayout.setExpandRatio(m_layout, 1);
updateWidgetView();
}
use of com.vaadin.ui.VerticalLayout in project opennms by OpenNMS.
the class NodeMapsApplication method createRootLayout.
private void createRootLayout() {
m_rootLayout = new VerticalLayout();
m_rootLayout.setSizeFull();
m_rootLayout.addStyleName("root-layout");
setContent(m_rootLayout);
addHeader();
addContentLayout();
}
Aggregations