/** * Sets column and row origins; sets width and height to 1; * uses the default alignments.<p> * * <strong>Examples:</strong><pre> * cc.xy(1, 1); * cc.xy(1, 3); * </pre> * * @param col the new column index * @param row the new row index * @return this */ public CellConstraints xy(int col, int row) { return xywh(col, row, 1, 1); }
/** * Sets the column, row, width, and height; uses a height (row span) of 1 * and the horizontal and vertical default alignments.<p> * * <strong>Examples:</strong><pre> * cc.xyw(1, 3, 7); * cc.xyw(1, 3, 2); * </pre> * * @param col the new column index * @param row the new row index * @param colSpan the column span or grid width * @return this */ public CellConstraints xyw(int col, int row, int colSpan) { return xywh(col, row, colSpan, 1, DEFAULT, DEFAULT); }
/** * Sets column and row origins; sets width and height to 1; * uses the default alignments.<p> * * <strong>Examples:</strong><pre> * cc.xy(1, 1); * cc.xy(1, 3); * </pre> * * @param col the new column index * @param row the new row index * @return this */ public CellConstraints xy(int col, int row) { return xywh(col, row, 1, 1); }
/** * Sets the column, row, width, and height; uses default alignments.<p> * * <strong>Examples:</strong><pre> * cc.xywh(1, 3, 2, 1); * cc.xywh(1, 3, 7, 3); * </pre> * * @param col the new column index * @param row the new row index * @param colSpan the column span or grid width * @param rowSpan the row span or grid height * @return this */ public CellConstraints xywh(int col, int row, int colSpan, int rowSpan) { return xywh(col, row, colSpan, rowSpan, DEFAULT, DEFAULT); }
/** * Sets the column, row, width, and height; uses a height (row span) of 1 * and the horizontal and vertical default alignments.<p> * * <strong>Examples:</strong><pre> * cc.xyw(1, 3, 7); * cc.xyw(1, 3, 2); * </pre> * * @param col the new column index * @param row the new row index * @param colSpan the column span or grid width * @return this */ public CellConstraints xyw(int col, int row, int colSpan) { return xywh(col, row, colSpan, 1, DEFAULT, DEFAULT); }
/** * Sets the column, row, width, and height; uses default alignments.<p> * * <strong>Examples:</strong><pre> * cc.xywh(1, 3, 2, 1); * cc.xywh(1, 3, 7, 3); * </pre> * * @param col the new column index * @param row the new row index * @param colSpan the column span or grid width * @param rowSpan the row span or grid height * @return this */ public CellConstraints xywh(int col, int row, int colSpan, int rowSpan) { return xywh(col, row, colSpan, rowSpan, DEFAULT, DEFAULT); }
/** * Sets the column and row origins; sets width and height to 1; * set horizontal and vertical alignment using the specified objects.<p> * * <strong>Examples:</strong><pre> * cc.xy(1, 3, CellConstraints.LEFT, CellConstraints.BOTTOM); * cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.FILL); * </pre> * * @param col the new column index * @param row the new row index * @param colAlign horizontal component alignment * @param rowAlign vertical component alignment * @return this */ public CellConstraints xy(int col, int row, Alignment colAlign, Alignment rowAlign) { return xywh(col, row, 1, 1, colAlign, rowAlign); }
private void initItemsPanel() { JPanel itemsPanel = new JPanel(); itemsPanel.setLayout(new FormLayout("left:pref, fill:400px, pref:grow", "fill:20px, fill:4px, fill:max(20px;pref)")); CellConstraints cc = new CellConstraints(); // the left table JTable leftTable = new JTable(); itemsPanel.add(leftTable.getTableHeader(), cc.xywh(1, 1, 1, 2)); itemsPanel.add(leftTable, cc.xywh(1, 3, 1, 1)); // the text pane itemsPanel.add(new JTextPane(), cc.xywh(2, 2, 1, 2)); // the right table JTable rightTable = new JTable(); rightTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); itemsPanel.add(rightTable.getTableHeader(), cc.xywh(3, 1, 1, 2)); itemsPanel.add(rightTable, cc.xywh(3, 3, 1, 1)); // Adding the items panel to dialog panel JScrollPane itemsScrollPane = new JScrollPane(itemsPanel); itemsScrollPane.getVerticalScrollBar().setUnitIncrement(3); dialogPanel.add(itemsScrollPane, BorderLayout.CENTER); // with dialogPanel previously instantiated }
private JComponent buildEditorPanel() { FormLayout layout = new FormLayout( "FILL:100DLU:GROW(0.5),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:100DLU:GROW(0.5)", //$NON-NLS-1$ "CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,FILL:20DLU:GROW(0.5),CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,FILL:20DLU:GROW(0.5)"); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(new JButton(addAllAction), cc.xy(3, 5)); builder.add(new JButton(addAction), cc.xy(3, 7)); builder.add(new JButton(removeAction), cc.xy(3, 9)); builder.add(new JButton(removeAllAction), cc.xy(3, 11)); builder.add(buildAllEditorPanel(), cc.xywh(1, 3, 1, 11)); builder.add(new JScrollPane(selectedList), cc.xywh(5, 3, 1, 11)); builder.addLabel(SwingMessages.getString("JListToList.3"), cc.xywh(1, 1, 1, 1, CellConstraints.CENTER, //$NON-NLS-1$ CellConstraints.CENTER)); builder.addLabel(SwingMessages.getString("JListToList.4"), cc.xywh(5, 1, 1, 1, //$NON-NLS-1$ CellConstraints.CENTER, CellConstraints.CENTER)); return builder.getPanel(); }
private JComponent buildEditorPanel() { FormLayout layout = new FormLayout("FILL:DEFAULT:NONE", //$NON-NLS-1$ "FILL:DEFAULT:NONE,CENTER:DEFAULT:NONE"); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(monthView, cc.xy(1, 1)); builder.add(new JButton(nullAction), cc.xywh(1, 2, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); return builder.getPanel(); }
private JComponent buildEditorPanel() { FormLayout layout = new FormLayout("FILL:DEFAULT:NONE", //$NON-NLS-1$ "FILL:DEFAULT:NONE,CENTER:DEFAULT:NONE"); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(calendarPanel, cc.xy(1, 1)); builder.add(new JButton(nullAction), cc.xywh(1, 2, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); return builder.getPanel(); }
private JComponent buildEditorPanel() { FormLayout layout = new FormLayout("FILL:DEFAULT:NONE", //$NON-NLS-1$ "FILL:DEFAULT:NONE,CENTER:DEFAULT:NONE"); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(monthView, cc.xy(1, 1)); builder.add(new JButton(nullAction), cc.xywh(1, 2, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); return builder.getPanel(); }
private JComponent buildEditorPanel() { FormLayout layout = new FormLayout("FILL:500DLU:GROW(1.0)", //$NON-NLS-1$ "FILL:50DLU:NONE,FILL:30DLU:NONE,FILL:200DLU:GROW(1.0),FILL:DEFAULT:NONE"); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); JScrollPane scrollPane = new JScrollPane(optionsList); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); builder.add(scrollPane, cc.xywh(1, 1, 1, 1)); builder.add(titleLabel, cc.xyw(1, 2, 1)); builder.add(cardPanel, cc.xyw(1, 3, 1)); builder.add(buttonsPanel, cc.xy(1, 4)); return builder.getPanel(); }
protected PanelBuilder createPanelBuilder() { labelCase = Application.getWidgetFactory().createUndoableComboBox(); labelCase.setRenderer(new LabelCapsRenderer()); labelCase.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { String value = labelCase.getModel().getSelectedItem().toString(); setQueryProperty(ProcedureQuery.COLUMN_NAME_CAPITALIZATION_PROPERTY, value); } }); PanelBuilder builder = super.createPanelBuilder(); RowSpec[] extraRows = RowSpec.decodeSpecs("3dlu, p"); for (RowSpec extraRow : extraRows) { builder.appendRow(extraRow); } CellConstraints cc = new CellConstraints(); builder.addLabel("Row Label Case:", cc.xy(1, 17)); builder.add(labelCase, cc.xywh(3, 17, 5, 1)); return builder; }
private JComponent buildEditorPanel() { FormLayout layout = new FormLayout( "FILL:DEFAULT:NONE,FILL:250DLU:GROW(1.0),FILL:DEFAULT:NONE", //$NON-NLS-1$ "FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:250DLU:GROW(1.0)"); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(new JButton(previousAction), cc.xy(1, 2)); builder.add(new JButton(nextAction), cc.xy(3, 2)); builder.add(internalPlanningPanel, cc.xyw(1, 3, 3)); builder.add(label, cc.xy(2, 2)); builder.add(buildChooseModePanel(), cc.xywh(1, 1, 3, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); return builder.getPanel(); }
private JComponent buildEditorPanel() { FormLayout layout = new FormLayout("RIGHT:MAX(40DLU;DEFAULT):NONE,FILL:4DLU:NONE,FILL:200DLU:NONE,FILL:DEFAULT:GROW(1.0)", //$NON-NLS-1$ "CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:30DLU:NONE,CENTER:DEFAULT:GROW(1.0)"); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); builder.addLabel(StaticWidgetHelper.getSynaptixWidgetConstantsBundle().comment(), cc.xy(1, 3)); builder.add(textLabel, cc.xyw(3, 1, 2)); builder.add(new JScrollPane(commentaireArea), cc.xywh(3, 3, 2, 3)); return builder.getPanel(); }
private JComponent buildEditorPanel() { FormLayout layout = new FormLayout("FILL:DEFAULT:NONE", //$NON-NLS-1$ "FILL:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(calendarPanel, cc.xy(1, 1)); builder.add(buildSpinnersPanel(), cc.xywh(1, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); builder.add(buildActionsPanel(), cc.xy(1, 3)); return builder.getPanel(); }
@Override protected Container doLayout() { final FormLayout layout = new FormLayout("5dlu, pref, 5dlu, pref, 5dlu ,pref:grow ,5dlu, fill:default:grow, 5dlu", "5dlu, pref, 5dlu, pref, 5dlu, fill:default:grow, 5dlu"); final PanelBuilder builder = ComponentFactory.createBuilder(layout); final CellConstraints cc = new CellConstraints(); builder.addSeparator(I18N_SAVE_TO_FILE, cc.xyw(2, 2, 5)); builder.add(selectFileTarget, cc.xy(2, 4)); builder.add(fileTargetLabel, cc.xyw(4, 4, 3)); builder.add(scrollPane, cc.xywh(2,5,8,3)); return ComponentFactory.createPanel(builder); }
private JComponent buildEditorPanel() { FormLayout layout = new FormLayout("RIGHT:MAX(40DLU;PREF):NONE,FILL:4DLU:NONE,FILL:100DLU:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)", //$NON-NLS-1$ "CENTER:DEFAULT:NONE,CENTER:75DLU:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE"); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); builder.add(new JSyScrollPane(perspectivesTable), cc.xywh(3, 1, 6, 2)); builder.addLabel(CoreMessages.getString("EditBindingPerspectivesDialog.4"), cc.xy(1, 1)); //$NON-NLS-1$ builder.addLabel(CoreMessages.getString("EditBindingPerspectivesDialog.5"), cc.xy(1, 6)); //$NON-NLS-1$ builder.add(bindingField, cc.xy(3, 6)); builder.add(new JButton(deleteAction), cc.xy(5, 6)); builder.addLabel(CoreMessages.getString("EditBindingPerspectivesDialog.6"), cc.xy(1, 4)); //$NON-NLS-1$ builder.add(perspectiveNameLabel, cc.xy(3, 4)); return builder.getPanel(); }
private JPanel buildContents() { FormLayout layout = new FormLayout("FILL:100PX:NONE,FILL:4DLU:NONE,RIGHT:MAX(60DLU;PREF):NONE,FILL:4DLU:NONE,FILL:150DLU:NONE,FILL:4DLU:NONE,FILL:32PX:NONE", //$NON-NLS-1$ "FILL:PREF:NONE,CENTER:3DLU:NONE,FILL:PREF:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE"); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); builder.add(iconKeyLabel, cc.xywh(1, 1, 1, 7)); builder.addLabel(ProfilMessages.getString("LoginDialog.9") + "*", cc.xy(3, 1)); //$NON-NLS-1$ builder.add(loginBox, cc.xy(5, 1)); builder.add(deleteButton, cc.xy(7, 1)); builder.addLabel(ProfilMessages.getString("LoginDialog.10") + "*", cc.xy(3, 3)); //$NON-NLS-1$ builder.add(passwordField, cc.xy(5, 3)); builder.add(saveLoginBox, cc.xy(5, 5)); builder.add(savePasswordBox, cc.xy(5, 7)); return builder.getPanel(); }