Revision 15268

View differences:

import/ext3D/trunk/ext3D/src/com/iver/ai2/gvsig3d/gui/VectorLayerMenu.java
47 47
import java.awt.GridBagConstraints;
48 48
import java.awt.GridBagLayout;
49 49
import java.awt.Insets;
50
import java.awt.Rectangle;
50 51
import java.awt.event.ActionEvent;
51 52
import java.awt.event.ItemEvent;
52 53
import java.awt.event.ItemListener;
......
54 55
import java.awt.event.MouseListener;
55 56

  
56 57
import javax.swing.JDialog;
58
import javax.swing.JFrame;
59
import javax.swing.JLabel;
57 60
import javax.swing.JPanel;
58 61
import javax.swing.JTextField;
59
import javax.swing.SpringLayout;
60 62

  
61 63
import org.gvsig.gui.beans.swing.JButton;
62 64

  
63 65
import com.iver.ai2.gvsig3d.map3d.layers.Layer3DProps;
64 66
import com.iver.andami.PluginServices;
65 67

  
66
import javax.swing.JCheckBox;
67

  
68 68
/**
69 69
 * Dialogo donde se muestran las propiedades de una vista
70 70
 * 
......
93 93

  
94 94
	private JButton boton;
95 95

  
96
	private JLabel jLabel1;
97

  
96 98
	/**
97 99
	 * This is the default constructor
98 100
	 * 
......
120 122
		// Dimension of the panel only for java 1.5
121 123
//		this.setPreferredSize(new Dimension(width, height));
122 124
		
123
		this.setLocation(300, 300);
124
		
125
		BorderLayout bo = new BorderLayout();
126
		
127
//		bo.setVgap(BorderLayout.CENTER);
125
		JFrame a = (JFrame)PluginServices.getMainFrame();
126
		double posX = a.getBounds().getCenterX();
127
		double posY =a.getBounds().getCenterY();
128
		this.setLocation(((int)posX) - (width/2) , ((int)posY) - (height/2));
128 129
		panel = new JPanel();	
129 130
		this.getContentPane().add((Component) panel,BorderLayout.CENTER);
130 131

  
......
139 140
		GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
140 141
		gridBagConstraints3.gridx = 0;
141 142
		gridBagConstraints3.insets = new Insets(12, 0, 0, 0);
142
		gridBagConstraints3.gridy = 3;
143
		gridBagConstraints3.gridy = 4;
143 144
		GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
144 145
		gridBagConstraints2.fill = GridBagConstraints.VERTICAL;
145
		gridBagConstraints2.gridy = 2;
146
		gridBagConstraints2.gridy = 3;
146 147
		gridBagConstraints2.weightx = 1.0;
147 148
		gridBagConstraints2.gridwidth = 1;
148 149
		gridBagConstraints2.ipadx = 93;
......
154 155
		gridBagConstraints1.anchor = GridBagConstraints.WEST;
155 156
		gridBagConstraints1.fill = GridBagConstraints.VERTICAL;
156 157
		gridBagConstraints1.gridy = 1;
158
		
159
		GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
160
		gridBagConstraints4.gridx = 0;
161
		gridBagConstraints4.insets = new Insets(0, 25, 0, 0);
162
		gridBagConstraints4.anchor = GridBagConstraints.WEST;
163
		gridBagConstraints4.fill = GridBagConstraints.VERTICAL;
164
		gridBagConstraints4.gridy = 2;
165
		
157 166
		jContentPane = new JPanel();
158 167
		jContentPane.setLayout(new GridBagLayout());
159 168
		jContentPane.add(getJCheckBox1(), gridBagConstraints1);
169
		jLabel1 = new JLabel("Altura en metros:");
170
		jLabel1.setEnabled(false);
171
		jContentPane.add(jLabel1, gridBagConstraints4);
160 172
		jContentPane.add(getJTextField(), gridBagConstraints2);
161 173
		jContentPane.add(getJButton(), gridBagConstraints3);
162 174
		jContentPane.add(getJCheckBox(), gridBagConstraints);
......
218 230
		return aButton;
219 231
	}
220 232
	
233
	private Checkbox getJLabel() {
234
		if (jLabel1 == null) {
235
			jLabel1 = new JLabel();
236
			jLabel1.setText("Altura en metros:");
237
		}
238
		return aButton;
239
	}
240
	
221 241
	public void itemStateChanged(ItemEvent arg0) {
222 242

  
223 243
		bButton.setEnabled(!aButton.getState());
224 244
		aButton.setEnabled(!bButton.getState());
225 245
		heigthField.setEnabled(!aButton.getState());
226 246
		heigthField.setEnabled(!(bButton.getState() || aButton.getState()));
227

  
247
		
248
		jLabel1.setEnabled(!aButton.getState());
249
		jLabel1.setEnabled(!(bButton.getState() || aButton.getState()));
250
		
228 251
	}
229 252

  
230 253
	public void actionPerformed(ActionEvent e) {
......
274 297
	}
275 298

  
276 299
	/**
277
	 * This method initializes jDialog	
278
	 * 	
279
	 * @return javax.swing.JDialog	
280
	 */
281
	private JDialog getJDialog() {
282
		if (jDialog == null) {
283
			jDialog = new JDialog(this);
284
			jDialog.setSize(new Dimension(288, 144));
285
			jDialog.setContentPane(getJContentPane());
286
		}
287
		return jDialog;
288
	}
289

  
290
	/**
291 300
	 * This method initializes jContentPane	
292 301
	 * 	
293 302
	 * @return javax.swing.JPanel	

Also available in: Unified diff