panel.add(txtComments, constraints);
constraints.gridwidth = 1;
constraints.gridy++;
// Maximum number of backlinks
txtMaxMain = new JFormattedTextField(NumberFormat.getIntegerInstance());
txtMaxMain.setFocusLostBehavior(JFormattedTextField.COMMIT);
txtMaxMain.setColumns(4);
if ((page != null) &&
(page.getComment() != null) &&
(page.getComment().getMaxMainArticles() != null)) {
txtMaxMain.setValue(page.getComment().getMaxMainArticles());
}
JLabel labelMaxMain = Utilities.createJLabel(GT._("Max backlinks in Main :"));
labelMaxMain.setLabelFor(txtMaxMain);
labelMaxMain.setHorizontalAlignment(SwingConstants.TRAILING);
countMain = (page != null) ? page.getBacklinksCountInMainNamespace() : null;
JLabel labelMain = new JLabel((countMain != null) ? "/ " + countMain.toString() : "");
labelMain.setHorizontalAlignment(SwingConstants.LEADING);
buttonCopyMaxMain = Utilities.createJButton("\u21D0", null);
buttonCopyMaxMain.addActionListener(EventHandler.create(
ActionListener.class, this, "actionCopyMain"));
buttonCopyMaxMain.setEnabled(countMain != null);
constraints.gridx = 0;
constraints.weightx = 0;
panel.add(labelMaxMain, constraints);
constraints.gridx++;
constraints.weightx = 0;
panel.add(txtMaxMain, constraints);
constraints.gridx++;
constraints.weightx = 0;
panel.add(buttonCopyMaxMain, constraints);
constraints.gridx++;
constraints.weightx = 1;
panel.add(labelMain, constraints);
constraints.gridy++;
txtMaxTemplate = new JFormattedTextField(NumberFormat.getIntegerInstance());
txtMaxTemplate.setFocusLostBehavior(JFormattedTextField.COMMIT);
txtMaxTemplate.setColumns(4);
if ((page != null) &&
(page.getComment() != null) &&
(page.getComment().getMaxTemplateArticles() != null)) {
txtMaxTemplate.setValue(page.getComment().getMaxTemplateArticles());
}
JLabel labelMaxTemplate = Utilities.createJLabel(GT._("Max backlinks in Template :"));
labelMaxTemplate.setLabelFor(txtMaxTemplate);
labelMaxTemplate.setHorizontalAlignment(SwingConstants.TRAILING);
countTemplate = (page != null) ? page.getBacklinksCountInTemplateNamespace() : null;
JLabel labelTemplate = new JLabel((countTemplate != null) ? "/ " + countTemplate.toString() : "");
labelTemplate.setHorizontalAlignment(SwingConstants.LEADING);
buttonCopyMaxTemplate = Utilities.createJButton("\u21D0", null);
buttonCopyMaxTemplate.addActionListener(EventHandler.create(
ActionListener.class, this, "actionCopyTemplate"));
buttonCopyMaxTemplate.setEnabled(countTemplate != null);
constraints.gridx = 0;
constraints.weightx = 0;
panel.add(labelMaxTemplate, constraints);
constraints.gridx++;
constraints.weightx = 0;
panel.add(txtMaxTemplate, constraints);
constraints.gridx++;
constraints.weightx = 0;
panel.add(buttonCopyMaxTemplate, constraints);
constraints.gridx++;
constraints.weightx = 1;
panel.add(labelTemplate, constraints);
constraints.gridy++;
txtMaxOther = new JFormattedTextField(NumberFormat.getIntegerInstance());
txtMaxOther.setFocusLostBehavior(JFormattedTextField.COMMIT);
txtMaxOther.setColumns(4);
if ((page != null) &&
(page.getComment() != null) &&
(page.getComment().getMaxOtherArticles() != null)) {