List of usage examples for com.jgoodies.forms.builder DefaultFormBuilder append
public JLabel append(String textWithMnemonic)
From source file:com.projity.dialog.PODOnlyFeature.java
License:Common Public License
public JComponent createContentPanel() { FormLayout layout = new FormLayout("250px", "100px");// rows,cols //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();/* w ww . jav a 2 s . c o m*/ String tip = Messages.getString("Text.notAvailableInOpenProj"); JEditorPane link = new JEditorPane("text/html", tip); link.setEditable(false); link.setForeground(Colors.GRAY); link.setFont(this.getFont()); 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.RenameProjectDialog.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 w w .jav a 2 s . c om * @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("250dlu:grow", // cols //$NON-NLS-1$ "p, 3dlu,p, 3dlu"); // 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(); if (form.isSaveAs()) builder.append(Messages.getString("Message.saveProjectAs1") + form.getName() //$NON-NLS-1$ + Messages.getString("Message.saveProjectAs2")); //$NON-NLS-1$ else builder.append(Messages.getString("Message.renameProject1") + form.getName() //$NON-NLS-1$ + Messages.getString("Message.renameProject2")); //$NON-NLS-1$ builder.nextLine(2); builder.append(createFieldPanel()); return builder.getPanel(); }
From source file:com.projity.dialog.ResourceAdditionDialog.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 om * @return the built panel */ public JComponent createContentPanel() { initControls(); //TODO set minimum size FormLayout layout = new FormLayout("200dlu: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(); CellConstraints cc = new CellConstraints(); builder.append(createFieldPanel()); builder.nextLine(2); builder.add(new JScrollPane(resources)); return builder.getPanel(); }
From source file:com.projity.dialog.ResourceAdditionDialog.java
License:Common Public License
public JComponent createFieldPanel() { FormLayout layout = new FormLayout("p", // cols //$NON-NLS-1$ "p"); // rows //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();/* w w w . j a v a 2 s . c o m*/ CellConstraints cc = new CellConstraints(); builder.append(field1Label); return builder.getPanel(); }
From source file:com.projity.dialog.ResourceInformationDialog.java
License:Common Public License
public JComponent createGeneralPanel() { FieldComponentMap map = createMap(); FormLayout layout = new FormLayout("p, 3dlu, 160dlu, 3dlu, p, 3dlu, p:grow", //$NON-NLS-1$ "p,3dlu,p,3dlu,p,3dlu,p,3dlu,p,0dlu,p"); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder();/* ww w . jav a 2 s .c o m*/ CellConstraints cc = new CellConstraints(); map.append(builder, "Field.name"); //$NON-NLS-1$ map.append(builder, "Field.initials"); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.emailAddress"); //$NON-NLS-1$ map.append(builder, "Field.group"); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.rbsCode"); //$NON-NLS-1$ map.append(builder, "Field.generic"); //$NON-NLS-1$ map.append(builder, "Field.inactive"); //$NON-NLS-1$ builder.nextLine(2); map.append(builder, "Field.resourceType"); //$NON-NLS-1$ map.appendSometimesReadOnly(builder, "Field.materialLabel"); //$NON-NLS-1$ builder.nextLine(2); builder.addLabel(map.getLabel("Field.baseCalendar") + ":"); //$NON-NLS-1$ //$NON-NLS-2$ builder.nextColumn(2); changeWorkingTimeButton = getChangeWorkingTimeButton(); builder.append(pairedComponents(map, "Field.baseCalendar", 0, changeWorkingTimeButton)); //$NON-NLS-1$ return builder.getPanel(); }
From source file:com.projity.dialog.ResourceInformationDialog.java
License:Common Public License
public JComponent createTasksPanel() { 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();/* ww w. jav a2s . c om*/ CellConstraints cc = new CellConstraints(); builder.add(createHeaderFieldsPanel(map), cc.xyw(builder.getColumn(), builder.getRow(), 1)); builder.nextLine(2); builder.append(Messages.getString("ResourceInformationDialog.AssignedToTasks")); // not using assigned button //$NON-NLS-1$ builder.nextLine(2); builder.add(createAssignmentSpreadsheet(), cc.xyw(builder.getColumn(), builder.getRow(), 1)); JComponent panel = builder.getPanel(); HelpUtil.addDocHelp(panel, "Assign_Resources"); return panel; }
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/*from ww w. ja va 2 s . c o m*/ */ 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();//w w w . j a v a 2s . 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 ww w . j a va2 s .c o m 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();/*from w ww . j a v a 2s . 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(); }