Revision 338

View differences:

2.0/trunk/org.gvsig.gvsig3d.app/org.gvsig.gvsig3d.app.extension/package.info
1 1
#
2
#Fri Feb 03 13:05:32 CET 2012
2
#Sun Feb 05 20:56:09 CET 2012
3 3
owner=gvSIG Association
4 4
code=org.gvsig.gvsig3d.app.extension
5 5
java-version=j1_5
2.0/trunk/org.gvsig.gvsig3d.app/org.gvsig.gvsig3d.app.extension/src/main/java/org/gvsig/gvsig3d/app/gui/styling/PictureSymbolTab.java
70 70
		setLayout(new BorderLayout(0, 0));
71 71

  
72 72
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
73
		tabbedPane.setPreferredSize(new Dimension(480,220));
73 74
		add(tabbedPane);
74 75

  
75 76
		panel = new JPanel();
76 77
		tabbedPane.addTab("Properties", null, panel, null);
77 78
		GridBagLayout gbl_panel = new GridBagLayout();
78
		gbl_panel.columnWidths = new int[] { 352, 84, 0 };
79
		gbl_panel.rowHeights = new int[] { 100, 0 };
80
		gbl_panel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
81
		gbl_panel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
79
		gbl_panel.columnWidths = new int[] { 352, 84 };
80
		gbl_panel.rowHeights = new int[] { 100 };
81
		gbl_panel.columnWeights = new double[] { 0.0, 0.0 };
82
		gbl_panel.rowWeights = new double[] { 0.0 };
82 83
		panel.setLayout(gbl_panel);
83 84

  
84 85
		JPanel propertiesPanel = new JPanel();
