Revision 25778 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/project/document/table/gui/FeatureTableDocumentPanel.java

View differences:

FeatureTableDocumentPanel.java
47 47
import com.iver.andami.ui.mdiManager.IWindowTransform;
48 48
import com.iver.andami.ui.mdiManager.SingletonWindow;
49 49
import com.iver.andami.ui.mdiManager.WindowInfo;
50
import javax.swing.JButton;
51
import java.awt.GridBagLayout;
50 52

  
51 53
/**
52 54
 * Feature table visualization panel.
......
55 57
 */
56 58
public class FeatureTableDocumentPanel extends FeatureTypesTablePanel implements
57 59
        SingletonWindow, IWindowTransform, Observer {
58
    // ,IWindowListener, IWindowTransform {
59

  
60
    private boolean showTypes=false;
60 61
    private static final long serialVersionUID = -1003263265311764630L;
61 62

  
62 63
    private static final int DEFAULT_HEIGHT = 200;
......
73 74

  
74 75
	private JLabel jLabel;
75 76

  
77
	private JButton bShowFeatureTypes = null;
78
	private JPanel jPanel1 = null;
79

  
76 80
    /**
77 81
     * @see FeatureTablePanel#FeatureTablePanel(FeatureStore)
78 82
     */
......
196 200
	                PluginServices.getText(this, "registros_seleccionados_total") +
197 201
	                ".");
198 202
				jPanel = new JPanel();
199
				FlowLayout flowLayout=new FlowLayout(FlowLayout.LEFT);
200
				jPanel.setLayout(flowLayout);
201
				jPanel.add(jLabel, null);
203
				BorderLayout borderLayout=new BorderLayout();
204
				jPanel.setLayout(borderLayout);
205
				jPanel.add(jLabel, BorderLayout.EAST);
206
				jPanel.add(getJPanel1(), BorderLayout.WEST);
202 207
			} catch (DataException e) {
203 208
				e.printStackTrace();
204 209
			}
......
208 213
	private void initialize(){
209 214
		add(getJPanel(),BorderLayout.SOUTH);
210 215
	}
216

  
217
	/**
218
	 * This method initializes bShowFeatureTypes
219
	 *
220
	 * @return javax.swing.JButton
221
	 */
222
	private JButton getBShowFeatureTypes() {
223
		if (bShowFeatureTypes == null) {
224
			bShowFeatureTypes = new JButton();
225
			bShowFeatureTypes.setText(PluginServices.getText(this,"show_types"));
226
			bShowFeatureTypes.addActionListener(new java.awt.event.ActionListener() {
227
				public void actionPerformed(java.awt.event.ActionEvent e) {
228
					showTypes=!showTypes;
229
					if (showTypes){
230
						bShowFeatureTypes.setText(PluginServices.getText(this,"hide_types"));
231
						showTypes();
232
					}else{
233
						bShowFeatureTypes.setText(PluginServices.getText(this,"show_types"));
234
						hideTypes();
235
					}
236
				}
237
			});
238
		}
239
		return bShowFeatureTypes;
240
	}
241

  
242
	/**
243
	 * This method initializes jPanel1
244
	 *
245
	 * @return javax.swing.JPanel
246
	 */
247
	private JPanel getJPanel1() {
248
		if (jPanel1 == null) {
249
			jPanel1 = new JPanel();
250
			jPanel1.setLayout(new GridBagLayout());
251
			jPanel1.add(getBShowFeatureTypes(), null);
252
		}
253
		return jPanel1;
254
	}
211 255
}

Also available in: Unified diff