25 |
* |
* |
26 |
* Contributors: |
* Contributors: |
27 |
* Martin O. J. Schmitz - initial API and implementation |
* Martin O. J. Schmitz - initial API and implementation |
28 |
* Stefan A. Krüger - additional utility classes |
* Stefan A. Tzeggai - additional utility classes |
29 |
******************************************************************************/ |
******************************************************************************/ |
30 |
package skrueger.i8n; |
package skrueger.i8n; |
31 |
|
|
62 |
public class SwitchLanguageDialog extends JDialog { |
public class SwitchLanguageDialog extends JDialog { |
63 |
protected Logger LOGGER = Logger.getLogger(SwitchLanguageDialog.class); |
protected Logger LOGGER = Logger.getLogger(SwitchLanguageDialog.class); |
64 |
|
|
|
private static final long serialVersionUID = 1L; |
|
|
|
|
65 |
private JPanel jContentPane = null; |
private JPanel jContentPane = null; |
66 |
|
|
67 |
private JLabel jLabelFlagimage = null; |
private JLabel jLabelFlagimage = null; |
82 |
* A dialog to select one of the available languages. If only one language |
* A dialog to select one of the available languages. If only one language |
83 |
* is available, select it directly. Creating this object automatically |
* is available, select it directly. Creating this object automatically |
84 |
* makes it visible, unless there is only one language to choose from.. it |
* makes it visible, unless there is only one language to choose from.. it |
85 |
* that case it disposes itself autmatically. |
* that case it disposes itself automatically. |
86 |
*/ |
*/ |
87 |
public SwitchLanguageDialog(final Component owner, |
public SwitchLanguageDialog(final Component owner, |
88 |
final List<String> languages) { |
final List<String> languages) { |
94 |
if (languages.size() == 1) { |
if (languages.size() == 1) { |
95 |
LOGGER.debug("Only language '" + languages.get(0) |
LOGGER.debug("Only language '" + languages.get(0) |
96 |
+ "' is available. It has been selected automatically."); |
+ "' is available. It has been selected automatically."); |
97 |
// dispose(); |
// dispose(); |
98 |
setModal(false); |
setModal(false); |
99 |
return; |
return; |
100 |
} |
} |