85 86
		propertiesPanel.setBorder(new TitledBorder(null, "Properties",
86 87
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
87 88
		GridBagConstraints gbc_propertiesPanel = new GridBagConstraints();
89
		gbc_propertiesPanel.fill = GridBagConstraints.HORIZONTAL;
88 90
		gbc_propertiesPanel.anchor = GridBagConstraints.NORTHWEST;
89 91
		gbc_propertiesPanel.insets = new Insets(0, 0, 0, 5);
90 92
		gbc_propertiesPanel.gridx = 0;
91 93
		gbc_propertiesPanel.gridy = 0;
92 94
		panel.add(propertiesPanel, gbc_propertiesPanel);
93
		propertiesPanel.setLayout(new GridLayout(0, 3, 15, 0));
95
		propertiesPanel.setLayout(new GridLayout(0, 3, 10, 10));
94 96

  
95 97
		JLabel lblNewLabel_1 = new JLabel("Path:");
96 98
		propertiesPanel.add(lblNewLabel_1);
2.0/trunk/org.gvsig.gvsig3d.app/org.gvsig.gvsig3d.app.extension/src/main/java/org/gvsig/gvsig3d/app/gui/styling/Object3DSymbolTab.java
57 57
		setLayout(new BorderLayout(0, 0));
58 58

  
59 59
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
60
		tabbedPane.setPreferredSize(new Dimension(480,220));
60 61
		add(tabbedPane);
61 62

  
62 63
		JPanel panel = new JPanel();
63 64
		tabbedPane.addTab("Properties", null, panel, null);
64 65
		GridBagLayout gbl_panel = new GridBagLayout();
65
		gbl_panel.columnWidths = new int[] { 352, 84, 0 };
66
		gbl_panel.rowHeights = new int[] { 100, 0 };
67
		gbl_panel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
68
		gbl_panel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
66
		gbl_panel.columnWidths = new int[] { 352, 84 };
67
		gbl_panel.rowHeights = new int[] { 100 };
68
		gbl_panel.columnWeights = new double[] { 0.0, 0.0 };
69
		gbl_panel.rowWeights = new double[] { 0.0 };
69 70
		panel.setLayout(gbl_panel);
70 71

  
71 72
		JPanel propertiesPanel = new JPanel();
72 73
		propertiesPanel.setBorder(new TitledBorder(null, "Properties",
73 74
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
74 75
		GridBagConstraints gbc_propertiesPanel = new GridBagConstraints();
76
		gbc_propertiesPanel.fill = GridBagConstraints.HORIZONTAL;
77
		gbc_propertiesPanel.ipady = 10;
78
		gbc_propertiesPanel.ipadx = 10;
79
		gbc_propertiesPanel.insets = new Insets(0, 0, 0, 5);
75 80
		gbc_propertiesPanel.anchor = GridBagConstraints.NORTHWEST;
76
		gbc_propertiesPanel.insets = new Insets(0, 0, 0, 5);
77 81
		gbc_propertiesPanel.gridx = 0;
78 82
		gbc_propertiesPanel.gridy = 0;
79 83
		panel.add(propertiesPanel, gbc_propertiesPanel);
80
		propertiesPanel.setLayout(new GridLayout(0, 3, 15, 0));
84
		propertiesPanel.setLayout(new GridLayout(0, 3, 10, 10));
81 85

  
82 86
		JLabel lblNewLabel_1 = new JLabel("Path:");
83 87
		propertiesPanel.add(lblNewLabel_1);
......
150 154
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
151 155
		GridBagConstraints gbc_panel_2 = new GridBagConstraints();
152 156
		gbc_panel_2.fill = GridBagConstraints.BOTH;
153
		gbc_panel_2.anchor = GridBagConstraints.WEST;
154 157
		gbc_panel_2.gridx = 1;
155 158
		gbc_panel_2.gridy = 0;
156 159
		panel.add(panel_2, gbc_panel_2);
......
219 222

  
220 223
	private JPanel getOsgPanel() {
221 224

  
222
		int size = 150;
225
		int size = 80;
223 226
		JPanel aux3 = new JPanel();
224 227
		aux3.setPreferredSize(new Dimension(size, size));
225 228
		if (_canvas3d == null) {
2.0/trunk/org.gvsig.gvsig3d.app/org.gvsig.gvsig3d.app.extension/src/main/java/org/gvsig/gvsig3d/app/gui/styling/SymbolSelector3D.java
94 94

  
95 95
		if (symbol.getClass().equals(SimpleMarker3DSymbol.class)) {
96 96
			_ssTab.updatePanel((I3DSymbol) symbol);
97
			_tabsPane.add(_ssTab);
97
			_tabsPane.add(_ssTab, BorderLayout.CENTER);
98 98
			_activeTab = _ssTab;
99 99
		} else if (symbol.getClass().equals(PictureMarker3DSymbol.class)) {
100 100
			_psTab.updatePanel((I3DSymbol) symbol);
101
			_tabsPane.add(_psTab);
101
			_tabsPane.add(_psTab, BorderLayout.CENTER);
102 102
			_activeTab = _psTab;
103 103
		} else if (symbol.getClass().equals(NodeMarker3DSymbol.class)) {
104 104
			_obTab.updatePanel((I3DSymbol) symbol);
105
			_tabsPane.add(_obTab);
105
			_tabsPane.add(_obTab, BorderLayout.CENTER);
106 106
			_activeTab = _obTab;
107 107
		}
108 108
		addAcceptCancelButtons();
......
129 129
				case 0:
130 130
					_tabsPane.removeAll();
131 131
					System.out.println("A?ado panel 1");
132
					_tabsPane.add(_ssTab);
132
					_tabsPane.add(_ssTab, BorderLayout.CENTER);
133 133
					_activeTab = _ssTab;
134 134
					_tabsPane.repaint();
135 135
					_tabsPane.validate();
......
138 138
				case 1:
139 139
					_tabsPane.removeAll();
140 140
					System.out.println("A?ado panel 2");
141
					_tabsPane.add(_psTab);
141
					_tabsPane.add(_psTab, BorderLayout.CENTER);
142 142
					_activeTab = _psTab;
143 143
					_tabsPane.repaint();
144 144
					_tabsPane.validate();
......
147 147
				case 2:
148 148
					_tabsPane.removeAll();
149 149
					System.out.println("A?ado panel 3");
150
					_tabsPane.add(_obTab);
150
					_tabsPane.add(_obTab, BorderLayout.CENTER);
151 151
					_activeTab = _obTab;
152 152
					_tabsPane.repaint();
153 153
					_tabsPane.validate();
......
233 233

  
234 234
		if (wi == null) {
235 235
			wi = new WindowInfo(WindowInfo.MODALDIALOG | WindowInfo.RESIZABLE);
236
			wi.setWidth(800);
237
			wi.setHeight(400);
236
			wi.setWidth(500);
237
			wi.setHeight(300);
238 238
			wi.setTitle(Messages.getText("symbol_selector"));
239 239
		}
240 240
		return wi;
2.0/trunk/org.gvsig.gvsig3d.app/org.gvsig.gvsig3d.app.extension/src/main/java/org/gvsig/gvsig3d/app/gui/styling/SimpleSymbolTab.java
3 3
import java.awt.BorderLayout;
4 4
import java.awt.Color;
5 5
import java.awt.Component;
6
import java.awt.Dimension;
6 7
import java.awt.FlowLayout;
7 8
import java.awt.GridBagConstraints;
8 9
import java.awt.GridBagLayout;
......
42 43

  
43 44
	private Component _parent;
44 45

  
45
	private JSlider slider;
46

  
47 46
	private JSpinner sizeSpinner;
48 47

  
49 48
	private JPanel symbolPreviewPanel;
......
53 52
	 */
54 53
	public SimpleSymbolTab(Component parent) {
55 54
		setLayout(new BorderLayout(0, 0));
56

  
55
		
57 56
		_parent = parent;
58 57
		_symbol = (ISimpleMarker3DSymbol) ((SymbolSelector3D) parent)
59 58
				.getSymbol();
60

  
59
		
61 60
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
61
		tabbedPane.setPreferredSize(new Dimension(480,220));
62 62
		add(tabbedPane, BorderLayout.CENTER);
63

  
63
		
64 64
		JPanel panel = new JPanel();
65
		tabbedPane.addTab("Properties", null, panel, null);
65
		tabbedPane.addTab("Propeties", null, panel, null);
66 66
		GridBagLayout gbl_panel = new GridBagLayout();
67
		gbl_panel.columnWidths = new int[] { 352, 0, 84 };
68
		gbl_panel.rowHeights = new int[] { 124, 0, 0 };
69
		gbl_panel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
70
		gbl_panel.rowWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
67
		gbl_panel.columnWidths = new int[] { 352, 84 };
68
		gbl_panel.rowHeights = new int[] { 100 };
69
		gbl_panel.columnWeights = new double[] { 0.0, 0.0 };
70
		gbl_panel.rowWeights = new double[] { 0.0 };
71 71
		panel.setLayout(gbl_panel);
72

  
73
		JPanel optionsPanel = new JPanel();
74
		optionsPanel.setBorder(new TitledBorder(null, "Properties",
75
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
76
		GridBagConstraints gbc_optionsPanel = new GridBagConstraints();
77
		gbc_optionsPanel.anchor = GridBagConstraints.NORTHWEST;
78
		gbc_optionsPanel.insets = new Insets(0, 0, 5, 5);
79
		gbc_optionsPanel.gridx = 0;
80
		gbc_optionsPanel.gridy = 0;
81
		panel.add(optionsPanel, gbc_optionsPanel);
82
		optionsPanel.setLayout(new GridLayout(0, 3, 5, 0));
83

  
84
		JLabel colorLabel = new JLabel("Color:");
85
		optionsPanel.add(colorLabel);
86

  
72
		
73
		JPanel PropertiesPanel = new JPanel();
74
		PropertiesPanel.setBorder(new TitledBorder(null, "Titulo", TitledBorder.LEADING, TitledBorder.TOP, null, null));
75
		GridBagConstraints gbc_PropertiesPanel = new GridBagConstraints();
76
		gbc_PropertiesPanel.fill = GridBagConstraints.HORIZONTAL;
77
		gbc_PropertiesPanel.ipady = 10;
78
		gbc_PropertiesPanel.ipadx = 10;
79
		gbc_PropertiesPanel.insets = new Insets(0, 0, 0, 5);
80
		gbc_PropertiesPanel.anchor = GridBagConstraints.NORTHWEST;
81
		gbc_PropertiesPanel.gridx = 0;
82
		gbc_PropertiesPanel.gridy = 0;
83
		panel.add(PropertiesPanel, gbc_PropertiesPanel);
84
		PropertiesPanel.setLayout(new GridLayout(0, 3, 10, 10));
85
		
86
		JLabel lblColor = new JLabel("Color:");
87
		PropertiesPanel.add(lblColor);
88
		
87 89
		_colorPanel = new JPanel();
88 90
		_colorPanel.setBackground(_symbol.getColor());
89
		optionsPanel.add(_colorPanel);
90

  
91
		JButton colorButton = new JButton("...");
91
		PropertiesPanel.add(_colorPanel);
92
		
93
		JButton colorButton = new JButton("Select");
92 94
		colorButton.addActionListener(new ActionListener() {
93 95
			public void actionPerformed(ActionEvent arg0) {
94 96

  
......
103 105

  
104 106
			}
105 107
		});
106
		optionsPanel.add(colorButton);
107

  
108
		JLabel sizeLabel = new JLabel("Size:");
109
		optionsPanel.add(sizeLabel);
110

  
111
		slider = new JSlider();
112
		slider.setMinimum(1);
113
		slider.setValue((int) _symbol.getSize());
114
		optionsPanel.add(slider);
115

  
116
		sizeSpinner = new JSpinner();
117
		sizeSpinner.setModel(new SpinnerNumberModel(new Integer((int) _symbol
118
				.getSize()), new Integer(1), null, new Integer(1)));
119
		optionsPanel.add(sizeSpinner);
108
		PropertiesPanel.add(colorButton);
120 109
		
121
		slider.addChangeListener(new ChangeListener() {
122
			public void stateChanged(ChangeEvent arg0) {
123
				
124
				sizeSpinner.setValue(slider.getValue());
125
				_symbol.setSize(slider.getValue());
126
				symbolPreviewPanel.repaint();
127
				
128
				
129
			}
130
		});
110
		JLabel lblSize = new JLabel("Size:");
111
		PropertiesPanel.add(lblSize);
131 112
		
113
		sizeSpinner = new JSpinner();
114
		sizeSpinner.setModel(new SpinnerNumberModel(_symbol
115
				.getSize(), 1.0, 1000.0, 1.0));
116
		
132 117
		sizeSpinner.addChangeListener(new ChangeListener() {
133 118
			public void stateChanged(ChangeEvent arg0) {
134 119
				
135
				slider.setValue((Integer) sizeSpinner.getValue());
136
				_symbol.setSize(slider.getValue());
120
				_symbol.setSize((Double) sizeSpinner.getValue());
137 121
				symbolPreviewPanel.repaint();
138 122
				
139 123
				
140 124
			}
141 125
		});
142

  
143
		JLabel lblUnits = new JLabel("Units");
144
		//optionsPanel.add(lblUnits);
145

  
146
		JComboBox unitsCombo = new JComboBox();
147
		//optionsPanel.add(unitsCombo);
148

  
126
		PropertiesPanel.add(sizeSpinner);
127
		
149 128
		symbolPreviewPanel = new JPanel();
150
		symbolPreviewPanel.setBorder(new TitledBorder(null, "Preview",
151
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
152
		GridBagConstraints gbc_symbolPreviewPanel = new GridBagConstraints();
153
		gbc_symbolPreviewPanel.gridwidth = 3;
154
		gbc_symbolPreviewPanel.fill = GridBagConstraints.BOTH;
155
		gbc_symbolPreviewPanel.anchor = GridBagConstraints.NORTH;
156
		gbc_symbolPreviewPanel.insets = new Insets(0, 0, 5, 0);
157
		gbc_symbolPreviewPanel.gridx = 2;
158
		gbc_symbolPreviewPanel.gridy = 0;
159
		panel.add(symbolPreviewPanel, gbc_symbolPreviewPanel);
129
		symbolPreviewPanel.setBorder(new TitledBorder(null, "Preview", TitledBorder.LEADING, TitledBorder.TOP, null, null));
130
		GridBagConstraints gbc_previewPanel = new GridBagConstraints();
131
		gbc_previewPanel.fill = GridBagConstraints.BOTH;
132
		gbc_previewPanel.gridx = 1;
133
		gbc_previewPanel.gridy = 0;
134
		panel.add(symbolPreviewPanel, gbc_previewPanel);
160 135
		symbolPreviewPanel.setLayout(new BorderLayout(0, 0));
136
		symbolPreviewPanel.setPreferredSize(new Dimension(80,80));
137
		
138
		JPanel _simplePanel = new JPanel();
139
		symbolPreviewPanel.add(_simplePanel, BorderLayout.CENTER);
140
		_simplePanel.setLayout(new BorderLayout(0, 0));
141
		
161 142
		SymbolPreviewer sp = new SymbolPreviewer();
143
		_simplePanel.add(sp, BorderLayout.CENTER);
162 144
		sp.setSymbol(_symbol);
163
		symbolPreviewPanel.add(sp);
164
		sp.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
145
		
165 146

  
166 147
	}
167 148

  

Also available in: Unified diff