List of usage examples for com.jgoodies.forms.builder DefaultFormBuilder append
public JLabel append(String textWithMnemonic, Component component)
From source file:com.projity.dialog.FieldAliasDialog.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. * /*from ww w. j ava2 s. co m*/ * @return the built panel */ public JComponent createContentPanel() { // Separating the component initialization and configuration // from the layout code makes both parts easier to read. initControls(); //TODO set minimum size FormLayout layout = new FormLayout("default, 3dlu, 120dlu:grow", // cols //$NON-NLS-1$ "p, 3dlu,p,3dlu,p,3dlu,p"); // 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(); builder.append(Messages.getString("Field.name"), defaultName); //$NON-NLS-1$ builder.nextLine(2); builder.append(Messages.getString("RenameDialog.CurrentName"), oldName); //$NON-NLS-1$ builder.nextLine(2); builder.append(Messages.getString("RenameDialog.NewName"), newName); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.FindDialog.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 . ja v a 2 s .c om */ public JComponent createContentPanel() { // initControls(); // Separating the component initialization and configuration // from the layout code makes both parts easier to read. //TODO set minimum size FormLayout layout = new FormLayout("default, 3dlu, default, 3dlu, default", // cols //$NON-NLS-1$ "p, 3dlu, p"); // 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(); builder.append(Messages.getString("LookupDialog.Find"), search); //$NON-NLS-1$ builder.nextLine(2); builder.append(Messages.getString("Text.Field"), combo); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.LoginDialog.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. * /* ww w . j ava 2s . c o m*/ * @return the built panel */ public JComponent createContentPanel() { // Separating the component initialization and configuration // from the layout code makes both parts easier to read. initControls(); //TODO set minimum size FormLayout layout = new FormLayout("default, 3dlu, 120dlu:grow", // cols //$NON-NLS-1$ "p, 3dlu,p,3dlu,p,3dlu,p"); // 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(); builder.append(Messages.getString("LoginDialog.Login"), login); //$NON-NLS-1$ builder.nextLine(2); builder.append(Messages.getString("LoginDialog.Password"), password); //$NON-NLS-1$ builder.nextLine(2); // builder.append(useMenus); // builder.append(Messages.getString("LoginDialog.UseOfficeLook")); //$NON-NLS-1$ builder.nextLine(2); builder.append(storeCredentials); builder.append(Messages.getString("LoginDialog.RememberMe")); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.LookupDialog.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. * /* w w w. ja v a 2s. c o m*/ * @return the built panel */ public JComponent createContentPanel() { // Separating the component initialization and configuration // from the layout code makes both parts easier to read. initControls(); //TODO set minimum size FormLayout layout = new FormLayout("p, 3dlu, p,20dlu,p,3dlu,160dlu:grow,3dlu,p", // cols //$NON-NLS-1$ "p, 3dlu, p,3dlu,fill:default:grow"); // 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(); builder.append(Messages.getString("LookupDialog.Type"), types); //$NON-NLS-1$ builder.append(Messages.getString("LookupDialog.Find") + ":", match); //$NON-NLS-1$ builder.append(find); builder.nextLine(2); builder.append(Messages.getString("LookupDialog.Results")); //$NON-NLS-1$ builder.nextLine(2); builder.add(resultsPane, cc.xyw(builder.getColumn(), builder.getRow(), 9)); return builder.getPanel(); }
From source file:com.projity.dialog.options.CalendarDialogBox.java
License:Common Public License
public JComponent createContentPanel() { initControls();/*ww w. j av a2s . c o m*/ FormLayout layout = new FormLayout("p,3dlu,p,p:grow", //$NON-NLS-1$ "p,3dlu,p,3dlu,p,3dlu,p"); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); builder.add(new JLabel(Messages.getString("CalendarDialogBox.TheseSettingsOnlyApplyToDuration")), //$NON-NLS-1$ cc.xyw(builder.getColumn(), builder.getRow(), 4)); builder.nextLine(2); builder.append(Messages.getString("CalendarDialogBox.HoursPerday"), hoursPerDay); //$NON-NLS-1$ builder.nextLine(2); builder.append(Messages.getString("CalendarDialogBox.HoursPerWeek"), hoursPerWeek); //$NON-NLS-1$ builder.nextLine(2); builder.append(Messages.getString("CalendarDialogBox.DaysPerMonth"), daysPerMonth); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.RenameDialog.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. * /*from ww w . j a v a2s .c o m*/ * @return the built panel */ public JComponent createContentPanel() { // Separating the component initialization and configuration // from the layout code makes both parts easier to read. initControls(); //TODO set minimum size FormLayout layout = new FormLayout("default, 3dlu, 120dlu:grow", // cols //$NON-NLS-1$ "p, 3dlu,p,3dlu,p"); // 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(); builder.append(Messages.getString("RenameDialog.CurrentName"), oldName); //$NON-NLS-1$ builder.nextLine(2); builder.append(Messages.getString("RenameDialog.NewName"), newName); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.RenameProjectDialog.java
License:Common Public License
public JComponent createFieldPanel() { FormLayout layout = new FormLayout("p,3dlu,100dlu:grow", // cols //$NON-NLS-1$ "p"); // rows //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();//from ww w .j a v a 2 s .co m CellConstraints cc = new CellConstraints(); builder.append(Messages.getString("RenameProjectDialog.NewProjectName"), nameField); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.TaskInformationDialog.java
License:Common Public License
public JComponent createResourcesPanel() { FieldComponentMap map = createMap(); FormLayout layout = new FormLayout("p:grow,0dlu,right:p", "p,3dlu,p,3dlu,fill:150dlu:grow"); //$NON-NLS-1$ //$NON-NLS-2$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();/*from w w w. jav a2 s . com*/ CellConstraints cc = new CellConstraints(); builder.add(createHeaderFieldsPanel(map), cc.xyw(builder.getColumn(), builder.getRow(), 3)); builder.nextLine(2); builder.append(Messages.getString("TaskInformationDialog.Resources") + ":", getAssignResourceButton()); //$NON-NLS-1$ builder.nextLine(2); builder.add(createAssignmentSpreadsheet(), cc.xyw(builder.getColumn(), builder.getRow(), 3)); JComponent panel = builder.getPanel(); HelpUtil.addDocHelp(panel, "Assign_Resources"); return panel; }
From source file:com.projity.dialog.TransformParameterDialog.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. * //from www . ja va 2 s . c o m * @return the built panel */ public JComponent createContentPanel() { // Separating the component initialization and configuration // from the layout code makes both parts easier to read. initControls(); //TODO set minimum size FormLayout layout = new FormLayout("default, 3dlu, default", // cols "p, 3dlu,p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu"); // rows DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); Iterator l = labels.iterator(); Iterator c = valueComponents.iterator(); while (l.hasNext()) { String name = (String) l.next(); JComponent comp = (JComponent) c.next(); builder.append(name, comp); builder.nextLine(2); } 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//from www .j a v 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; }