Revision 10786 branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java
MainPanel.java | ||
---|---|---|
9 | 9 |
import javax.swing.JButton; |
10 | 10 |
import javax.swing.JPanel; |
11 | 11 |
|
12 |
import com.iver.andami.PluginServices; |
|
13 |
import com.iver.andami.ui.mdiManager.IWindow; |
|
14 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
|
12 | 15 |
|
16 |
|
|
13 | 17 |
/** |
14 | 18 |
* |
15 | 19 |
* @author Luisa Marina Fern?ndez (luisam.fernandez@uclm.es) |
16 | 20 |
* |
17 | 21 |
*/ |
18 |
public class MainPanel extends JPanel implements ActionListener { |
|
22 |
public class MainPanel extends JPanel implements ActionListener,IWindow {
|
|
19 | 23 |
|
20 | 24 |
private static final long serialVersionUID = 1L; |
21 | 25 |
private JPanel pCard; |
... | ... | |
126 | 130 |
pSouth.add(getBtnSiguiente()); |
127 | 131 |
pSouth.add(getBtnFinalizar()); |
128 | 132 |
getBtnFinalizar().setVisible(false); |
133 |
getBtnAnterior().setVisible(false); |
|
129 | 134 |
} |
130 | 135 |
return pSouth; |
131 | 136 |
} |
... | ... | |
154 | 159 |
if(e.getSource().equals(getBtnAnterior())){ |
155 | 160 |
|
156 | 161 |
if(getPCrsUsr().isShowing()){ |
157 |
//Se est? mostrando el primer panel del Wizard |
|
162 |
//Se est? mostrando el primer panel del Wizard |
|
163 |
|
|
158 | 164 |
}else{ |
159 | 165 |
//Mostrar el panel anterior |
160 | 166 |
cl.previous(pCard); |
161 | 167 |
//Establecer los botones del Wizard |
162 | 168 |
getBtnFinalizar().setVisible(false); |
163 | 169 |
getBtnSiguiente().setVisible(true); |
170 |
|
|
164 | 171 |
System.out.println("Dentro de botonAnterior"); |
165 | 172 |
} |
166 | 173 |
}else if(e.getSource().equals(getBtnSiguiente())){ |
167 | 174 |
cl.next(pCard); |
175 |
getBtnAnterior().setVisible(true); |
|
168 | 176 |
//Si aparece el ultimo panel visualizar el bot?n finalizar |
169 | 177 |
if (getPSistCoord().isShowing()){ |
170 | 178 |
getBtnFinalizar().setVisible(true); |
171 | 179 |
getBtnSiguiente().setVisible(false); |
180 |
getBtnAnterior().setVisible(true); |
|
172 | 181 |
} |
173 | 182 |
}else if(e.getSource().equals(getBtnFinalizar())){ |
174 | 183 |
//Realizar las acciones de fin del Wizard |
175 | 184 |
System.out.println("Finalizar el Asistente"); |
176 | 185 |
System.out.println("Cerrar el Asistente"); |
177 |
System.exit(0);
|
|
186 |
PluginServices.getMDIManager().closeWindow(this);
|
|
178 | 187 |
|
179 | 188 |
}else if(e.getSource().equals(getBtnCancelar())){ |
180 | 189 |
//Cerrar el asistente |
181 |
System.exit(0);
|
|
190 |
PluginServices.getMDIManager().closeWindow(this);
|
|
182 | 191 |
} |
183 | 192 |
} |
193 |
public WindowInfo getWindowInfo() { |
|
194 |
WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG); |
|
195 |
//TODO poner clave con plugin Services |
|
196 |
m_viewinfo.setTitle(PluginServices.getText(this,"definicion de nuevo crs por el usuario")); |
|
197 |
m_viewinfo.setWidth(444); |
|
198 |
//m_viewinfo.setHeight(425); |
|
199 |
m_viewinfo.setHeight(390); |
|
200 |
return m_viewinfo; |
|
201 |
} |
|
184 | 202 |
|
185 | 203 |
|
186 | 204 |
} |
Also available in: Unified diff