List of usage examples for com.jgoodies.forms.builder DefaultFormBuilder DefaultFormBuilder
public DefaultFormBuilder(FormLayout layout)
From source file:com.projity.dialog.TaskInformationDialog.java
License:Common Public License
protected JComponent createHeaderFieldsPanel(FieldComponentMap map) { // Repeat of fields from general tab FormLayout layout = new FormLayout("p,3dlu,300dlu" //$NON-NLS-1$ , "p,3dlu"); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); map.append(builder, "Field.name"); //$NON-NLS-1$ builder.nextLine(); // border at bottom return builder.getPanel(); }
From source file:com.projity.dialog.TaskInformationDialog.java
License:Common Public License
private JComponent createGeneralPanel() { FieldComponentMap map = createMap(); FormLayout layout = new FormLayout("max(50dlu;pref), 3dlu, 90dlu 10dlu, p, 3dlu,90dlu,60dlu", // extra padding on right is for estimated field //$NON-NLS-1$ "p, 3dlu,p, 3dlu,p, 3dlu, p, 3dlu, p, 3dlu, p,3dlu, p, 3dlu,p, 3dlu, fill:50dlu:grow"); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); CellConstraints cc = new CellConstraints(); builder.setDefaultDialogBorder();/*from w w w . j a v a2 s.c o m*/ builder.add(createHeaderFieldsPanel(map), cc.xyw(builder.getColumn(), builder.getRow(), 8)); builder.nextLine(2); map.appendSometimesReadOnly(builder, "Field.duration"); //$NON-NLS-1$ map.append(builder, "Field.estimated"); //$NON-NLS-1$ builder.nextLine(2); map.appendSometimesReadOnly(builder, "Field.percentComplete"); //$NON-NLS-1$ map.append(builder, "Field.priority"); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.cost"); //$NON-NLS-1$ map.append(builder, "Field.work"); //$NON-NLS-1$ builder.nextLine(4); builder.addSeparator(Messages.getString("TaskInformationDialog.Dates")); //$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); map.append(builder, "Field.baselineStart"); //$NON-NLS-1$ map.append(builder, "Field.baselineFinish"); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.TaskInformationDialog.java
License:Common Public License
private JComponent createAdvancedPanel() { FieldComponentMap map = createMap(); FormLayout layout = new FormLayout("max(50dlu;pref), 3dlu, 90dlu, 10dlu, p, 3dlu,90dlu,30dlu", // extra padding on right is for estimated field //$NON-NLS-1$ "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"); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();/* w ww .j a v a 2s .co m*/ CellConstraints cc = new CellConstraints(); builder.add(createHeaderFieldsPanel(map), cc.xyw(builder.getColumn(), builder.getRow(), 8)); builder.nextLine(2); map.append(builder, "Field.wbs"); //$NON-NLS-1$ map.append(builder, "Field.markTaskAsMilestone", 3); //$NON-NLS-1$ builder.nextLine(2); builder.addSeparator(Messages.getString("TaskInformationDialog.ConstrainTask")); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.constraintType"); //$NON-NLS-1$ map.appendSometimesReadOnly(builder, "Field.constraintDate"); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.deadline"); //$NON-NLS-1$ builder.nextLine(4); builder.addSeparator(" "); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.taskType"); //$NON-NLS-1$ map.append(builder, "Field.effortDriven", 3); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.taskCalendar"); //$NON-NLS-1$ map.append(builder, "Field.ignoreResourceCalendar", 3); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.earnedValueMethod"); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.TaskInformationDialog.java
License:Common Public License
public JComponent createPredecessorsPanel() { FieldComponentMap map = createMap(); FormLayout layout = new FormLayout("p:grow", "p,3dlu,p,3dlu,fill:150dlu:grow"); //$NON-NLS-1$ //$NON-NLS-2$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();//from w ww. j a v a 2 s .c o m CellConstraints cc = new CellConstraints(); builder.add(createHeaderFieldsPanel(map), cc.xyw(builder.getColumn(), builder.getRow(), 1)); builder.nextLine(2); builder.append(Messages.getString("Spreadsheet.Dependency.predecessors") + ":"); //$NON-NLS-1$ //$NON-NLS-2$ builder.nextLine(2); builder.add(createPredecessorsSpreadsheet()); JComponent pred = builder.getPanel(); HelpUtil.addDocHelp(pred, "Linking"); return pred; }
From source file:com.projity.dialog.TaskInformationDialog.java
License:Common Public License
public JComponent createSuccessorsPanel() { FieldComponentMap map = createMap(); FormLayout layout = new FormLayout("p:grow", "p,3dlu,p,3dlu,fill:150dlu:grow"); //$NON-NLS-1$ //$NON-NLS-2$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();//from ww w .jav a 2s . c om CellConstraints cc = new CellConstraints(); builder.add(createHeaderFieldsPanel(map), cc.xyw(builder.getColumn(), builder.getRow(), 1)); builder.nextLine(2); builder.append(Messages.getString("Spreadsheet.Dependency.successors") + ":"); //$NON-NLS-1$ //$NON-NLS-2$ builder.nextLine(2); builder.add(createSuccessorsSpreadsheet()); JComponent succ = builder.getPanel(); HelpUtil.addDocHelp(succ, "Linking"); return succ; }
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();// w w w . ja v a 2s .c o m 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. j ava2 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.TryPODDialog.java
License:Common Public License
public JComponent createContentPanel() { FormLayout layout = new FormLayout("300px", "110px");// rows,cols //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();// w ww .j av a 2 s. co m String tip = Messages.getString("tip.3.description"); tip = tip.replace(PROJITY_LINK, "<a href=\"" + PROJITY_LINK + "\">" + PROJITY_LINK + "</a>"); JEditorPane link = new JEditorPane("text/html", "<html><b>" + tip + "</b></html>"); link.setEditable(false); link.setBackground(getBackground()); link.addHyperlinkListener(new HyperlinkListener() { public void hyperlinkUpdate(HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) BrowserControl.displayURL(e.getURL().toExternalForm()); } }); builder.append(link); return builder.getPanel(); }
From source file:com.projity.dialog.UpdateProjectDialogBox.java
License:Common Public License
public JComponent createContentPanel() { initControls();/* www. ja v a 2s .co m*/ FormLayout layout = new FormLayout("20dlu,3dlu,p, 3dlu,75dlu,3dlu,30dlu ", //$NON-NLS-1$ "p,1dlu,p,1dlu,p,10dlu,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(); CellConstraints cc = new CellConstraints(); builder.append(update); builder.append(Messages.getString("UpdateProjectDialogBox.UpdateWorkAsCompleteThrough")); //$NON-NLS-1$ builder.append(updateDateChooser); builder.nextLine(2); builder.nextColumn(2); builder.add(progress, cc.xyw(builder.getColumn(), builder.getRow(), 5)); builder.nextLine(2); builder.nextColumn(2); builder.add(completeOrNotOnly, cc.xyw(builder.getColumn(), builder.getRow(), 5)); builder.nextLine(2); builder.append(reschedule); builder.append(Messages.getString("UpdateProjectDialogBox.RescheduleCompletedWorkToStartAfter")); //$NON-NLS-1$ builder.append(rescheduleDateChooser); builder.nextLine(8); builder.addSeparator(""); //$NON-NLS-1$ builder.nextLine(2); builder.append(Messages.getString("UpdateProjectDialogBox.For")); //$NON-NLS-1$ builder.nextLine(2); builder.nextColumn(2); builder.append(entireProject); builder.nextLine(2); builder.nextColumn(2); builder.append(selectedTask); return builder.getPanel(); }
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 av a 2 s. com 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(); }