List of usage examples for com.jgoodies.forms.layout CellConstraints CellConstraints
public CellConstraints()
From source file:com.projity.dialog.calendar.NewBaseCalendarDialog.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 w ww .ja v a 2 s . co m * @return the built panel */ public JComponent createContentPanel() { initControls(); // Separating the component initialization and configuration // from the layout code makes both parts easier to read. FormLayout layout = new FormLayout("p, 3dlu, 100dlu", // cols //$NON-NLS-1$ "p, 3dlu,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("NewBaseCalendarDialog.Name"), name); //$NON-NLS-1$ builder.nextLine(2); builder.append(createNewBase); builder.nextLine(2); builder.append(makeACopy); builder.append(calendarToCopy); return builder.getPanel(); }
From source file:com.projity.dialog.DelegateTaskDialog.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" //$NON-NLS-1$ , "p,3dlu,p"); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();//from w ww.ja va 2 s. c om CellConstraints cc = new CellConstraints(); // task names span whole dialog builder.add(taskNames, cc.xyw(builder.getColumn(), builder.getRow(), builder.getColumnCount())); builder.nextLine(2); map.append(builder, "Field.delegatedTo"); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.DependencyDialog.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();/*ww w. j a v a2 s. co m*/ //TODO set minimum size FormLayout layout = new FormLayout("50dlu,3dlu,50dlu,3dlu,50dlu,3dlu,50dlu", // cols "p,3dlu,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)); builder.nextLine(2); builder.append(Messages.getString("Text.Type") + ":", typeCombo); builder.addLabel(Messages.getString("Text.Lag") + ":"); builder.nextColumn(2); builder.add(lagTextField); 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/*from w ww .j av a2 s.c o m*/ */ 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.HelpDialog.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 a2 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. //TODO set minimum size FormLayout layout = new FormLayout("120px,180px,120px", // cols //$NON-NLS-1$ "p, 6dlu, p,6dlu,p,6dlu,p,6dlu,p,6dlu,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(); JLabel logo = new JLabel(IconManager.getIcon("logo.ProjectLibre")); logo.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent arg0) { BrowserControl.displayURL("http://www.projectlibre.com");//$NON-NLS-1$ } }); builder.nextColumn(); builder.append(logo); builder.nextLine(2); builder.nextColumn(); builder.append(link); // builder.nextLine(2); // builder.append(videos); if (Environment.isOpenProj()) { builder.nextLine(2); builder.nextColumn(); builder.append(tipOfTheDay); } builder.nextLine(2); builder.nextColumn(); builder.append(license); builder.nextLine(2); String version = VersionUtils.getVersion(); builder.addLabel(Messages.getContextString("Text.ShortTitle") + " " + "Version " + (version == null ? "Unknown" : version), cc.xyw(1, 9, 3)); builder.nextLine(2); builder.addLabel(Messages.getString("AboutDialog.copyright"), cc.xyw(1, 11, 3)); if (false || Environment.isOpenProj()) { // removed donation link JPanel p = new JPanel(); p.add(builder.getPanel()); // p.add(makeDonatePanel(false)); return p; } else return builder.getPanel(); }
From source file:com.projity.dialog.InformationDialog.java
License:Common Public License
protected JComponent createNotesPanel() { FieldComponentMap map = createMap(); FormLayout layout = new FormLayout("p:grow", // extra padding on right is for estimated field //$NON-NLS-1$ "p, 3dlu,p, 3dlu, fill:50dlu:grow"); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); CellConstraints cc = new CellConstraints(); builder.setDefaultDialogBorder();//ww w . j a va 2 s .c om JComponent header = createHeaderFieldsPanel(map); if (header != null) builder.add(header, cc.xyw(builder.getColumn(), builder.getRow(), 1)); builder.nextLine(2); builder.append(map.getLabel("Field.notes") + ":"); //$NON-NLS-1$ //$NON-NLS-2$ builder.nextLine(2); builder.append(map.getComponent("Field.notes", 0)); //$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 a va2 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, 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 va2 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("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();//from www. j a v 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.ProjectDialog.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. j av a 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, 220dlu, 3dlu, default:grow", // cols //$NON-NLS-1$ // with commented fields "p, 3dlu,p, 3dlu, p, 3dlu, p, 3dlu,p, 3dlu, p, 3dlu,p, 3dlu,p, 3dlu,p,3dlu,p 3dlu, p, 3dlu, fill:50dlu:grow"); // rows "p, 3dlu,p, 3dlu,p, 3dlu, p, 3dlu, p, 3dlu,p, 3dlu, fill:50dlu: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("ProjectDialog.ProjectName"), name, 3); //$NON-NLS-1$ builder.nextLine(2); builder.append(Messages.getString("ProjectDialog.Manager"), manager, 3); //$NON-NLS-1$ builder.nextLine(2); builder.append(dateLabel); builder.append(startDateChooser); builder.append(forward); builder.nextLine(2); if (!Environment.getStandAlone()) { builder.append(Messages.getString("ProjectDialog.ProjectTeam")); //$NON-NLS-1$ builder.add(accessControl, cc.xy(builder.getColumn(), builder.getRow(), "left,default")); //$NON-NLS-1$ } HelpUtil.addDocHelp(accessControl, "Project_Team"); // builder.nextLine(2); // builder.append("Project Status:",projectStatus); // builder.nextLine(2); // builder.append("Project Type:",projectType); // builder.nextLine(2); // builder.append("Expense Type:",expenseType); // builder.nextLine(2); // builder.append("Division:",division); // builder.nextLine(2); // builder.append("Group:",group); builder.nextLine(2); FieldComponentMap map = createMap(); Collection extraFields = FieldDictionary .extractExtraFields(FieldDictionary.getInstance().getProjectFields(), true); JComponent extra = createFieldsPanel(map, extraFields); if (extra != null) { builder.add(extra, cc.xyw(builder.getColumn(), builder.getRow(), 3)); } builder.nextLine(2); // builder.append("Shared resource Pool:", resourcePool); // builder.nextLine(2); builder.append(Messages.getString("ProjectDialog.Notes")); //$NON-NLS-1$ builder.nextLine(2); builder.add(new JScrollPane(notes), cc.xyw(builder.getColumn(), builder.getRow(), 5)); // allow spanning 3 cols return builder.getPanel(); }