Messages.getString("ExportAtlasAction.LABEL_ATLAS_NAME")); //$NON-NLS-1$
JTextField atlasProstfixText = new JTextField(atlasPostfix, 10);
// ---------------------------------------------------
ImageWriterFormatModel atlasFormatModel = new ImageWriterFormatModel(
atlasFormat);
JLabel atlasFormatLabel = new JLabel(
Messages.getString("ExportAtlasAction.LABEL_ATLAS_FORMAT")); //$NON-NLS-1$
JComboBox atlasFormatBox = new JComboBox(atlasFormatModel);
// ---------------------------------------------------
JLabel descriptionLabel = new JLabel(
Messages.getString("ExportAtlasAction.LABEL_DESCRIPTION_FILENAME")); //$NON-NLS-1$
JTextField descriptionPrefixText = new JTextField(descriptionPrefix, 10);
JLabel descriptionFileLabel = new JLabel(
Messages.getString("ExportAtlasAction.LABEL_NAME_LABEL")); //$NON-NLS-1$
JTextField descriptionProstfixText = new JTextField(descriptionPostfix,
10);
// ---------------------------------------------------
JLabel descHeaderLabel = new JLabel(
Messages.getString("ExportAtlasAction.LABEL_DESCRIPTION_HEADER")); //$NON-NLS-1$
JTextArea descHeaderText = new JTextArea(descriptionHeader, 2, 20);
JScrollPane descHeaderScroll = new JScrollPane(descHeaderText);
descHeaderText.setLineWrap(true);
descHeaderText.setWrapStyleWord(true);
descHeaderScroll
.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
// ---------------------------------------------------
JLabel descFormatLabel = new JLabel(
Messages.getString("ExportAtlasAction.LABEL_DESCRIPTION_FORMAT")); //$NON-NLS-1$
JTextArea descFormatText = new JTextArea(descriptionFormat, 5, 20);
JScrollPane descFormatScroll = new JScrollPane(descFormatText);
descFormatText.setLineWrap(true);
descFormatText.setWrapStyleWord(true);
descFormatScroll
.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
// ---------------------------------------------------
JLabel descFooterLabel = new JLabel(
Messages.getString("ExportAtlasAction.LABEL_DESCRIPTION_FOOTER")); //$NON-NLS-1$
JTextArea descFooterText = new JTextArea(descriptionFooter, 2, 20);
JScrollPane descFooterScroll = new JScrollPane(descFooterText);
descFooterText.setLineWrap(true);
descFooterText.setWrapStyleWord(true);
descFooterScroll
.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
// ---------------------------------------------------
JCheckBox descJoinBox = new JCheckBox(
Messages.getString("ExportAtlasAction.CHECKBOX_JOIN_DESCRIPTION"), descriptionJoin); //$NON-NLS-1$
// ---------------------------------------------------
JPanel panel = new JPanel();
GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
layout.setHorizontalGroup(layout
.createParallelGroup(Alignment.TRAILING, false)
.addGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(
Alignment.TRAILING, false)
.addComponent(atlasLabel)
.addComponent(atlasFormatLabel)
.addComponent(descriptionLabel))
.addGroup(
layout.createParallelGroup(
Alignment.LEADING, false)
.addGroup(
layout.createSequentialGroup()
.addComponent(
atlasPrefixText)
.addComponent(
atlasFileLabel)
.addComponent(
atlasProstfixText))
.addComponent(atlasFormatBox)
.addGroup(
layout.createSequentialGroup()
.addComponent(
descriptionPrefixText)
.addComponent(
descriptionFileLabel)
.addComponent(
descriptionProstfixText))
.addComponent(descJoinBox)))
.addGroup(
layout.createParallelGroup()
.addComponent(descHeaderLabel)
.addComponent(descHeaderScroll))
.addGroup(
layout.createParallelGroup()
.addComponent(descFormatLabel)
.addComponent(descFormatScroll))
.addGroup(
layout.createParallelGroup()
.addComponent(descFooterLabel)
.addComponent(descFooterScroll)));
layout.setVerticalGroup(layout
.createSequentialGroup()
.addGroup(
layout.createParallelGroup(Alignment.BASELINE)
.addComponent(atlasLabel)
.addComponent(atlasPrefixText)
.addComponent(atlasFileLabel)
.addComponent(atlasProstfixText))
.addGroup(
layout.createParallelGroup(Alignment.BASELINE)
.addComponent(atlasFormatLabel)
.addComponent(atlasFormatBox))
.addGroup(
layout.createParallelGroup(Alignment.BASELINE)
.addComponent(descriptionLabel)
.addComponent(descriptionPrefixText)
.addComponent(descriptionFileLabel)
.addComponent(descriptionProstfixText))
.addComponent(descHeaderLabel).addComponent(descHeaderScroll)
.addComponent(descFormatLabel).addComponent(descFormatScroll)
.addComponent(descFooterLabel).addComponent(descFooterScroll)
.addComponent(descJoinBox));
layout.linkSize(SwingConstants.HORIZONTAL, atlasPrefixText,
atlasProstfixText);
int result = JOptionPane.showConfirmDialog(parent, panel,
Messages.getString("ExportAtlasAction.TITLE"), //$NON-NLS-1$
JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE);
if (result == JOptionPane.YES_OPTION) {
atlasPrefix = atlasPrefixText.getText();
atlasPostfix = atlasProstfixText.getText();
atlasFormat = atlasFormatModel.getSelectedFormat();
descriptionPrefix = descriptionPrefixText.getText();
descriptionPostfix = descriptionProstfixText.getText();
descriptionHeader = descHeaderText.getText();
descriptionFormat = descFormatText.getText();