List of usage examples for com.jgoodies.forms.layout CellConstraints CellConstraints
public CellConstraints()
From source file:com.projity.dialog.ResourceInformationDialog.java
License:Common Public License
public JComponent createCostsPanel() { FieldComponentMap map = createMap(); FormLayout layout = new FormLayout("50dlu,3dlu,50dlu,3dlu,p:grow", //$NON-NLS-1$ "p,3dlu,p,3dlu,fill:p:grow,3dlu,p,3dlu,p"); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();//from ww w .j a v a 2 s . c om CellConstraints cc = new CellConstraints(); builder.add(createHeaderFieldsPanel(map), cc.xyw(builder.getColumn(), builder.getRow(), 5)); costTabbedPane = new JTabbedPane(); CostRateTable costRateTable; for (int i = 0; i < 5; i++) { costRateTable = ((Resource) object).getCostRateTable(i); costTableSpreadsheets[i] = createCostTableSpreadsheet(costRateTable); costTableSpreadsheets[i].setPreferredScrollableViewportSize(new Dimension(500, 200)); JScrollPane ssPane = SpreadSheet.createScrollPaneForTable(costTableSpreadsheets[i]); costTabbedPane.addTab(costRateTable.getName(), ssPane); } createCostTableSpreadsheets(); builder.nextLine(2); builder.addSeparator(Messages.getString("Text.CostRateTables")); //$NON-NLS-1$ builder.nextLine(2); builder.add(costTabbedPane, cc.xyw(builder.getColumn(), builder.getRow(), 5)); builder.nextLine(2); map.append(builder, "Field.accrueAt"); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.ResourceMappingDialog.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 ww. j a v a 2 s . com */ public JComponent createContentPanel() { initControls(); //TODO set minimum size FormLayout layout = new FormLayout("310dlu:grow", // cols //$NON-NLS-1$ (masterProject == null) ? "p,3dlu,p,3dlu,p,3dlu,p" : "p,3dlu,p,3dlu,p,3dlu,p,3dlu,p"); // rows //$NON-NLS-1$ //$NON-NLS-2$ // 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(createFieldPanel()); builder.nextLine(2); builder.add(new JScrollPane(associationTable)); if (masterProject != null) { builder.nextLine(2); builder.append(masterProject); } builder.nextLine(2); builder.append(localProject); builder.nextLine(2); builder.append(createFooterPanel()); return builder.getPanel(); }
From source file:com.projity.dialog.ResourceMappingDialog.java
License:Common Public License
public JComponent createFieldPanel() { FormLayout layout = new FormLayout("p,3dlu,p", // cols //$NON-NLS-1$ "p"); // rows //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();//from w w w . j av a 2 s.c o m CellConstraints cc = new CellConstraints(); builder.append(field1Label); builder.append(field1); return builder.getPanel(); }
From source file:com.projity.dialog.ResourceMappingDialog.java
License:Common Public License
public JComponent createFooterPanel() { FormLayout layout = new FormLayout("p,3dlu,p", // cols //$NON-NLS-1$ "p"); // rows //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();//from w w w .j a v a2 s . c om CellConstraints cc = new CellConstraints(); builder.append(accessControlLabel); //$NON-NLS-1$ builder.add(accessControl, cc.xy(builder.getColumn(), builder.getRow(), "left,default")); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.ResourceSubstitutionDialog.java
License:Common Public License
public JComponent createContentPanel() { initControls();/* w ww. j a va2 s . c o m*/ FormLayout layout = new FormLayout("p,3dlu,p,3dlu,p", //$NON-NLS-1$ "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("Original resource:"); builder.nextColumn(2); builder.append(fromResource); builder.nextLine(2); builder.append("Replace with:"); builder.nextColumn(2); builder.append(toResource); builder.nextLine(2); builder.append("Starting from:"); builder.nextColumn(2); builder.append(rescheduleDateChooser); 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.append(""); builder.nextColumn(2); builder.append(selectedTask); builder.nextLine(2); builder.append(ignoreInProgress); builder.nextLine(2); return builder.getPanel(); }
From source file:com.projity.dialog.TaskInformationDialog.java
License:Common Public License
public JComponent createContentPanel() { FormLayout layout = new FormLayout("350dlu:grow", "fill:250dlu:grow"); //$NON-NLS-1$ //$NON-NLS-2$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();/* w w w .j a v a 2 s .c o m*/ CellConstraints cc = new CellConstraints(); taskTabbedPane = new JTabbedPane(); taskTabbedPane.addTab(Messages.getString("TaskInformationDialog.General"), createGeneralPanel()); //$NON-NLS-1$ taskTabbedPane.addTab(Messages.getString("TaskInformationDialog.Predecessors"), createPredecessorsPanel()); //$NON-NLS-1$ taskTabbedPane.addTab(Messages.getString("TaskInformationDialog.Successors"), createSuccessorsPanel()); //$NON-NLS-1$ String resources = Messages.getString("TaskInformationDialog.Resources"); //$NON-NLS-1$ taskTabbedPane.addTab(resources, createResourcesPanel()); resourcesTabIndex = taskTabbedPane.indexOfTab(resources); taskTabbedPane.addTab(Messages.getString("TaskInformationDialog.Advanced"), createAdvancedPanel()); //$NON-NLS-1$ String notes = Messages.getString("TaskInformationDialog.Notes"); //$NON-NLS-1$ taskTabbedPane.addTab(notes, createNotesPanel()); notesTabIndex = taskTabbedPane.indexOfTab(notes); builder.add(taskTabbedPane); mainComponent = taskTabbedPane; 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 ww w .j a v a 2 s. co 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. ja 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();// w w w . ja v a 2 s.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.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 . j av a 2 s .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; }