public FormLayout() { super(); setSpacing(true); setMargin(new MarginInfo(true, false)); setWidth(100, UNITS_PERCENTAGE); }
private Component createComponent(VertexRef ref) { final FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false); final BusinessService businessService = businessServiceManager.getBusinessServiceById(((BusinessServiceVertex) ref).getServiceId()); for (Map.Entry<String, String> e : businessService.getAttributes().entrySet()) { formLayout.addComponent(createLabel(e.getKey(), e.getValue())); } return formLayout; }
public PropertiesForm() { super(); mainLayout = new FormLayout(); mainLayout.setMargin(true); mainLayout.setSpacing(true); mainLayout.setSizeUndefined(); mainLayout.setWidth(100, Sizeable.UNITS_PERCENTAGE); setLayout(mainLayout); }
private Component createComponent(BusinessServiceEdge ref) { FormLayout formLayout = new FormLayout(); formLayout.setMargin(false); formLayout.setSpacing(false); formLayout.addComponent(createLabel("Map Function", describeMapFunction(ref.getMapFunction()))); formLayout.addComponent(createLabel("Weight", Float.toString(ref.getWeight()))); return formLayout; }
public DefaultFormLayoutBuilder() { super(new FormLayout()); getInstance().setSizeUndefined(); getInstance().setMargin(false); getInstance().setSpacing(false); }
private Component createComponent(AbstractBusinessServiceVertex ref, GraphContainer graphContainer) { final FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false);
private Component createComponent(EdgeRef ref) { FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false); if (ref instanceof AbstractEdge) { AbstractEdge edge = (AbstractEdge) ref; formLayout.addComponent(createLabel("Source", edge.getSource().getVertex().getLabel())); formLayout.addComponent(createLabel("Target", edge.getTarget().getVertex().getLabel())); } return formLayout; }
private Component createComponent(EdgeRef ref) { FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false); if (ref instanceof AbstractEdge) { AbstractEdge edge = (AbstractEdge) ref; formLayout.addComponent(createLabel("Source", edge.getSource().getVertex().getLabel())); formLayout.addComponent(createLabel("Target", edge.getTarget().getVertex().getLabel())); } return formLayout; }
private Component createComponent(VertexRef ref) { FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false); formLayout.addComponent(createLabel("Name", ref.getLabel())); formLayout.addComponent(createLabel("ID", String.format("%s:%s", ref.getNamespace(), ref.getId()))); if (ref instanceof AbstractVertex) { AbstractVertex vertex = (AbstractVertex) ref; formLayout.addComponent(createLabel("Icon Key", vertex.getIconKey())); if (vertex.getIpAddress() != null) { formLayout.addComponent(createLabel("IP Address", vertex.getIpAddress())); } } return formLayout; }
private Component createComponent(VertexRef ref) { FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false); formLayout.addComponent(createLabel("Name", ref.getLabel())); formLayout.addComponent(createLabel("ID", String.format("%s:%s", ref.getNamespace(), ref.getId()))); if (ref instanceof AbstractVertex) { AbstractVertex vertex = (AbstractVertex) ref; formLayout.addComponent(createLabel("Icon Key", vertex.getIconKey())); if (vertex.getIpAddress() != null) { formLayout.addComponent(createLabel("IP Address", vertex.getIpAddress())); } } return formLayout; }
private Component createComponent(AbstractVertex ref) { Preconditions.checkState(ref.getNodeID() != null, "no Node ID defined."); OnmsNode node = nodeDao.get(ref.getNodeID()); FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false); formLayout.addComponent(createLabel("Node ID", "" + node.getId())); final HorizontalLayout nodeButtonLayout = new HorizontalLayout(); Button nodeButton = createButton(node.getLabel(), null, null, event -> new NodeInfoWindow(ref.getNodeID()).open()); nodeButton.setStyleName(BaseTheme.BUTTON_LINK); nodeButtonLayout.addComponent(nodeButton); nodeButtonLayout.setCaption("Node Label"); formLayout.addComponent(nodeButtonLayout); if (!Strings.isNullOrEmpty(node.getSysObjectId())) { formLayout.addComponent(createLabel("Enterprise OID", node.getSysObjectId())); } return formLayout; }
private Component createComponent(AbstractVertex ref) { Preconditions.checkState(ref.getNodeID() != null, "no Node ID defined."); OnmsNode node = nodeDao.get(ref.getNodeID()); FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false); formLayout.addComponent(createLabel("Node ID", "" + node.getId())); final HorizontalLayout nodeButtonLayout = new HorizontalLayout(); Button nodeButton = createButton(node.getLabel(), null, null, event -> new NodeInfoWindow(ref.getNodeID()).open()); nodeButton.setStyleName(BaseTheme.BUTTON_LINK); nodeButtonLayout.addComponent(nodeButton); nodeButtonLayout.setCaption("Node Label"); formLayout.addComponent(nodeButtonLayout); if (!Strings.isNullOrEmpty(node.getSysObjectId())) { formLayout.addComponent(createLabel("Enterprise OID", node.getSysObjectId())); } return formLayout; }
private Component createComponent(BusinessServiceEdge ref, GraphContainer container) { FormLayout formLayout = new FormLayout(); formLayout.setMargin(false); formLayout.setSpacing(false); formLayout.addStyleName("severity"); final BusinessServiceStateMachine stateMachine = SimulationAwareStateMachineFactory.createStateMachine(businessServiceManager, container.getCriteria()); final Status outgoingStatus = BusinessServicesStatusProvider.getStatus(stateMachine, ref); final Status incomingStatus = BusinessServicesStatusProvider.getStatus(stateMachine, ((AbstractBusinessServiceVertex) ref.getTarget() .getVertex())); formLayout.addComponent(createStatusLabel("Outgoing Severity", outgoingStatus)); formLayout.addComponent(createStatusLabel("Incoming Severity", incomingStatus)); return formLayout; }
/** * Creates the upper right component of the options grid. * Creation includes the initialization of {@link #m_filePathField}. * * @return the upper right component in the options grid. */ private Component createUpperRightComponent() { HorizontalLayout upperRight = new HorizontalLayout(); upperRight.setSizeFull(); FormLayout fileNameDisplay = new FormLayout(); fileNameDisplay.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); fileNameDisplay.setSizeFull(); m_filePathField = new TextField(); m_filePathField.setWidth("100%"); m_filePathField.setEnabled(true); m_filePathField.setReadOnly(true); fileNameDisplay.addComponent(m_filePathField); fileNameDisplay.setSpacing(true); FormLayout filePathDisplay = new FormLayout(); filePathDisplay.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); filePathDisplay.setSizeFull(); filePathDisplay.addComponent(m_filePathField); filePathDisplay.setSpacing(true); upperRight.addComponent(filePathDisplay); upperRight.setExpandRatio(filePathDisplay, 2f); HorizontalLayout placeHolder = new HorizontalLayout(); placeHolder.setWidth(CmsMessageBundleEditorTypes.OPTION_COLUMN_WIDTH_PX); upperRight.addComponent(placeHolder); return upperRight; }
private Component createComponent(ReductionKeyVertex vertex, GraphContainer container) { final FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false);
formLayout.setSpacing(true); formLayout.setMargin(true);
private Component createComponent(BusinessServiceVertex vertex, GraphContainer container) { final FormLayout rootLayout = new FormLayout(); rootLayout.setSizeFull(); rootLayout.setSpacing(false); rootLayout.setMargin(false); rootLayout.addStyleName("severity");
eventLayout.setSpacing(true);
eventLayout.setSpacing(true);
layout.setSpacing(true); layout.setMargin(false); layout.setWidth("100%");