Revision 1439
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/windowmanager/DefaultDialog.java | ||
---|---|---|
5 | 5 |
import java.awt.event.ActionEvent; |
6 | 6 |
import java.awt.event.ActionListener; |
7 | 7 |
import javax.swing.JComponent; |
8 |
import org.gvsig.tools.ToolsLocator; |
|
9 |
import org.gvsig.tools.i18n.I18nManager; |
|
8 | 10 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
9 | 11 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
10 | 12 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
... | ... | |
28 | 30 |
protected DefaultActionListenerSupport listeners; |
29 | 31 |
protected Image icon = null; |
30 | 32 |
protected Image image = null; |
33 |
private WindowManager windowManager = null; |
|
31 | 34 |
|
32 | 35 |
public DefaultDialog(JComponent contents, String title, String header, int buttons) { |
33 | 36 |
this.contents = contents; |
... | ... | |
40 | 43 |
this.setHeaderLabel(header); |
41 | 44 |
} |
42 | 45 |
|
46 |
public void setWindowManager(WindowManager windowManager) { |
|
47 |
this.windowManager = windowManager; |
|
48 |
} |
|
49 |
|
|
43 | 50 |
private void initComponents() { |
51 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
52 |
this.btnAccept.setText(i18nManager.getTranslation("Accept")); |
|
53 |
this.btnCancel.setText(i18nManager.getTranslation("Cancel")); |
|
54 |
this.btnApply.setText(i18nManager.getTranslation("Apply")); |
|
55 |
|
|
44 | 56 |
this.pnlContents.setLayout(new BorderLayout()); |
45 | 57 |
this.pnlContents.add(this.contents, BorderLayout.CENTER); |
46 | 58 |
|
... | ... | |
131 | 143 |
} |
132 | 144 |
|
133 | 145 |
protected WindowManager getWindowManager() { |
134 |
return ToolsSwingLocator.getWindowManager(); |
|
146 |
if( this.windowManager == null ) { |
|
147 |
this.windowManager = ToolsSwingLocator.getWindowManager(); |
|
148 |
} |
|
149 |
return this.windowManager; |
|
135 | 150 |
} |
136 | 151 |
|
137 | 152 |
@Override |
Also available in: Unified diff