Revision 1405 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
DefaultDialog.java | ||
---|---|---|
16 | 16 |
|
17 | 17 |
public class DefaultDialog extends DefaultDialogView implements Dialog { |
18 | 18 |
|
19 |
private JComponent contents; |
|
20 |
private String header1; |
|
21 |
private String header2; |
|
22 |
private String title; |
|
19 |
private static final long serialVersionUID = -8823659108133528353L; |
|
23 | 20 |
|
24 |
private int buttons; |
|
25 |
private int action; |
|
26 |
private DefaultActionListenerSupport listeners; |
|
27 |
private Image icon = null; |
|
28 |
private Image image = null; |
|
21 |
protected JComponent contents; |
|
22 |
protected String header1; |
|
23 |
protected String header2; |
|
24 |
protected String title; |
|
29 | 25 |
|
26 |
protected int buttons; |
|
27 |
protected int action; |
|
28 |
protected DefaultActionListenerSupport listeners; |
|
29 |
protected Image icon = null; |
|
30 |
protected Image image = null; |
|
31 |
|
|
30 | 32 |
public DefaultDialog(JComponent contents, String title, String header, int buttons) { |
31 | 33 |
this.contents = contents; |
32 | 34 |
this.title = title; |
... | ... | |
67 | 69 |
}); |
68 | 70 |
} |
69 | 71 |
|
72 |
@Override |
|
70 | 73 |
public void setHeaderTitle(String header) { |
71 | 74 |
this.header1 = header; |
72 |
if( this.header1==null ) {
|
|
75 |
if (this.header1 == null) {
|
|
73 | 76 |
this.lblHeader1.setText(""); |
74 | 77 |
this.lblHeader1.setVisible(false); |
75 | 78 |
} else { |
... | ... | |
78 | 81 |
} |
79 | 82 |
} |
80 | 83 |
|
84 |
@Override |
|
81 | 85 |
public void setHeaderLabel(String header) { |
82 | 86 |
this.header2 = header; |
83 |
if( this.header1==null ) {
|
|
87 |
if (this.header2 == null) {
|
|
84 | 88 |
this.lblHeader2.setText(""); |
85 | 89 |
this.lblHeader2.setVisible(false); |
86 | 90 |
} else { |
... | ... | |
126 | 130 |
this.listeners.fireActionEvent(event); |
127 | 131 |
} |
128 | 132 |
|
133 |
protected WindowManager getWindowManager() { |
|
134 |
return ToolsSwingLocator.getWindowManager(); |
|
135 |
} |
|
136 |
|
|
129 | 137 |
@Override |
130 | 138 |
public void show(WindowManager.MODE mode) { |
131 |
if( this.image == null ) { |
|
132 |
this.imgHeader.setVisible(false); |
|
133 |
} |
|
134 |
WindowManager winmgr = ToolsSwingLocator.getWindowManager(); |
|
139 |
WindowManager winmgr = this.getWindowManager(); |
|
135 | 140 |
if (icon != null && winmgr instanceof WindowManager_v2) { |
136 | 141 |
((WindowManager_v2) winmgr).showWindow(this, title, mode, icon); |
137 | 142 |
} else { |
Also available in: Unified diff