List of usage examples for com.jgoodies.forms.layout CellConstraints xyw
public CellConstraints xyw(int col, int row, int colSpan)
Examples:
cc.xyw(1, 3, 7); cc.xyw(1, 3, 2);
From source file:com.projity.dialog.UpdateTaskDialog.java
License:Common Public License
public JComponent createContentPanel() { taskNames = new JLabel(); String names = DataUtils.stringListWithMaxAndMessage(getCollection(), Settings.STRING_LIST_LIMIT, Messages.getString("Message.tooManyTasksSelectedToList.mf")); //$NON-NLS-1$ taskNames.setText(Messages.getString("Text.Tasks") + ": " + names); //$NON-NLS-1$ //$NON-NLS-2$ FieldComponentMap map = createMap(); FormLayout layout = new FormLayout("p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p" //$NON-NLS-1$ , "p,3dlu,p,3dlu,p,3dlu,p,3dlu,p,3dlu,p,3dlu,p,3dlu,p,3dlu,p,3dlu,p"); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();//from w w w.j a va2s .c o m CellConstraints cc = new CellConstraints(); // task names span whole dialog builder.add(taskNames, cc.xyw(builder.getColumn(), builder.getRow(), builder.getColumnCount())); builder.nextLine(2); builder.addSeparator(""); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.name", 5); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.percentComplete"); //$NON-NLS-1$ map.append(builder, "Field.duration"); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.start"); //$NON-NLS-1$ map.append(builder, "Field.finish"); //$NON-NLS-1$ builder.nextLine(2); builder.addSeparator(""); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.actualDuration"); //$NON-NLS-1$ map.append(builder, "Field.remainingDuration"); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.actualStart"); //$NON-NLS-1$ map.append(builder, "Field.actualFinish"); //$NON-NLS-1$ builder.nextLine(2); builder.addSeparator(""); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.taskType"); return builder.getPanel(); }
From source file:com.projity.dialog.UserInfoDialog.java
License:Common Public License
/** * 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// w w w . j av a 2 s . c o m */ 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; }
From source file:com.projity.dialog.XbsDependencyDialog.java
License:Common Public License
public JComponent createContentPanel() { // Separating the component initialization and configuration // from the layout code makes both parts easier to read. initControls();/*w w w .j av a 2 s . c om*/ //TODO set minimum size FormLayout layout = new FormLayout("50dlu,3dlu,50dlu,3dlu,50dlu,3dlu,50dlu", // cols "p,3dlu,p,3dlu,p,3dlu"); // rows // 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(); builder.append(Messages.getString("Text.From") + ":"); builder.add(preLabel, cc.xyw(builder.getColumn(), builder.getRow(), 5)); builder.nextLine(2); builder.append(Messages.getString("Text.To") + ":"); builder.add(sucLabel, cc.xyw(builder.getColumn(), builder.getRow(), 5)); return builder.getPanel(); }
From source file:com.projity.print.PageSetup.java
License:Common Public License
private JComponent createDialogPanel() { FormLayout layout = new FormLayout("p, 3dlu, p, 3dlu", "p, 3dlu,p, 3dlu, p, 3dlu,p,3dlu"); DefaultFormBuilder builder = new DefaultFormBuilder(layout); CellConstraints cc = new CellConstraints(); builder.setDefaultDialogBorder();//from w w w . ja v a2 s .c om builder.add(createPrinterPanel(), cc.xyw(1, 1, 3)); builder.add(createPaperPanel(), cc.xywh(1, 3, 1, 3)); builder.add(createOrientationPanel(), cc.xy(3, 3)); builder.add(createMarginsPanel(), cc.xy(3, 5)); builder.add(createScalingPanel(), cc.xyw(1, 7, 3)); return builder.getPanel(); }
From source file:com.projity.print.PageSetup.java
License:Common Public License
private JComponent createPaperPanel() { FormLayout layout = new FormLayout("8dlu, p,p,8dlu", "p, 3dlu:grow,p, 2dlu"); DefaultFormBuilder builder = new DefaultFormBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(createPaperSizePanel(), cc.xyw(2, 1, 2)); JPanel panel = builder.getPanel(); panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Paper"))); return panel; }
From source file:com.projity.print.PageSetup.java
License:Common Public License
private JComponent createFlowPaperPanel() { FormLayout layout = new FormLayout("1dlu, p,p,p:grow,1dlu", "p, 3dlu:grow, 2dlu"); DefaultFormBuilder builder = new DefaultFormBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(createFlowPaperSizePanel(), cc.xyw(2, 1, 3)); JPanel panel = builder.getPanel(); panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Paper"))); return panel; }
From source file:com.projity.print.PageSetup.java
License:Common Public License
private JComponent createPaperSizePanel() { FormLayout layout = new FormLayout("p, 3dlu,50dlu", "p, 3dlu, p, 3dlu, p"); DefaultFormBuilder builder = new DefaultFormBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(paperSize, cc.xyw(1, 1, 3)); builder.add(paperWidthLabel, cc.xy(1, 3)); builder.add(paperWidth, cc.xy(3, 3)); builder.add(paperHeightLabel, cc.xy(1, 5)); builder.add(paperHeight, cc.xy(3, 5)); return builder.getPanel(); }
From source file:com.projity.print.PageSetup.java
License:Common Public License
private JComponent createFlowPaperSizePanel() { FormLayout layout = new FormLayout("p, 3dlu,40dlu", "p, 3dlu, p, 3dlu, p"); DefaultFormBuilder builder = new DefaultFormBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(paperSize, cc.xyw(1, 1, 3)); builder.add(paperWidthLabel, cc.xy(1, 3)); builder.add(paperWidth, cc.xy(3, 3)); builder.add(paperHeightLabel, cc.xy(1, 5)); builder.add(paperHeight, cc.xy(3, 5)); return builder.getPanel(); }
From source file:com.projity.print.PageSetup.java
License:Common Public License
private JComponent createFlowScalingPanel() { FormLayout layout = new FormLayout("1dlu, 5dlu,p,22dlu,3dlu,p,1dlu", "p, 3dlu,p,3dlu,p,3dlu,p,p,10dlu,p,3dlu,p,3dlu,p,3dlu"); DefaultFormBuilder builder = new DefaultFormBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(scaleTo, cc.xyw(2, 1, 5)); builder.add(scaleToWidth, cc.xyw(3, 3, 2)); builder.add(scaleToWidthLabel, cc.xy(6, 3)); builder.add(scaleToHeight, cc.xyw(3, 5, 2)); builder.add(scaleToHeightLabel, cc.xy(6, 5)); builder.add(constrainProportions, cc.xy(3, 7)); builder.add(scaleToProportions, cc.xyw(4, 7, 3)); builder.add(scaleToProportions2, cc.xyw(4, 8, 4)); builder.add(fitTo, cc.xyw(2, 10, 5)); builder.add(fitToWidth, cc.xyw(3, 12, 2)); builder.add(fitToWidthLabel, cc.xy(6, 12)); builder.add(fitToHeight, cc.xyw(3, 14, 2)); builder.add(fitToHeightLabel, cc.xy(6, 14)); JPanel panel = builder.getPanel(); panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Scaling"))); return panel; }
From source file:com.salas.bb.dialogs.InvalidDiscoveryDialog.java
License:Open Source License
private Component buildMainPanel() { FormLayout layout = new FormLayout("7dlu, pref, 2dlu, min:grow", "min:grow, " + "pref, 2dlu, pref, 7dlu, " + "pref, 2dlu, " + "pref, 2dlu, " + "pref, 2dlu, " + "pref, 2dlu, " + "pref, " + "min:grow"); JPanel panel = new JPanel(layout); CellConstraints cc = new CellConstraints(); panel.add(new JLabel(Strings.message("invalid.discovery.wording")), cc.xyw(1, 2, 4)); panel.add(lbLink, cc.xyw(2, 4, 3));//from ww w . j ava 2s . c om panel.add(new JLabel(Strings.message("invalid.discovery.query")), cc.xyw(1, 6, 4)); panel.add(rbNewDiscovery, cc.xy(2, 8)); panel.add(tfNewDiscoveryUrl, cc.xy(4, 8)); panel.add(rbSuggest, cc.xy(2, 10)); panel.add(tfSuggestedUrl, cc.xy(4, 10)); panel.add(rbLeave, cc.xy(2, 12)); panel.add(rbRemove, cc.xy(2, 14)); return panel; }