/** * Creates all controls and adds them to the frame. * * @param modeController */ private void init() { if (mControls != null) return; final String form = "right:max(20dlu;p), 2dlu, p, 1dlu,right:max(20dlu;p), 4dlu, 80dlu, 7dlu"; final FormLayout rightLayout = new FormLayout(form, ""); final DefaultFormBuilder rightBuilder = new DefaultFormBuilder(rightLayout); rightBuilder.setBorder(Borders.DLU2_BORDER); rightBuilder.appendSeparator(TextUtils.getText("OptionPanel.separator.NodeStyle")); if (addStyleBox) { addAutomaticLayout(rightBuilder); addStyleBox(rightBuilder); } mNodeStyleButton = addStyleButton( rightBuilder, "actual_node_styles", modeController.getAction(ManageNodeConditionalStylesAction.NAME)); if (addStyleBox) { mMapStyleButton = addStyleButton( rightBuilder, "actual_map_styles", modeController.getAction(ManageMapConditionalStylesAction.NAME)); } mControls = getControls(); for (final IPropertyControl control : mControls) { control.layout(rightBuilder); } add(rightBuilder.getPanel(), BorderLayout.CENTER); addListeners(); setFont(this, 10); }
private void layoutPanel() { initComponents(); FormLayout layout = new FormLayout("p:g, 1px, min", "f:p"); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); builder.append(feeField, feeButton); }
public PathwayToolTip(List<VPathwayElement> elements) { applyToolTipStyle(this); setLayout(new BorderLayout()); DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout("pref")); for (ToolTipProvider p : toolTipProviders) { Component c = p.createToolTipComponent(this, elements); if (c != null) { hasContent = true; builder.append(c); builder.nextLine(); } } JPanel contents = builder.getPanel(); applyToolTipStyle(contents); JScrollPane scroll = new JScrollPane( contents, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); int w = contents.getPreferredSize().width + scroll.getVerticalScrollBar().getPreferredSize().width + 5; int h = contents.getPreferredSize().height + scroll.getHorizontalScrollBar().getPreferredSize().height + 5; w = Math.min(400, w); h = Math.min(500, h); setPreferredSize(new Dimension(w, h)); add(scroll, BorderLayout.CENTER); }
private void initView() { this.setLayout(new BorderLayout()); JToolBar toolBar = new JToolBar(); ActionManager actionManager = Application.getInstance().getActionManager(); toolBar.add(actionManager.getAction(CreateAttributeAction.class).buildButton()); add(toolBar, BorderLayout.NORTH); className = new TextAdapter(new JTextField()) { @Override protected void updateModel(String text) { setClassName(text); } }; FormLayout layout = new FormLayout("right:50dlu, 3dlu, fill:150dlu, 3dlu, fill:100", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder(); builder.append("Class Name:", className.getComponent(), 3); add(builder.getPanel(), BorderLayout.CENTER); }
private JComponent buildFormPanel() { FormLayout layout = new FormLayout("l:p,2dlu,75dlu", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.append("Fecha", Binder.createDateComponent(model.getModel("fecha"))); condonar = BasicComponentFactory.createCheckBox(model.getModel("condonar"), ""); builder.append("Condonar cargo", condonar); return builder.getPanel(); }
private JPanel buildCenterPanel() { FormLayout layout = new FormLayout("d", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.append(addButton); builder.append(removeButton); return builder.getPanel(); }
private JComponent buildForm() { initComponents(); final FormLayout layout = new FormLayout("p,3dlu,f:60dlu:g", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.append("Fecha Inicial", fechaInicial); builder.append("Fecha Final", fechaFinal); builder.append("Facturistas", choferes); return builder.getPanel(); }
private void addStyleBox(final DefaultFormBuilder rightBuilder) { mStyleBox = uiFactory.createStyleBox(); mSetStyle = new BooleanProperty(StyleEditorPanel.SET_RESOURCE); final StyleChangeListener listener = new StyleChangeListener(); mSetStyle.addPropertyChangeListener(listener); mSetStyle.layout(rightBuilder); rightBuilder.append(new JLabel(TextUtils.getText("style"))); rightBuilder.append(mStyleBox); rightBuilder.nextLine(); }
public void init(BarFormat format) { if (format == null) return; FormFormat form = format.getForm(); if (form == null) return; List boxes = form.getBoxes(); if (boxes == null || boxes.size() == 0) { return; } FormBoxLayout formBoxLayout = form.getLayout(zoom); FormLayout layout = new FormLayout(formBoxLayout.getColumnGrid(), formBoxLayout.getRowGrid()); /// DefaultFormBuilder builder = new DefaultFormBuilder(this,layout); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); if (formBoxLayout.getBorder() == null) builder.setDefaultDialogBorder(); else builder.setBorder(Borders.createEmptyBorder(formBoxLayout.getBorder())); CellConstraints cc = new CellConstraints(); for (Iterator i = boxes.iterator(); i.hasNext(); ) { FormBox box = (FormBox) i.next(); if (zoom < box.getMinZoom()) return; JComponent component; if (box.getFieldId() == null) component = new JLabel(Messages.getString(box.getTextId())); else { if (editor && !box.getField().isReadOnly()) { component = new ChangeAwareTextField(); component.setBorder(null); // component.setOpaque(false); } else component = new JLabel(); // if (box.getRow()==1&&!editor) // ((JLabel)component).setHorizontalAlignment(SwingConstants.CENTER); // bug workaround, not possible to center with classic method when rowSpan>1 fieldComponents.put(box.getFieldId(), component); } Font font = formBoxLayout.getFont(box.getFont()); if (font != null) component.setFont(font); String ba = box.getAlignment(); int bc = box.getColumn(); int br = box.getRow(); int bcs = box.getColumnSpan(); int brs = box.getRowSpan(); try { builder.add( component, (ba == null) ? cc.xywh(bc, br, bcs, brs) : cc.xywh(bc, br, bcs, brs, ba)); } catch (IndexOutOfBoundsException e) { log.fatal("box.Column(): " + bc); log.fatal("box.Row(): " + br); log.fatal("box.ColumnSpan(): " + bcs); log.fatal("box.RowSpan(): " + brs); log.fatal("box.Alignment(): " + ba); log.fatal("Occur Error: ", e); } } }
@Override protected JComponent buildContent() { salidaField = new JSpinner(); SpinnerDateModel model = new SpinnerDateModel(new Date(), null, null, Calendar.MINUTE); salidaField.setModel(model); salidaField.setEnabled(enabled); afterCreated(salidaField); JPanel panel = new JPanel(new BorderLayout()); FormLayout layout = new FormLayout("40dlu,2dlu,100dlu", ""); final DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.append("Salida:", salidaField); panel.add(builder.getPanel(), BorderLayout.CENTER); panel.add(buildButtonBarWithOKCancel(), BorderLayout.SOUTH); return panel; }
private void layoutMainPanel() { Resource rb = Resource.get(); initComponents(); FormLayout layout = new FormLayout("2dlu, right:d, $lcgap, max(40dlu;d), $lcgap, d", "min"); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); setLayout(layout); setBorder(Borders.EMPTY); builder.add(new JLabel(rb.getString("Label.Year")), CC.xy(2, 1)); builder.add(yearSpinner, CC.xy(4, 1)); builder.add(sparklinePanel, CC.xy(6, 1)); }
public SubstanceFontSlider() { FormLayout layout = new FormLayout("fill:pref, 1dlu, 50dlu", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); setBorder(new EmptyBorder(0, 0, 0, 0)); setLayout(layout); fontSizeLabel = new JLabel(); fontSizeLabel.setText(baseSize + " pt."); builder.append(fontSizeLabel); final JSlider slider = new JSlider(-3, 6, 0); slider.setFocusable(false); slider.setMinorTickSpacing(1); slider.setSnapToTicks(true); slider.setToolTipText(ResourceUtils.getString("ToolTip.FontSize")); slider.addChangeListener( new ChangeListener() { @Override public void stateChanged(final ChangeEvent e) { EventQueue.invokeLater( () -> fontSizeLabel.setText(slider.getValue() + baseSize + " pt.")); if (!slider.getModel().getValueIsAdjusting()) { final int adjust = slider.getValue(); adjustSize(adjust); Preferences.userNodeForPackage(SubstanceFontSlider.class) .putInt(ADJUSTMENT_KEY, adjust); } } }); builder.append(slider); int adjust = Preferences.userNodeForPackage(SubstanceFontSlider.class).getInt(ADJUSTMENT_KEY, 0); if (adjust != 0) { adjustSize(adjust); } }
public CheckboxesPanel(@Uses FieldSubmissionDTO field, @Uses CheckboxesFieldValue fieldValue) { super(field); JPanel panel = new JPanel(new BorderLayout()); FormLayout formLayout = new FormLayout("200dlu", ""); DefaultFormBuilder formBuilder = new DefaultFormBuilder(formLayout, panel); checkBoxMap = new HashMap<String, JCheckBox>(); for (String element : fieldValue.values().get()) { JCheckBox checkBox = new JCheckBox(element); checkBoxMap.put(element, checkBox); formBuilder.append(checkBox); formBuilder.nextLine(); } add(panel, BorderLayout.WEST); }
public PersonDetailsPanel(PersonDetailsModel model, BindingService bindingService) { super(model, bindingService); // Create all the Swing components this.heightLabel = newFieldLabel(); this.height = new JTextField(); this.genderLabel = newFieldLabel(); // this.gender = new JTextField(); this.genders = new JComboBox(); this.eyeColourLabel = newFieldLabel(); // this.eyeColour = new JTextField(); this.eyeColours = new JComboBox(); // Bind the Swing components to the model bind(TextBinding.text(model, Properties.EYE_COLOUR_LABEL, this.eyeColourLabel)); // bind(TextBinding.text(model, Properties.EYE_COLOUR, this.eyeColour)); // bind(StateBinding.editable(model, Properties.EYE_COLOUR_EDITABLE, this.eyeColour)); bind(ListBinding.model(model, Properties.EYE_COLOURS, this.eyeColours)); bind(ListBinding.selection(model, Properties.EYE_COLOUR, this.eyeColours)); bind(StateBinding.editable(model, Properties.EYE_COLOUR_EDITABLE, this.eyeColours)); bind(StateBinding.enabled(model, Properties.EYE_COLOUR_ENABLED, this.eyeColours)); bind(TextBinding.text(model, Properties.GENDER_LABEL, this.genderLabel)); // bind(TextBinding.text(model, Properties.GENDER, this.gender)); // bind(StateBinding.editable(model, Properties.GENDER_EDITABLE, this.gender)); bind(ListBinding.model(model, Properties.GENDERS, this.genders)); bind(ListBinding.selection(model, Properties.GENDER, this.genders)); bind(StateBinding.editable(model, Properties.GENDER_EDITABLE, this.genders)); bind(StateBinding.enabled(model, Properties.GENDER_ENABLED, this.genders)); bind(TextBinding.text(model, Properties.HEIGHT_LABEL, this.heightLabel)); bind(TextBinding.text(model, Properties.HEIGHT, this.height)); bind(StateBinding.editable(model, Properties.HEIGHT_EDITABLE, this.height)); // Lay out the components. DefaultFormBuilder builder = new DefaultFormBuilder( new FormLayout( LayoutFactory2.componentColumnSpec(2, 1, 2), LayoutFactory2.relatedRowSpec(3)), this); builder.append(this.genderLabel); // builder.append(this.gender); builder.append(this.genders); builder.nextLine(2); builder.append(this.heightLabel); builder.append(this.height, 5); builder.nextLine(2); builder.append(this.eyeColourLabel); // builder.append(this.eyeColour); builder.append(this.eyeColours); }
/** * Builds the panel. Initializes and configures components first, then creates a FormLayout, * configures the layout, creates a builder, sets a border, and finally adds the components. * * @return the built panel */ public JComponent createContentPanel() { FormLayout layout = new FormLayout( "p,3dlu,p,3dlu", // cols //$NON-NLS-1$ "p,10dlu,p,10dlu"); // rows //$NON-NLS-1$ // Create a builder that assists in adding components to the container. // Wrap the panel with a standardized border. DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); JEditorPane l = new JEditorPane("text/html", Messages.getString("LicenseDialog.Email")); l.setEditable(false); l.setOpaque(false); l.setFont(l.getFont().deriveFont(Font.PLAIN)); JLabel emailLabel = new JLabel(Messages.getString("LicenseDialog.EmailLabel") + ":"); // emailLabel.setFont(emailLabel.getFont().deriveFont(Font.PLAIN)); builder.add(l, cc.xyw(1, 1, 4)); builder.nextLine(2); builder.append(emailLabel, email); builder.nextLine(2); JComponent result = builder.getPanel(); return result; }
private JButton addStyleButton( DefaultFormBuilder rightBuilder, String label, AFreeplaneAction action) { final JButton button = new JButton() { private static final long serialVersionUID = 1L; { setUI(BasicButtonUI.createUI(this)); } }; button.addActionListener(action); button.setHorizontalAlignment(SwingConstants.LEFT); final String labelText = TextUtils.getText(label); UITools.addTitledBorder(button, labelText, 10); rightBuilder.append(button, rightBuilder.getColumnCount()); rightBuilder.nextLine(); return button; }
/** Builds the panel with the labels in the center. */ void layoutPanel() { initComponents(); FormLayout layout = new FormLayout("c:p:g", "c:p:g"); DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.border(Borders.DIALOG); builder.append(messageLabel); setLayout(new BorderLayout()); JPanel panel = builder.getPanel(); add(panel, BorderLayout.CENTER); setAlpha(0.4f); }
public static JPanel makeDonatePanel(boolean border) { FormLayout layout = new FormLayout( "250px", // cols //$NON-NLS-1$ "p, 6dlu, p"); // rows //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); if (border) builder.setDefaultDialogBorder(); JLabel msg = new JLabel(Messages.getString("Text.donateMessage")); builder.append(msg); builder.nextLine(2); ImageIcon icon = IconManager.getIcon("paypal.donate"); JButton donate = new JButton(icon); donate.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); builder.append(donate); donate.setEnabled(true); donate.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent arg0) { BrowserControl.displayURL(donateUrl); } }); return builder.getPanel(); }
/** Create panel with aligned labels on the right and fields on the left. */ public static JPanel createForm( String title, Component[] leftComponents, Component[] rightComponents) { if (leftComponents.length != rightComponents.length) { throw new IllegalArgumentException( "Arrays must be the same size, instead got " + leftComponents.length + "and " + rightComponents.length); } int numRows = leftComponents.length; if (numRows == 0) { throw new IllegalArgumentException("Zero components."); } FormLayout layout = new FormLayout("right:100, 3dlu, left:300", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder(); if (title != null) { builder.appendSeparator(title); } for (int i = 0; i < numRows; i++) { builder.append(leftComponents[i], rightComponents[i]); builder.nextLine(); } return builder.getPanel(); }
private void buildLayout(String hostProgramTitle) { DefaultFormBuilder b = new DefaultFormBuilder(new FormLayout("fill:p:grow")); b.append( "<html>The following programs are needed for full functionality of " + hostProgramTitle + ".<br>" + "Install the external program first, then click 'relocate'.<br>" + "If the program is installed but cannot be found, double-click on the program to assign its location manually.</html>"); model = new DefaultListModel(); for (Binary bin : binaries) model.addElement(bin); list = new JList(model); list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); list.setFont(list.getFont().deriveFont(Font.PLAIN)); list.setVisibleRowCount(4); list.setCellRenderer( new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JLabel l = (JLabel) super.getListCellRendererComponent( list, value, index, isSelected, cellHasFocus); Binary b = (Binary) value; String found = ""; if (b.isFound()) { l.setIcon(ImageLoader.getImage(ImageLoader.Image.ok)); found = b.getLocation(); } else { l.setIcon(ImageLoader.getImage(ImageLoader.Image.error)); found = "<b>Not found</b>"; } l.setText( "<html><b>" + b.getDescription() + "</b><br><table><tr><td>Program:</td><td>" + b.getCommand() + "</td></tr><tr><td>Location:</td><td>" + found + "</td></tr></html>"); l.setBorder(new EmptyBorder(5, 0, 5, 0)); return l; } }); b.append(new JScrollPane(list)); close = new JButton("Close"); relocate = new JButton("Relocate program automatically."); JPanel buttons = ButtonBarFactory.buildRightAlignedBar(relocate, close); b.append(buttons); b.setBorder(new EmptyBorder(10, 10, 10, 10)); setLayout(new BorderLayout()); add(b.getPanel()); }
private void layoutMainPanel() { initComponents(); FormLayout layout = new FormLayout("p, 4dlu, fill:70dlu:g", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.border(Borders.DIALOG); builder.append(rb.getString("Label.DatabaseServer"), hostField); builder.append(rb.getString("Label.Port"), portField); builder.append(rb.getString("Label.Password"), passwordField); builder.nextLine(); builder.appendUnrelatedComponentsGapRow(); builder.nextLine(); builder.append(StaticUIMethods.buildOKCancelBar(okButton, cancelButton), 3); getContentPane().add(builder.getPanel()); pack(); setResizable(false); }
private void layoutMainPanel() { initComponents(); FormLayout layout = new FormLayout("p, 8dlu, d:g", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); builder.appendSeparator(rb.getString("Title.ImpSum")); builder.nextLine(); builder.appendRelatedComponentsGapRow(); builder.nextLine(); builder.append(rb.getString("Label.DestAccount"), destLabel); builder.append(rb.getString("Label.NumTrans"), transCount); }
@Override protected JComponent buildMasterForm() { FormLayout layout = new FormLayout("50dlu,2dlu,60dlu, 3dlu,50dlu,2dlu,f:p:g", ""); final DefaultFormBuilder builder = new DefaultFormBuilder(layout); if (model.getValue("id") != null) { builder.append("Id", addReadOnly("id"), true); } builder.append("Fecha", getControl("fecha"), true); builder.append("Proveedor", getControl("proveedor"), 5); builder.append("Comentario", getControl("comentario"), 5); builder.append("Total", addReadOnly("total"), true); return builder.getPanel(); }
@Override protected JComponent buildFormPanel() { FormLayout layout = new FormLayout("p,2dlu,p:g(.5) 3dlu" + ",p,2dlu,p:g(.5)", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout); if (isPorFactura()) builder.append("Comisión", getControl("comision")); else builder.append("Precio (TON)", getControl("precioPorTonelada")); builder.nextLine(); builder.append("Comentario", getControl("comentario"), 5); return builder.getPanel(); }
private JPanel layoutPanel() { final FormLayout layout = new FormLayout("75dlu:g, 8dlu, p", "f:p:g(1.0)"); final DefaultFormBuilder builder = new DefaultFormBuilder(layout); final JScrollPane scrollPane = new JScrollPane(list); builder.append(scrollPane, layoutButtonPanel()); builder.nextLine(); builder.appendRelatedComponentsGapRow(); builder.nextLine(); builder.append(entryField, insertButton); return builder.getPanel(); }
public JDKPath() { FormLayout layout = new FormLayout("pref, 5dlu, pref, 5dlu, pref", "pref, 5dlu, pref, 10dlu, pref"); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); CellConstraints cc = new CellConstraints(); builder.add(new JLabel("Minimum JDK Version:"), cc.xy(1, 1)); builder.add(minVer = new JTextField(6), cc.xyw(3, 1, 3)); builder.add(new JLabel("Maximum JDK Version:"), cc.xy(1, 3)); builder.add(maxVer = new JTextField(6), cc.xyw(3, 3, 3)); builder.add(new JLabel("Display panel if a JDK exists"), cc.xy(1, 5)); builder.add(yes = new JRadioButton("Yes"), cc.xy(3, 5)); builder.add(no = new JRadioButton("No"), cc.xy(5, 5)); builder.nextLine(); ButtonGroup bg = new ButtonGroup(); bg.add(yes); bg.add(no); }
private JPanel layoutButtonPanel() { final FormLayout layout = new FormLayout("p:g", "d, 6dlu, d, f:p:g(1.0), d"); final DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.append(upButton); builder.nextLine(); builder.nextLine(); builder.append(downButton); builder.nextLine(); builder.nextLine(); builder.append(removeButton); return builder.getPanel(); }
private void layoutDialog() { final FormLayout layout = new FormLayout("p:g", "f:p:g(1.0)"); final DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.border(Borders.DIALOG); builder.append(layoutPanel()); builder.nextLine(); builder.appendUnrelatedComponentsGapRow(); builder.nextLine(); builder.append(StaticUIMethods.buildOKCancelBar(okButton, cancelButton)); getContentPane().add(builder.getPanel(), BorderLayout.CENTER); pack(); setMinimumSize(getSize()); }
private void addAutomaticLayout(final DefaultFormBuilder rightBuilder) { { if (mAutomaticLayoutComboBox == null) { NamedObject[] automaticLayoutTypes = NamedObject.fromEnum(AutomaticLayout.class); mAutomaticLayoutComboBox = new JComboBox(automaticLayoutTypes); DefaultComboBoxModel automaticLayoutComboBoxModel = (DefaultComboBoxModel) mAutomaticLayoutComboBox.getModel(); automaticLayoutComboBoxModel.addElement(AUTOMATIC_LAYOUT_DISABLED); automaticLayoutComboBoxModel.setSelectedItem(AUTOMATIC_LAYOUT_DISABLED); mAutomaticLayoutComboBox.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { if (internalChange) return; final ModeController modeController = Controller.getCurrentModeController(); AutomaticLayoutController al = modeController.getExtension(AutomaticLayoutController.class); NamedObject selectedItem = (NamedObject) mAutomaticLayoutComboBox.getSelectedItem(); al.undoableDeactivateHook(Controller.getCurrentController().getMap().getRootNode()); if (!selectedItem.equals(AUTOMATIC_LAYOUT_DISABLED)) { al.undoableActivateHook( Controller.getCurrentController().getMap().getRootNode(), (AutomaticLayout) selectedItem.getObject()); } } }); } final String label = TextUtils.getText("AutomaticLayoutAction.text"); rightBuilder.append(new JLabel(label), 5); rightBuilder.append(mAutomaticLayoutComboBox); rightBuilder.nextLine(); } { if (mAutomaticEdgeColorCheckBox == null) { mAutomaticEdgeColorCheckBox = new JCheckBox(); mAutomaticEdgeColorCheckBox.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { final ModeController modeController = Controller.getCurrentModeController(); AutomaticEdgeColorHook al = (AutomaticEdgeColorHook) modeController.getExtension(AutomaticEdgeColorHook.class); al.undoableToggleHook(Controller.getCurrentController().getMap().getRootNode()); } }); } final String label = TextUtils.getText("AutomaticEdgeColorHookAction.text"); rightBuilder.append(new JLabel(label), 5); rightBuilder.append(mAutomaticEdgeColorCheckBox); rightBuilder.nextLine(); } }
private void layoutComponents() { FormLayout layout = new FormLayout("d, 6dlu, max(d;30dlu):grow"); DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.append("Port number", portTextField); builder.append(httpsPortCheckBox, httpsPortTextField); builder.append("Memory limit (MB)", memoryTextField); builder.append("Context path", contextPathComboBox); setBorder(Borders.DIALOG_BORDER); setLayout(new BorderLayout(12, 12)); add(builder.getPanel(), BorderLayout.CENTER); add(ButtonBarFactory.buildCenteredBar(defaultButton, saveButton), BorderLayout.SOUTH); }