13 |
|
|
14 |
import javax.swing.AbstractAction; |
import javax.swing.AbstractAction; |
15 |
import javax.swing.Action; |
import javax.swing.Action; |
16 |
|
import javax.swing.BorderFactory; |
17 |
import javax.swing.Box; |
import javax.swing.Box; |
18 |
import javax.swing.JButton; |
import javax.swing.JButton; |
19 |
import javax.swing.JComponent; |
import javax.swing.JComponent; |
23 |
import javax.swing.JRootPane; |
import javax.swing.JRootPane; |
24 |
import javax.swing.KeyStroke; |
import javax.swing.KeyStroke; |
25 |
|
|
26 |
|
import schmitzm.geotools.styling.StylingUtil; |
27 |
import schmitzm.lang.LangUtil; |
import schmitzm.lang.LangUtil; |
28 |
import schmitzm.lang.ResourceProvider; |
import schmitzm.lang.ResourceProvider; |
29 |
import schmitzm.swing.SwingUtil; |
import schmitzm.swing.SwingUtil; |
31 |
|
|
32 |
public class TranslationAskJDialog extends JDialog { |
public class TranslationAskJDialog extends JDialog { |
33 |
|
|
|
/** |
|
|
* {@link ResourceProvider}, der die Lokalisation fuer GUI-Komponenten des |
|
|
* Package {@code skrueger.swing} zur Verfuegung stellt. Diese sind in |
|
|
* properties-Datein unter {@code skrueger.swing.resource.locales} |
|
|
* hinterlegt. |
|
|
*/ |
|
|
public static ResourceProvider RESOURCE = new ResourceProvider(LangUtil |
|
|
.extendPackagePath(TranslationAskJDialog.class, |
|
|
"resource.locales.SwingResourceBundle"), Locale.ENGLISH); |
|
|
|
|
34 |
private String[] backup = new String[50]; // Maximum 50 languages ;-) |
private String[] backup = new String[50]; // Maximum 50 languages ;-) |
35 |
private OkButton okButton; |
private OkButton okButton; |
36 |
private CancelButton cancelButton; |
private CancelButton cancelButton; |
147 |
SwingUtil.centerFrameOnScreen(this); |
SwingUtil.centerFrameOnScreen(this); |
148 |
Box box = Box.createVerticalBox(); |
Box box = Box.createVerticalBox(); |
149 |
for (JComponent panel : translationEditJPanelsOrJustComponents) { |
for (JComponent panel : translationEditJPanelsOrJustComponents) { |
150 |
|
panel.setAlignmentX(java.awt.Component.LEFT_ALIGNMENT); |
151 |
|
panel.setBorder( BorderFactory.createEmptyBorder(5, 6, 5, 6)); |
152 |
box.add(panel); |
box.add(panel); |
153 |
|
|
154 |
} |
} |
155 |
JPanel cp = new JPanel(new BorderLayout()); |
JPanel cp = new JPanel(new BorderLayout()); |
156 |
cp.add(box, BorderLayout.CENTER); |
cp.add(box, BorderLayout.WEST); |
157 |
cp.add(getButtons(), BorderLayout.SOUTH); |
cp.add(getButtons(), BorderLayout.SOUTH); |
158 |
setContentPane(cp); |
setContentPane(cp); |
159 |
|
|
160 |
setTitle(RESOURCE.getString("translation_dialog_title")); // i8n |
setTitle(SwingUtil.R("TranslationAskJDialog.Title")); |
161 |
setModal(true); |
setModal(true); |
162 |
pack(); |
pack(); |
163 |
} |
} |
259 |
JOptionPane |
JOptionPane |
260 |
.showMessageDialog( |
.showMessageDialog( |
261 |
this, |
this, |
262 |
RESOURCE |
SwingUtil.R("TranslationAskJDialog.ErrorMsg.InvalidCharacterInTranslation")); |
|
.getString("ErrorMsg.InvalidCharacterInTranslation")); |
|
263 |
return false; |
return false; |
264 |
} |
} |
265 |
} |
} |