List of usage examples for com.jgoodies.forms.layout CellConstraints CENTER
Alignment CENTER
To view the source code for com.jgoodies.forms.layout CellConstraints CENTER.
Click Source Link
From source file:com.atlassian.theplugin.idea.crucible.CrucibleReviewCreateForm.java
License:Apache License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL// ww w . j av a 2 s .c o m */ private void $$$setupUI$$$() { rootComponent = new JPanel(); rootComponent.setLayout(new FormLayout("fill:d:grow", "center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,center:max(d;4px):noGrow,center:p:grow,top:3dlu:noGrow,fill:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow")); rootComponent.setMinimumSize(new Dimension(800, 505)); final JLabel label1 = new JLabel(); label1.setText("Title:"); CellConstraints cc = new CellConstraints(); rootComponent.add(label1, cc.xy(1, 1)); titleText = new JTextField(); rootComponent.add(titleText, cc.xy(1, 3, CellConstraints.FILL, CellConstraints.DEFAULT)); final JPanel panel1 = new JPanel(); panel1.setLayout(new FormLayout( "fill:d:noGrow,left:4dlu:noGrow,fill:300px:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(p;4px):grow", "center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow")); rootComponent.add(panel1, cc.xy(1, 5)); final JLabel label2 = new JLabel(); label2.setText("Server:"); panel1.add(label2, cc.xy(1, 1, CellConstraints.DEFAULT, CellConstraints.CENTER)); crucibleServersComboBox = new JComboBox(); panel1.add(crucibleServersComboBox, cc.xy(3, 1)); final JLabel label3 = new JLabel(); label3.setInheritsPopupMenu(false); label3.setText("Project:"); panel1.add(label3, cc.xy(1, 3, CellConstraints.DEFAULT, CellConstraints.CENTER)); projectsComboBox = new JComboBox(); panel1.add(projectsComboBox, cc.xy(3, 3)); final JLabel label4 = new JLabel(); label4.setText("Moderator:"); panel1.add(label4, cc.xy(1, 7, CellConstraints.DEFAULT, CellConstraints.CENTER)); final JLabel label5 = new JLabel(); label5.setText("Author:"); panel1.add(label5, cc.xy(1, 9, CellConstraints.DEFAULT, CellConstraints.CENTER)); moderatorComboBox = new JComboBox(); panel1.add(moderatorComboBox, cc.xy(3, 7)); authorComboBox = new JComboBox(); panel1.add(authorComboBox, cc.xy(3, 9)); final JPanel panel2 = new JPanel(); panel2.setLayout(new BorderLayout(0, 0)); panel1.add(panel2, cc.xywh(7, 1, 1, 7, CellConstraints.DEFAULT, CellConstraints.FILL)); final JScrollPane scrollPane1 = new JScrollPane(); panel2.add(scrollPane1, BorderLayout.CENTER); final JLabel label6 = new JLabel(); label6.setText("Reviewers: "); panel1.add(label6, cc.xy(5, 1, CellConstraints.RIGHT, CellConstraints.TOP)); final JLabel label7 = new JLabel(); label7.setText("Selected: "); panel1.add(label7, cc.xy(5, 9, CellConstraints.RIGHT, CellConstraints.DEFAULT)); final JLabel label8 = new JLabel(); label8.setText("Statement of Objectives:"); rootComponent.add(label8, cc.xy(1, 7)); final JScrollPane scrollPane2 = new JScrollPane(); rootComponent.add(scrollPane2, cc.xy(1, 9, CellConstraints.FILL, CellConstraints.FILL)); statementArea = new JTextArea(); statementArea.setLineWrap(true); statementArea.setRows(5); scrollPane2.setViewportView(statementArea); customComponentPanel = new JPanel(); customComponentPanel.setLayout(new BorderLayout(0, 0)); rootComponent.add(customComponentPanel, cc.xy(1, 11, CellConstraints.DEFAULT, CellConstraints.FILL)); label1.setLabelFor(titleText); label2.setLabelFor(crucibleServersComboBox); label5.setLabelFor(scrollPane1); label8.setLabelFor(statementArea); }
From source file:com.atlassian.theplugin.idea.GeneralConfigForm.java
License:Apache License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/* www .ja va 2s . c o m*/ */ private void $$$setupUI$$$() { createUIComponents(); mainPanel = new JPanel(); mainPanel.setLayout(new FormLayout("fill:d:grow", "center:max(d;4px):noGrow,top:3dlu:noGrow,center:d:noGrow,top:4dlu:noGrow,center:max(d;4px):grow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow")); mainPanel .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12), null)); autoUpdateConfigPanel = new JPanel(); autoUpdateConfigPanel.setLayout(new GridLayoutManager(3, 3, new Insets(0, 12, 12, 12), -1, -1)); CellConstraints cc = new CellConstraints(); mainPanel.add(autoUpdateConfigPanel, cc.xy(1, 1)); autoUpdateConfigPanel .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Auto Upgrade")); checkNowButton = new JButton(); checkNowButton.setText("Check Now"); checkNowButton.setMnemonic('C'); checkNowButton.setDisplayedMnemonicIndex(0); autoUpdateConfigPanel.add(checkNowButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final JPanel panel1 = new JPanel(); panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1)); autoUpdateConfigPanel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); chkUnstableVersionsCheckBox = new JCheckBox(); chkUnstableVersionsCheckBox.setEnabled(false); chkUnstableVersionsCheckBox.setText("Check Snapshot Versions"); panel1.add(chkUnstableVersionsCheckBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final Spacer spacer1 = new Spacer(); panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, new Dimension(12, -1), null, null, 0, false)); chkAutoUpdateEnabled = new JCheckBox(); chkAutoUpdateEnabled.setText("Enabled (Stable Version)"); chkAutoUpdateEnabled.setMnemonic('E'); chkAutoUpdateEnabled.setDisplayedMnemonicIndex(0); autoUpdateConfigPanel.add(chkAutoUpdateEnabled, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final Spacer spacer2 = new Spacer(); autoUpdateConfigPanel.add(spacer2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); checkNewVersionStable = new JRadioButton(); checkNewVersionStable.setSelected(true); checkNewVersionStable.setText("Stable Only"); autoUpdateConfigPanel.add(checkNewVersionStable, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); checkNewVersionAll = new JRadioButton(); checkNewVersionAll.setText("Stable + Snapshot"); autoUpdateConfigPanel.add(checkNewVersionAll, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); httpProxyPanel = new JPanel(); httpProxyPanel.setLayout(new GridLayoutManager(4, 2, new Insets(0, 12, 12, 0), -1, -1)); mainPanel.add(httpProxyPanel, cc.xy(1, 3, CellConstraints.DEFAULT, CellConstraints.TOP)); httpProxyPanel .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "HTTP Proxy")); chkUseIdeaProxy = new JRadioButton(); chkUseIdeaProxy.setText("Use IDEA Proxy Settings"); httpProxyPanel.add(chkUseIdeaProxy, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); httpProxyButton = new JButton(); httpProxyButton.setText("Edit IDEA Proxy Settings"); httpProxyPanel.add(httpProxyButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); chkNoProxy = new JRadioButton(); chkNoProxy.setText("Do Not Use Proxy"); httpProxyPanel.add(chkNoProxy, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final Spacer spacer3 = new Spacer(); httpProxyPanel.add(spacer3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); final JLabel label1 = new JLabel(); label1.setFont(new Font(label1.getFont().getName(), label1.getFont().getStyle(), 10)); label1.setText("Information: You have to restart IDEA to apply changes in the proxy configuration"); httpProxyPanel.add(label1, new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final JPanel panel2 = new JPanel(); panel2.setLayout(new FormLayout("left:p:noGrow,left:p:noGrow", "center:d:grow")); mainPanel.add(panel2, cc.xy(1, 9)); reportAnonymousUsageStatisticsCheckBox = new JCheckBox(); reportAnonymousUsageStatisticsCheckBox.setEnabled(true); reportAnonymousUsageStatisticsCheckBox.setSelected(false); reportAnonymousUsageStatisticsCheckBox .setText("Provide anonymous usage statistics to help us develop a better plugin"); reportAnonymousUsageStatisticsCheckBox.setMnemonic('P'); reportAnonymousUsageStatisticsCheckBox.setDisplayedMnemonicIndex(0); panel2.add(reportAnonymousUsageStatisticsCheckBox, cc.xy(1, 1)); panel2.add(usageStatsHelp, cc.xy(2, 1, CellConstraints.LEFT, CellConstraints.CENTER)); final JPanel panel3 = new JPanel(); panel3.setLayout(new GridLayoutManager(5, 3, new Insets(0, 12, 12, 12), -1, -1)); mainPanel.add(panel3, cc.xy(1, 5, CellConstraints.DEFAULT, CellConstraints.TOP)); panel3.setBorder( BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Direct Click Through")); ctrlHttpServer = new JCheckBox(); ctrlHttpServer.setSelected(false); ctrlHttpServer.setText("Enable Direct Click Through"); panel3.add(ctrlHttpServer, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final Spacer spacer4 = new Spacer(); panel3.add(spacer4, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); final JLabel label2 = new JLabel(); label2.setFont(new Font(label2.getFont().getName(), label2.getFont().getStyle(), 10)); label2.setText("Information: You have to restart IDEA to apply changes (start/stop http server)"); panel3.add(label2, new GridConstraints(3, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final JLabel label3 = new JLabel(); label3.setText(" Direct Click Through TCP/IP Port: "); panel3.add(label3, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final Spacer spacer5 = new Spacer(); panel3.add(spacer5, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); final Spacer spacer6 = new Spacer(); panel3.add(spacer6, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); ctrlHttpServerPort = new JSpinner(); panel3.add(ctrlHttpServerPort, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(70, -1), new Dimension(70, -1), null, 0, false)); ButtonGroup buttonGroup; buttonGroup = new ButtonGroup(); buttonGroup.add(checkNewVersionStable); buttonGroup.add(checkNewVersionAll); buttonGroup = new ButtonGroup(); buttonGroup.add(chkNoProxy); buttonGroup.add(chkUseIdeaProxy); }
From source file:com.atlassian.theplugin.idea.jira.PerformIssueActionForm.java
License:Apache License
private void createContent(final List<JIRAActionField> fieldList) { String columns = "3dlu, right:pref, 3dlu, fill:1dlu:grow, 3dlu"; String rows = "3dlu"; Collection<JIRAActionField> sortedFieldList = JiraActionFieldType.sortFieldList(fieldList); JIRAServerModel jiraServerModel = IdeaHelper.getJIRAServerModel(project); List<ActionFieldEditor> editors = Lists.newArrayList(); List<String> unsupportedFields = Lists.newArrayList(); for (JIRAActionField field : sortedFieldList) { ActionFieldEditor editor = null; String row = null;/*from w w w . j a v a2 s . c om*/ switch (JiraActionFieldType.getFieldTypeForFieldId(field)) { case SUMMARY: editor = new FieldTextField(issue.getSummary(), field); row = ", pref, 3dlu"; break; case DESCRIPTION: editor = new FieldTextArea(Html2text.translate(issue.getWikiDescription()), field); row = ", fill:pref:grow, 3dlu"; break; case ISSUE_TYPE: editor = new FieldIssueType(jiraServerModel, issue, field, this); row = ", p, 3dlu"; break; case RESOLUTION: editor = new FieldResolution(jiraServerModel, issue, field, this); row = ", p, 3dlu"; break; case ASSIGNEE: editor = new FieldUser(jiraServerModel, issue.getJiraServerData(), issue.getAssigneeId(), field); row = ", p, 3dlu"; break; case PRIORITY: editor = new FieldPriority(jiraServerModel, issue, field, this); row = ", p, 3dlu"; break; case VERSIONS: editor = new FieldAffectsVersion(jiraServerModel, issue, field, this); row = ", p, 3dlu"; break; case FIX_VERSIONS: editor = new FieldFixForVersion(jiraServerModel, issue, field, this); row = ", p, 3dlu"; break; case COMPONENTS: editor = new FieldComponents(jiraServerModel, issue, field, this); row = ", p, 3dlu"; break; case REPORTER: editor = new FieldUser(jiraServerModel, issue.getJiraServerData(), issue.getReporterId(), field); row = ", p, 3dlu"; break; case ENVIRONMENT: // editor = new FieldTextArea(field.getValues().get(0), field); editor = new FieldTextArea(Html2text.translate(issue.getEnvironment()), field); row = ", fill:pref:grow, 3dlu"; break; case TIMETRACKING: editor = new FieldTimeTracking(field.getValues().get(0), issue, field, this); row = ", p, 3dlu"; break; case DUE_DATE: String content = ""; if (field.getValues() != null && field.getValues().size() > 0) { content = field.getValues().get(0); } editor = new FieldDueDate(content, field, this); row = ", p, 3dlu"; break; case CUSTOM_FIELD: for (JiraCustomField custom : issue.getCustomFields()) { if (custom.getId().equals(field.getFieldId())) { List<String> values = custom.getValues(); String val = values != null && values.size() > 0 ? values.get(0) : null; switch (custom.getTypeKey()) { case NUMERIC: editor = new FieldTextField(val, field); row = ", p, 3dlu"; break; case TEXT: editor = new FieldTextField(val, field); row = ", p, 3dlu"; break; case TEXT_AREA: // editor = new FieldEditorPane(custom.getValues().get(0).replaceAll("<br/>", "\n"), field, true); editor = new FieldTextArea(val != null ? val.replaceAll("<br/>", "") : "", field); row = ", p, 3dlu"; break; case DATE_PICKER: editor = new FieldDueDate(custom.getFormattedValue(), field, this); row = ", p, 3dlu"; break; case URL: editor = new FieldTextField(custom.getFormattedValue(), field); row = ", p, 3dlu"; case UNSUPPORTED: default: break; } } } break; case UNSUPPORTED: default: unsupportedFields.add(field.getName()); break; } if (editor != null) { editors.add(editor); rows += row; } } rows += ", fill:pref:grow, 3dlu"; // Comments text area if (!unsupportedFields.isEmpty()) { rows += ", pref, 3dlu"; // warning status line about not handled } contentPanel.setLayout(new FormLayout(columns, rows)); final CellConstraints cc = new CellConstraints(); int y = 2; for (ActionFieldEditor editor : editors) { final JLabel label = new JLabel(editor.getFieldName() + ":"); contentPanel.add(label, cc.xy(2, y, CellConstraints.RIGHT, CellConstraints.TOP)); contentPanel.add(editor.getComponent(), cc.xy(4, y)); createdFieldEditors.add(editor); y += 2; } final JLabel label = new JLabel("Comment :"); contentPanel.add(label, cc.xy(2, y, CellConstraints.RIGHT, CellConstraints.TOP)); // todo create field for Comments commentTextArea = new CommentTextArea(); contentPanel.add(commentTextArea, cc.xy(4, y)); y += 2; if (!unsupportedFields.isEmpty()) { String warning = issue.usesRest() ? "Unsupported fields (skipped): " : "Unsupported fields (original values copied): "; warning += StringUtils.join(unsupportedFields, ", "); contentPanel.add(new JLabel(warning), cc.xyw(2, y, 3, CellConstraints.LEFT, CellConstraints.CENTER)); } SwingUtilities.invokeLater(new Runnable() { public void run() { contentPanel.validate(); } }); }
From source file:com.atlassian.theplugin.idea.jira.WorkLogCreateAndMaybeDeactivateDialog.java
License:Apache License
private JPanel createChangesetPanel() { CellConstraints cc = new CellConstraints(); changesetPanel = new JPanel(new FormLayout("3dlu, fill:pref:grow, 3dlu", "3dlu, fill:d:grow, 3dlu, pref, 3dlu, pref, 3dlu, pref, pref, pref, 3dlu")); changesetPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Changes")); changesPanel = new JPanel(new BorderLayout(0, 0)); changesPanel.setPreferredSize(new Dimension(1, 1)); changesetPanel.add(changesPanel, cc.xy(2, 2)); JPanel labelPanel = new JPanel(new FormLayout("right:pref", "10dlu, pref:grow")); labelPanel.add(new JLabel("Comment:"), cc.xy(1, 1)); copyIcon = IconLoader.getIcon("/actions/copy.png"); copyButton = new JButton(copyIcon); copyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { if (chkLogWork.isSelected()) { issueComment.setText(comment.getText()); }/* w w w . j a v a 2s. com*/ } }); labelPanel.add(copyButton, cc.xy(1, 2, CellConstraints.CENTER, CellConstraints.CENTER)); commentPanel = new JPanel(new FormLayout("right:pref, fill:d:grow", "40dlu")); commentPanel.add(labelPanel, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL)); comment = new JTextArea(); comment.setLineWrap(true); final JScrollPane scroll = new JScrollPane(); scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); scroll.setViewportView(comment); commentPanel.add(scroll, cc.xyw(2, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); changesetPanel.add(commentPanel, cc.xy(2, 4)); btnChangeSetDoNothing = new JRadioButton("Leave the current change list active", config.getActiveIssueAfterCommit() == AfterCommit.DO_NOTHING.ordinal()); btnChangeSetDeactivate = new JRadioButton( "Deactivate the currently active change list (activate the default change list)", config.getActiveIssueAfterCommit() == AfterCommit.DEACTIVATE_CHANGESET.ordinal()); btnChangeSetRemove = new JRadioButton( "Remove the currently active change list (activate the default change list)", config.getActiveIssueAfterCommit() == AfterCommit.REMOVE_CHANGESET.ordinal()); changeSetButtonGroup = new ButtonGroup(); changeSetButtonGroup.add(btnChangeSetDoNothing); changeSetButtonGroup.add(btnChangeSetDeactivate); changeSetButtonGroup.add(btnChangeSetRemove); if (changeSetButtonGroup.getSelection() == null) { btnChangeSetDoNothing.setSelected(true); } changesetPanel.add(new JLabel("After Commit:"), cc.xy(2, 6)); changesetPanel.add(btnChangeSetDoNothing, cc.xy(2, 8)); changesetPanel.add(btnChangeSetDeactivate, cc.xy(2, 9)); changesetPanel.add(btnChangeSetRemove, cc.xy(2, 10)); UIUtil.setEnabled(changesetPanel, chkCommitChanges.isSelected(), true); enableChangesetRadioButtons(true); return changesetPanel; }
From source file:com.atlassian.theplugin.idea.jira.WorkLogCreateAndMaybeDeactivateDialog.java
License:Apache License
private JPanel createTimePanel() { CellConstraints cc = new CellConstraints(); timePanel = new JPanel(new FormLayout( "3dlu, right:pref, 3dlu, left:pref, 3dlu, 10dlu, left:pref, 3dlu, left:pref:grow, 3dlu", "3dlu, pref, 3dlu, pref, pref, pref, 3dlu, pref, 10dlu, 40dlu, 3dlu")); timePanel.add(new JLabel("Time Spent:"), cc.xy(2, 2)); timeSpentField = createFixedTextField(120, 28); timePanel.add(timeSpentField, cc.xy(4, 2)); explanationText = new JTextPane(); explanationText.setText("An estimate of how much time you have spent working." + "\nThe format of this is ' *w *d *h *m ' (representing weeks," + "\ndays, hours and minutes - where * can be any number)" + "\nExamples: 4d, 5h 30m, 60m and 3w."); explanationText.setEditable(false);//from ww w. j a v a 2 s. c om explanationText.setEnabled(true); explanationText .setFont(new Font(explanationText.getFont().getName(), explanationText.getFont().getStyle(), 10)); explanationText.setOpaque(false); timePanel.add(explanationText, cc.xywh(4, 4, 1, 4)); timePanel.add(new JLabel("Remaining Estimate:"), cc.xyw(6, 2, 2)); btnAutoUpdate = new JRadioButton("Auto Update", true); btnLeaveUnchanged = new JRadioButton("Leave Unchanged"); btnUpdateManually = new JRadioButton("Update Manually:"); timePanel.add(btnAutoUpdate, cc.xy(7, 4)); timePanel.add(btnLeaveUnchanged, cc.xy(7, 5)); timePanel.add(btnUpdateManually, cc.xy(7, 6)); remainingEstimateField = createFixedTextField(120, 28); timePanel.add(remainingEstimateField, cc.xy(9, 6)); ButtonGroup group = new ButtonGroup(); group.add(btnUpdateManually); group.add(btnAutoUpdate); group.add(btnLeaveUnchanged); endTimePanel = new JPanel(new FormLayout("fill:pref:grow, 3dlu, pref", "pref")); endDateLabel = new JLabel("1/01/08 12:00"); endTimePanel.add(endDateLabel, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); endDateChange = new JButton("Change"); endTimePanel.add(endDateChange, cc.xy(3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); if (!deactivateActiveIssue) { timePanel.add(new JLabel("End Time:"), cc.xy(2, 8)); timePanel.add(endTimePanel, cc.xy(4, 8)); } timePanel.add(new JLabel("Comment:"), cc.xy(2, 10, CellConstraints.RIGHT, CellConstraints.TOP)); issueComment = new JTextArea(); issueComment.setLineWrap(true); final JScrollPane scroll = new JScrollPane(); scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); scroll.setViewportView(issueComment); timePanel.add(scroll, cc.xyw(4, 10, 6, CellConstraints.FILL, CellConstraints.FILL)); UIUtil.setEnabled(timePanel, chkLogWork.isSelected() || !deactivateActiveIssue, true); remainingEstimateField.setEnabled(false); return timePanel; }
From source file:com.aw.swing.mvp.cmp.pick.FrmPickDocVenta.java
License:Open Source License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/* w w w . j a va 2 s . c o m*/ */ private void $$$setupUI$$$() { createUIComponents(); pnlMain = new JPanel(); pnlMain.setLayout(new FormLayout( "left:25dlu:noGrow,fill:52dlu:noGrow,left:8dlu:noGrow,fill:56dlu:noGrow,left:4dlu:noGrow,fill:36px:noGrow,fill:max(d;4px):noGrow,left:57dlu:noGrow,fill:10px:noGrow,fill:54dlu:noGrow,left:16dlu:noGrow", "center:12dlu:noGrow,top:4dlu:noGrow,center:12dlu:noGrow,top:6dlu:noGrow,top:12dlu:noGrow,top:4dlu:noGrow,center:12dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,top:12dlu:noGrow,center:146dlu:noGrow,top:4dlu:noGrow,top:12dlu:noGrow,center:max(d;4dlu):noGrow,center:12dlu:noGrow")); pnlMain.setMinimumSize(new Dimension(501, 425)); pnlMain.setOpaque(true); pnlMain.setPreferredSize(new Dimension(501, 425)); lblSearch = new JLabel(); lblSearch.setHorizontalAlignment(4); lblSearch.setText("Descripcin"); lblSearch.setDisplayedMnemonic('D'); lblSearch.setDisplayedMnemonicIndex(0); CellConstraints cc = new CellConstraints(); pnlMain.add(lblSearch, cc.xyw(1, 3, 2, CellConstraints.FILL, CellConstraints.DEFAULT)); btnSearch = new JButton(); btnSearch.setText("Buscar"); btnSearch.setMnemonic('B'); btnSearch.setDisplayedMnemonicIndex(0); pnlMain.add(btnSearch, cc.xy(10, 3)); footerPanel.setLayout( new FormLayout("fill:73dlu:noGrow,left:191dlu:noGrow,fill:48dlu:noGrow", "center:12dlu:noGrow")); pnlMain.add(footerPanel, cc.xyw(1, 15, 11, CellConstraints.DEFAULT, CellConstraints.FILL)); lblF10 = new JLabel(); lblF10.setText(" [F10] Aceptar"); footerPanel.add(lblF10, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); lblEsc = new JLabel(); lblEsc.setText(" [Esc] Salir"); footerPanel.add(lblEsc, cc.xy(3, 1)); sepCriterioBusqueda.setSeparatorTitle("Criterio de Bsqueda"); pnlMain.add(sepCriterioBusqueda, cc.xyw(1, 1, 11, CellConstraints.FILL, CellConstraints.FILL)); pnlTitGrid.setLayout( new FormLayout("fill:204dlu:noGrow,left:88dlu:noGrow,fill:15dlu:noGrow", "center:12dlu:noGrow")); pnlMain.add(pnlTitGrid, cc.xyw(1, 10, 11, CellConstraints.FILL, CellConstraints.FILL)); lblTitGrid = new JLabel(); lblTitGrid.setText(" Relacin :"); lblTitGrid.setDisplayedMnemonic('R'); lblTitGrid.setDisplayedMnemonicIndex(1); pnlTitGrid.add(lblTitGrid, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); chkSel = new JCheckBox(); chkSel.setBackground(new Color(-16747105)); chkSel.setText(""); pnlTitGrid.add(chkSel, cc.xy(3, 1)); final JScrollPane scrollPane1 = new JScrollPane(); scrollPane1.setMinimumSize(new Dimension(454, 418)); pnlMain.add(scrollPane1, cc.xyw(1, 11, 11, CellConstraints.FILL, CellConstraints.FILL)); tblGrid = new JTable(); tblGrid.setMinimumSize(new Dimension(450, 400)); scrollPane1.setViewportView(tblGrid); final JLabel label1 = new JLabel(); label1.setText(" Nmero de Registros:"); pnlMain.add(label1, cc.xyw(1, 13, 3)); lblNumRegistros = new JLabel(); lblNumRegistros.setText("Label"); pnlMain.add(lblNumRegistros, cc.xyw(4, 13, 6)); txtSearch = new JTextField(); pnlMain.add(txtSearch, cc.xyw(4, 3, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); lblFecIni = new JLabel(); lblFecIni.setText("Fecha del"); pnlMain.add(lblFecIni, cc.xy(2, 5, CellConstraints.RIGHT, CellConstraints.CENTER)); lblFecFin = new JLabel(); lblFecFin.setText("al"); pnlMain.add(lblFecFin, cc.xy(6, 5, CellConstraints.RIGHT, CellConstraints.CENTER)); txtFecIni = new JTextField(); pnlMain.add(txtFecIni, cc.xy(4, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); txtFecFin = new JTextField(); pnlMain.add(txtFecFin, cc.xy(8, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); lblEntInm = new JLabel(); lblEntInm.setHorizontalAlignment(4); lblEntInm.setText("Entrega Inmediata"); pnlMain.add(lblEntInm, cc.xyw(1, 7, 2, CellConstraints.FILL, CellConstraints.CENTER)); cmbEntInm = new JComboBox(); pnlMain.add(cmbEntInm, cc.xy(4, 7)); lblSearch.setLabelFor(txtSearch); lblFecIni.setLabelFor(txtSearch); lblFecFin.setLabelFor(txtSearch); lblEntInm.setLabelFor(txtSearch); }
From source file:com.aw.swing.mvp.cmp.pick.FrmPickMovAlm.java
License:Open Source License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL//from ww w .j a v a2 s .co m */ private void $$$setupUI$$$() { createUIComponents(); pnlMain = new JPanel(); pnlMain.setLayout(new FormLayout( "left:25dlu:noGrow,fill:52dlu:noGrow,left:8dlu:noGrow,fill:43dlu:noGrow,left:10dlu:noGrow,fill:13px:noGrow,left:19dlu:noGrow,fill:8px:noGrow,left:56dlu:noGrow,fill:10px:noGrow,fill:50dlu:noGrow,left:22dlu:noGrow", "center:12dlu:noGrow,top:4dlu:noGrow,center:12dlu:noGrow,top:5dlu:noGrow,center:12dlu:noGrow,top:3dlu:noGrow,center:18px:noGrow,top:4dlu:noGrow,top:12dlu:noGrow,center:149dlu:noGrow,top:4dlu:noGrow,top:12dlu:noGrow,center:max(d;4dlu):noGrow,center:12dlu:noGrow")); pnlMain.setMinimumSize(new Dimension(501, 425)); pnlMain.setOpaque(true); pnlMain.setPreferredSize(new Dimension(501, 425)); lblSearch = new JLabel(); lblSearch.setText("Descripcin"); lblSearch.setDisplayedMnemonic('D'); lblSearch.setDisplayedMnemonicIndex(0); CellConstraints cc = new CellConstraints(); pnlMain.add(lblSearch, cc.xyw(1, 3, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT)); btnSearch = new JButton(); btnSearch.setText("Buscar"); btnSearch.setMnemonic('B'); btnSearch.setDisplayedMnemonicIndex(0); pnlMain.add(btnSearch, cc.xy(11, 3)); footerPanel.setLayout( new FormLayout("fill:73dlu:noGrow,left:191dlu:noGrow,fill:48dlu:noGrow", "center:12dlu:noGrow")); pnlMain.add(footerPanel, cc.xyw(1, 14, 12, CellConstraints.DEFAULT, CellConstraints.FILL)); lblF10 = new JLabel(); lblF10.setText(" [F10] Aceptar"); footerPanel.add(lblF10, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); lblEsc = new JLabel(); lblEsc.setText(" [Esc] Salir"); footerPanel.add(lblEsc, cc.xy(3, 1)); sepCriterioBusqueda.setSeparatorTitle("Criterio de Bsqueda"); pnlMain.add(sepCriterioBusqueda, cc.xyw(1, 1, 12, CellConstraints.FILL, CellConstraints.FILL)); pnlTitGrid.setLayout( new FormLayout("fill:204dlu:noGrow,left:88dlu:noGrow,fill:15dlu:noGrow", "center:12dlu:noGrow")); pnlMain.add(pnlTitGrid, cc.xyw(1, 9, 12, CellConstraints.FILL, CellConstraints.FILL)); lblTitGrid = new JLabel(); lblTitGrid.setText(" Relacin :"); lblTitGrid.setDisplayedMnemonic('R'); lblTitGrid.setDisplayedMnemonicIndex(1); pnlTitGrid.add(lblTitGrid, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); chkSel = new JCheckBox(); chkSel.setBackground(new Color(-16747105)); chkSel.setText(""); pnlTitGrid.add(chkSel, cc.xy(3, 1)); final JScrollPane scrollPane1 = new JScrollPane(); scrollPane1.setMinimumSize(new Dimension(454, 418)); pnlMain.add(scrollPane1, cc.xyw(1, 10, 12, CellConstraints.FILL, CellConstraints.FILL)); tblGrid = new JTable(); tblGrid.setMinimumSize(new Dimension(450, 400)); scrollPane1.setViewportView(tblGrid); final JLabel label1 = new JLabel(); label1.setText(" Nmero de Registros:"); pnlMain.add(label1, cc.xyw(1, 12, 3)); lblNumRegistros = new JLabel(); lblNumRegistros.setText("Label"); pnlMain.add(lblNumRegistros, cc.xyw(4, 12, 7)); txtSearch = new JTextField(); pnlMain.add(txtSearch, cc.xyw(4, 3, 6, CellConstraints.FILL, CellConstraints.DEFAULT)); lblSearch2 = new JLabel(); lblSearch2.setText("Descripcin2"); lblSearch2.setDisplayedMnemonic('D'); lblSearch2.setDisplayedMnemonicIndex(0); pnlMain.add(lblSearch2, cc.xyw(1, 7, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT)); cmbAlmacen = new JComboBox(); pnlMain.add(cmbAlmacen, cc.xyw(4, 7, 6)); lblFecIni = new JLabel(); lblFecIni.setText("Fecha del"); pnlMain.add(lblFecIni, cc.xyw(1, 5, 2, CellConstraints.RIGHT, CellConstraints.CENTER)); txtFecIni = new JTextField(); pnlMain.add(txtFecIni, cc.xyw(4, 5, 3, CellConstraints.FILL, CellConstraints.DEFAULT)); lblFecFin = new JLabel(); lblFecFin.setText("al"); pnlMain.add(lblFecFin, cc.xy(7, 5, CellConstraints.RIGHT, CellConstraints.CENTER)); txtFecFin = new JTextField(); pnlMain.add(txtFecFin, cc.xy(9, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); lblSearch.setLabelFor(txtSearch); lblSearch2.setLabelFor(txtSearch); lblFecIni.setLabelFor(txtSearch); lblFecFin.setLabelFor(txtSearch); }
From source file:com.aw.swing.mvp.ui.FormLayout.java
License:Open Source License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/*from w w w . jav a 2s .com*/ */ private void $$$setupUI$$$() { createUIComponents(); mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout(0, 0)); mainPanel.setPreferredSize(new Dimension(600, 400)); mainPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createRaisedBevelBorder(), null)); contentPanel = new JPanel(); contentPanel.setLayout(new com.jgoodies.forms.layout.FormLayout( "fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow", "center:max(d;4px):noGrow")); mainPanel.add(contentPanel, BorderLayout.CENTER); contentPanel .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10), null)); headerPanel = new JPanel(); headerPanel.setLayout(new com.jgoodies.forms.layout.FormLayout("fill:d:grow", "center:52px:noGrow,center:max(d;4px):noGrow")); headerPanel.setPreferredSize(new Dimension(0, 74)); mainPanel.add(headerPanel, BorderLayout.NORTH); titlePanel.setLayout(new BorderLayout(0, 0)); titlePanel.setBackground(new Color(-1)); titlePanel.setMinimumSize(new Dimension(0, 50)); titlePanel.setPreferredSize(new Dimension(0, 60)); CellConstraints cc = new CellConstraints(); headerPanel.add(titlePanel, cc.xy(1, 1)); titlePanel.add(formTitle, BorderLayout.CENTER); errorPanel.setLayout(new com.jgoodies.forms.layout.FormLayout("fill:d:grow", "center:d:grow")); errorPanel.setBackground(new Color(-52378)); errorPanel.setPreferredSize(new Dimension(0, 30)); headerPanel.add(errorPanel, cc.xy(1, 2)); lblErrorMessage.setFont( new Font(lblErrorMessage.getFont().getName(), Font.BOLD, lblErrorMessage.getFont().getSize())); lblErrorMessage.setForeground(new Color(-1)); lblErrorMessage.setHorizontalAlignment(2); lblErrorMessage.setHorizontalTextPosition(11); lblErrorMessage.setMinimumSize(new Dimension(128, 18)); lblErrorMessage.setText("El campo es requerido"); errorPanel.add(lblErrorMessage, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); }
From source file:com.devdaily.heidi.LicenseReminderDialog.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents dialogPane = new JPanel(); contentPanel = new JPanel(); htmlMessageScrollPane = new JScrollPane(); htmlMessageArea = new JEditorPane(); closeButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {//from w ww. j av a2 s. co m dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, new ColumnSpec(ColumnSpec.LEFT, Sizes.dluX(0), FormSpec.NO_GROW), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), new ColumnSpec(Sizes.dluX(0)), FormFactory.GLUE_COLSPEC }, new RowSpec[] { FormFactory.LINE_GAP_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== htmlMessageScrollPane ======== { //---- htmlMessageArea ---- htmlMessageArea.setContentType("text/html"); htmlMessageArea.setEditable(false); htmlMessageArea.setFont(new Font("Monaco", Font.PLAIN, 13)); htmlMessageArea.setMargin(new Insets(4, 4, 4, 4)); htmlMessageArea.setMinimumSize(new Dimension(360, 240)); htmlMessageArea.setPreferredSize(new Dimension(360, 240)); htmlMessageScrollPane.setViewportView(htmlMessageArea); } contentPanel.add(htmlMessageScrollPane, cc.xy(3, 3)); //---- closeButton ---- closeButton.setText("Close"); contentPanel.add(closeButton, cc.xywh(3, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } dialogPane.add(contentPanel, BorderLayout.CENTER); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.devdaily.justwrite.view.OpenRecentFileDialog.java
License:Open Source License
private void doLayoutForm() { FormLayout layout = new FormLayout("fill:pref, 3dlu, fill:80dlu:grow, 3dlu, left:pref", "pref, 6dlu, pref, 6dlu, pref"); JPanel panel = new JPanel(); DefaultFormBuilder builder = new DefaultFormBuilder(layout, panel); builder.setDefaultDialogBorder();/* w w w . j av a 2s . c om*/ CellConstraints cc = new CellConstraints(); builder.addSeparator("Recent Files", cc.xyw(1, 1, 5)); builder.add(scrollPane, cc.xyw(1, 3, 5)); builder.add(ButtonBarFactory.buildCenteredBar(cancelButton, okButton), cc.xy(3, 5, CellConstraints.CENTER, CellConstraints.DEFAULT)); //builder.add(okButton, cc.xy(3,5,CellConstraints.CENTER, CellConstraints.DEFAULT)); this.setContentPane(builder.getPanel()); }