{
final JLabel lblEncoding = new JLabel(getResources().getString("pdfsavedialog.encoding")); //$NON-NLS-1$
final JPanel encodingPanel = new JPanel();
encodingPanel.setBorder(BorderFactory.createTitledBorder(getResources().getString("pdfsavedialog.export-options")));
encodingPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.anchor = GridBagConstraints.WEST;
gbc.gridx = 0;
gbc.gridy = 0;
gbc.insets = new Insets(1, 1, 1, 1);
encodingPanel.add(lblEncoding, gbc);
gbc = new GridBagConstraints();
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1;
gbc.gridx = 1;
gbc.gridy = 0;
gbc.ipadx = 80;
gbc.insets = new Insets(1, 1, 1, 1);
encodingPanel.add(cbEncoding, gbc);
gbc = new GridBagConstraints();
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1;
gbc.gridx = 1;
gbc.gridy = 1;
gbc.ipadx = 80;
gbc.insets = new Insets(1, 1, 1, 1);
encodingPanel.add(cxEmbedded, gbc);
final JPanel securityPanel = new JPanel();
securityPanel.setLayout(new GridBagLayout());
securityPanel.setBorder(BorderFactory.createTitledBorder(getResources().getString("pdfsavedialog.security")));
final JLabel lblUserPass = new JLabel(getResources().getString("pdfsavedialog.userpassword")); //$NON-NLS-1$
final JLabel lblUserPassConfirm =
new JLabel(getResources().getString("pdfsavedialog.userpasswordconfirm")); //$NON-NLS-1$
final JLabel lblOwnerPass =
new JLabel(getResources().getString("pdfsavedialog.ownerpassword")); //$NON-NLS-1$
final JLabel lblOwnerPassConfirm =
new JLabel(getResources().getString("pdfsavedialog.ownerpasswordconfirm")); //$NON-NLS-1$
final JLabel lbAllowPrinting =
new JLabel(getResources().getString("pdfsavedialog.allowPrinting")); //$NON-NLS-1$
gbc = new GridBagConstraints();
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1;
gbc.gridx = 0;
gbc.gridwidth = 4;
gbc.gridy = 1;
gbc.insets = new Insets(5, 5, 5, 5);
securityPanel.add(createSecurityConfigPanel(), gbc);
gbc = new GridBagConstraints();
gbc.anchor = GridBagConstraints.WEST;
gbc.gridx = 0;
gbc.gridy = 2;
gbc.insets = new Insets(5, 5, 5, 5);
securityPanel.add(lblUserPass, gbc);
gbc = new GridBagConstraints();
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1;
gbc.gridx = 1;
gbc.gridy = 2;
gbc.ipadx = 120;
gbc.insets = new Insets(5, 5, 5, 5);
securityPanel.add(txUserPassword, gbc);
gbc = new GridBagConstraints();
gbc.anchor = GridBagConstraints.WEST;
gbc.gridx = 0;
gbc.gridy = 3;
gbc.insets = new Insets(5, 5, 5, 5);
securityPanel.add(lblOwnerPass, gbc);
gbc = new GridBagConstraints();
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1;
gbc.gridx = 1;
gbc.gridy = 3;
gbc.ipadx = 80;
gbc.insets = new Insets(5, 5, 5, 5);
securityPanel.add(txOwnerPassword, gbc);
gbc = new GridBagConstraints();
gbc.anchor = GridBagConstraints.WEST;
gbc.gridx = 2;
gbc.gridy = 2;
gbc.insets = new Insets(5, 5, 5, 5);
securityPanel.add(lblUserPassConfirm, gbc);
gbc = new GridBagConstraints();
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1;
gbc.gridx = 3;
gbc.gridy = 2;
gbc.ipadx = 80;
gbc.insets = new Insets(5, 5, 5, 5);
securityPanel.add(txConfUserPassword, gbc);
gbc = new GridBagConstraints();
gbc.anchor = GridBagConstraints.WEST;
gbc.gridx = 2;
gbc.gridy = 3;
gbc.insets = new Insets(5, 5, 5, 5);
securityPanel.add(lblOwnerPassConfirm, gbc);
gbc = new GridBagConstraints();
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1;
gbc.gridx = 3;
gbc.gridy = 3;
gbc.ipadx = 80;
gbc.insets = new Insets(5, 5, 5, 5);
securityPanel.add(txConfOwnerPassword, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridwidth = 2;
gbc.gridy = 4;
gbc.anchor = GridBagConstraints.WEST;
securityPanel.add(cxAllowCopy, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridwidth = 2;
gbc.gridy = 5;
gbc.anchor = GridBagConstraints.WEST;
securityPanel.add(cxAllowScreenReaders, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridwidth = 2;
gbc.gridy = 6;
gbc.anchor = GridBagConstraints.WEST;
securityPanel.add(cxAllowFillIn, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 2;
gbc.gridwidth = 2;
gbc.gridy = 4;
gbc.anchor = GridBagConstraints.WEST;
securityPanel.add(cxAllowAssembly, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 2;
gbc.gridwidth = 2;
gbc.gridy = 5;
gbc.anchor = GridBagConstraints.WEST;
securityPanel.add(cxAllowModifyContents, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 2;
gbc.gridwidth = 2;
gbc.gridy = 6;
gbc.anchor = GridBagConstraints.WEST;
securityPanel.add(cxAllowModifyAnnotations, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridwidth = 1;
gbc.gridy = 7;
gbc.anchor = GridBagConstraints.WEST;
securityPanel.add(lbAllowPrinting, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridwidth = 3;
gbc.gridy = 7;
gbc.anchor = GridBagConstraints.WEST;
securityPanel.add(cbAllowPrinting, gbc);
final JPanel advancedCarrier2 = new JPanel();
advancedCarrier2.setLayout(new GridBagLayout());
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.gridwidth = 1;
gbc.gridy = 0;
gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(1, 1, 5, 1);
advancedCarrier2.add(encodingPanel, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.gridwidth = 1;
gbc.gridy = 1;
gbc.anchor = GridBagConstraints.WEST;