Go to the documentation of this file.
20 package net.sf.gridarta.gui.dialog.newmap;
22 import java.awt.Component;
23 import java.awt.FlowLayout;
24 import java.awt.GridBagConstraints;
26 import javax.swing.JPanel;
27 import javax.swing.JTextField;
28 import javax.swing.text.JTextComponent;
38 import net.
sf.japi.swing.action.ActionBuilder;
39 import net.
sf.japi.swing.action.ActionBuilderFactory;
40 import org.jetbrains.annotations.NotNull;
41 import org.jetbrains.annotations.Nullable;
58 private static final ActionBuilder
ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder(
"net.sf.gridarta");
105 final JPanel panel =
new JPanel(
new FlowLayout(FlowLayout.RIGHT));
118 protected void addFields(@NotNull
final JPanel panel, @NotNull
final GridBagConstraints gbcLabel, @NotNull
final GridBagConstraints gbcField) {
119 throw new AssertionError();
126 if (folderName ==
null) {
134 ACTION_BUILDER.showMessageDialog(
this,
"newPickmapFolderInvalidName", folderName);
139 final File folderDir = mapFolder.
getDir();
140 if (folderDir.exists()) {
141 ACTION_BUILDER.showMessageDialog(
this,
"newPickmapFolderExists", folderName);
145 if (!folderDir.mkdir()) {
146 ACTION_BUILDER.showMessageDialog(
this,
"mkdirIOError", folderDir);
154 ACTION_BUILDER.showMessageDialog(
this,
"newPickmapFolderExists", folderName);
176 return folderName.length() <= 0 ? null : folderName;
static final long serialVersionUID
JPanel createMapParametersPanel()
final JTextComponent folderNameField
final MapFolderTree< G, A, R > mapFolderTree
synchronized void addMapFolder(@NotNull final MapFolder< G, A, R > mapFolder)
final MapViewsManager< G, A, R > mapViewsManager
void addFields(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField)
static final ActionBuilder ACTION_BUILDER
static JLabel newLabel(@NotNull final ActionBuilder actionBuilder, @NotNull final String key)
synchronized void setActiveMapFolder(@NotNull final MapFolder< G, A, R > mapFolder)
void init1( @NotNull final Component parentComponent, @NotNull final String dialogTitle)
boolean isOkButtonEnabled()
static String getString(@NotNull final ActionBuilder actionBuilder, @NotNull final String key, @NotNull final String defaultValue)
final MapFolder< G, A, R > parent
NewPickmapFolderDialog(@NotNull final Component parentComponent, @NotNull final MapFolderTree< G, A, R > mapFolderTree, @Nullable final MapFolder< G, A, R > parent, @NotNull final MapViewsManager< G, A, R > mapViewsManager)
JPanel createMapNamePanel()
void addDocumentListener( @NotNull final JTextComponent textComponent)