Revision 15265
import/ext3D/trunk/ext3D/src/com/iver/ai2/gvsig3d/gui/TransparencyPanel.java | ||
---|---|---|
41 | 41 |
package com.iver.ai2.gvsig3d.gui; |
42 | 42 |
|
43 | 43 |
import java.awt.Dimension; |
44 |
import java.awt.GridBagConstraints; |
|
45 |
import java.awt.GridBagLayout; |
|
44 | 46 |
import java.awt.Insets; |
45 | 47 |
import java.awt.event.ActionListener; |
46 | 48 |
import java.util.Dictionary; |
... | ... | |
48 | 50 |
|
49 | 51 |
import javax.swing.BorderFactory; |
50 | 52 |
import javax.swing.JLabel; |
53 |
import javax.swing.JPanel; |
|
51 | 54 |
import javax.swing.JSlider; |
52 | 55 |
import javax.swing.event.ChangeEvent; |
53 | 56 |
import javax.swing.event.ChangeListener; |
... | ... | |
74 | 77 |
|
75 | 78 |
private ProjectView3D view3D; |
76 | 79 |
|
77 |
private int width = 304;
|
|
80 |
private int width = 250;
|
|
78 | 81 |
|
79 |
private int height = 120;
|
|
82 |
private int height = 100;
|
|
80 | 83 |
|
81 | 84 |
private GridBagLayoutPanel okCancelPanel; |
82 | 85 |
|
... | ... | |
157 | 160 |
* This method initializes this |
158 | 161 |
*/ |
159 | 162 |
private void initialize() { |
163 |
|
|
164 |
GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); |
|
165 |
gridBagConstraints1.fill = GridBagConstraints.VERTICAL; |
|
166 |
gridBagConstraints1.gridy = 2; |
|
167 |
gridBagConstraints1.weightx = 1.0; |
|
168 |
gridBagConstraints1.gridx = 1; |
|
169 |
GridBagConstraints gridBagConstraints = new GridBagConstraints(); |
|
170 |
gridBagConstraints.gridx = 1; |
|
171 |
gridBagConstraints.gridheight = 2; |
|
172 |
gridBagConstraints.gridwidth = 2; |
|
173 |
gridBagConstraints.insets = new Insets(15, 0, 0, 0); |
|
174 |
gridBagConstraints.gridy = 3; |
|
175 |
|
|
176 |
this.add(getSliderTrans(),gridBagConstraints1); |
|
177 |
this.add(getOkCancelPanel(),gridBagConstraints); |
|
178 |
// jContentPane = new JPanel(); |
|
179 |
// jContentPane.setLayout(new GridBagLayout()); |
|
180 |
// jContentPane.add(getJButton(), gridBagConstraints); |
|
181 |
// jContentPane.add(getJSlider(), gridBagConstraints1); |
|
182 |
|
|
183 |
|
|
184 |
|
|
160 | 185 |
// Inicialize component |
161 | 186 |
setName(PluginServices.getText(this, "Transparency")); |
162 | 187 |
// Introducing the margin |
163 |
setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); |
|
188 |
// setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6));
|
|
164 | 189 |
// Dimension of the panel |
165 | 190 |
// setSize(new Dimension(width, height)); |
166 | 191 |
this.setPreferredSize(new Dimension(width, height)); |
192 |
this.setSize(new Dimension(width, height)); |
|
167 | 193 |
|
168 | 194 |
// ADDING COMPONENTS |
169 | 195 |
|
170 |
this.addComponent(getSliderTrans(), new Insets(2, 5, 2, 5)); |
|
196 |
// this.addComponent(getSliderTrans(), new Insets(2, 5, 2, 5)); |
|
197 |
// |
|
198 |
// // Accept buton |
|
199 |
// this.addComponent(getOkCancelPanel(), new Insets(2, 5, 2, 5)); |
|
171 | 200 |
|
172 |
// Accept buton |
|
173 |
this.addComponent(getOkCancelPanel(), new Insets(2, 5, 2, 5)); |
|
174 |
|
|
175 | 201 |
// Launching slider update |
176 | 202 |
// Create the object with the run() method |
177 | 203 |
runnable = new SliderUpdate(); |
... | ... | |
191 | 217 |
// Create the label table |
192 | 218 |
Dictionary labelTable = new Hashtable(); |
193 | 219 |
labelTable.put(new Integer(50), new JLabel("Transparente")); |
194 |
labelTable.put(new Integer(200), new JLabel("Opaco"));
|
|
220 |
labelTable.put(new Integer(215), new JLabel("Opaco"));
|
|
195 | 221 |
// Adding table to slider |
196 | 222 |
sliderTrans.setLabelTable(labelTable); |
197 | 223 |
// Activate the lables |
Also available in: Unified diff