Revision 42981 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/DefaultLabeling.java
DefaultLabeling.java | ||
---|---|---|
40 | 40 |
import javax.swing.JPanel; |
41 | 41 |
import javax.swing.JSplitPane; |
42 | 42 |
|
43 |
import org.slf4j.Logger; |
|
44 |
import org.slf4j.LoggerFactory; |
|
45 |
|
|
43 | 46 |
import org.gvsig.andami.messages.NotificationManager; |
44 | 47 |
import org.gvsig.app.ApplicationLocator; |
45 |
import org.gvsig.fmap.dal.exception.DataException; |
|
46 | 48 |
import org.gvsig.fmap.dal.exception.ReadException; |
47 |
import org.gvsig.fmap.dal.feature.Feature; |
|
48 | 49 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
49 |
import org.gvsig.fmap.dal.feature.FeatureSelection; |
|
50 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
51 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
52 | 50 |
import org.gvsig.fmap.dal.feature.FeatureType; |
53 | 51 |
import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass; |
54 | 52 |
import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod; |
... | ... | |
63 | 61 |
import org.gvsig.labeling.lang.LabelClassUtils; |
64 | 62 |
import org.gvsig.symbology.SymbologyLocator; |
65 | 63 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.DefaultLabelingMethod; |
66 |
import org.gvsig.tools.dispose.DisposableIterator; |
|
67 |
import org.slf4j.Logger; |
|
68 |
import org.slf4j.LoggerFactory; |
|
69 | 64 |
|
70 | 65 |
public class DefaultLabeling extends AbstractLabelingMethodPanel implements |
71 | 66 |
ActionListener { |
... | ... | |
87 | 82 |
private IZoomConstraints zoomConstraints; |
88 | 83 |
private LabelClassProperties lcProp; |
89 | 84 |
|
85 |
private JSplitPane scrl; |
|
86 |
private JPanel aux; |
|
87 |
private JPanel aux2; |
|
88 |
|
|
89 |
|
|
90 | 90 |
public Class<? extends ILabelingMethod> getLabelingMethodClass() { |
91 | 91 |
return DefaultLabelingMethod.class; |
92 | 92 |
} |
... | ... | |
96 | 96 |
} |
97 | 97 |
|
98 | 98 |
@Override |
99 |
public void fillPanel(ILabelingMethod method, FeatureType fty) {
|
|
99 |
public void fillPanel(FeatureType fty) { |
|
100 | 100 |
try { |
101 |
if (enableLayerPrev.isSelected()) {
|
|
101 |
if (getEnableLayerPreview().isSelected()) {
|
|
102 | 102 |
layerPrev.setLayer(layer); |
103 | 103 |
} else { |
104 | 104 |
layerPrev.setLayer(null); |
... | ... | |
175 | 175 |
} |
176 | 176 |
|
177 | 177 |
@Override |
178 |
protected void initializePanel() { |
|
179 |
setLayout(new BorderLayout()); |
|
180 |
JSplitPane scrl = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); |
|
181 |
scrl.add(getLayerPreview(), JSplitPane.LEFT); |
|
178 |
protected void initializePanel() { |
|
179 |
setLayout(new BorderLayout()); |
|
180 |
add(getScrl(), BorderLayout.CENTER); |
|
181 |
scrl.setDividerLocation(500); |
|
182 |
getEnableLayerPreview().setSelected(false); |
|
183 |
add(getEnableLayerPreview(), BorderLayout.SOUTH); |
|
184 |
} |
|
182 | 185 |
|
183 |
labelPrev = getLabelPrev(); // new LabelClassPreview(); |
|
184 |
JPanel aux = new JPanel(new BorderLayout()); |
|
185 |
aux.add(new JBlank(10, 10), BorderLayout.NORTH); |
|
186 |
aux.add(new JBlank(10, 10), BorderLayout.WEST); |
|
187 |
aux.add(labelPrev, BorderLayout.CENTER); |
|
188 |
aux.add(new JBlank(10, 10), BorderLayout.EAST); |
|
189 |
JPanel aux2 = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 10)); |
|
190 |
btnProperties = getBtnProperties(); |
|
191 |
aux2.add(btnProperties); |
|
192 |
aux.add(aux2, BorderLayout.SOUTH); |
|
193 |
scrl.add(aux, JSplitPane.RIGHT); |
|
194 |
add(scrl, BorderLayout.CENTER); |
|
195 |
scrl.setDividerLocation(500); |
|
186 |
private JSplitPane getScrl() { |
|
187 |
if (scrl == null) { |
|
188 |
scrl = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); |
|
189 |
} |
|
190 |
scrl.add(getLayerPreview(), JSplitPane.LEFT); |
|
191 |
scrl.add(getAuxPanel(), JSplitPane.RIGHT); |
|
192 |
add(scrl, BorderLayout.CENTER); |
|
193 |
return scrl; |
|
194 |
} |
|
196 | 195 |
|
197 |
getEnableLayerPreview().setSelected(false); |
|
198 |
add(enableLayerPrev, BorderLayout.SOUTH); |
|
196 |
JPanel getAuxPanel(){ |
|
197 |
if(aux == null){ |
|
198 |
aux = new JPanel(new BorderLayout()); |
|
199 |
aux.add(new JBlank(10, 10), BorderLayout.NORTH); |
|
200 |
aux.add(new JBlank(10, 10), BorderLayout.WEST); |
|
201 |
aux.add(getLabelPrev(), BorderLayout.CENTER); |
|
202 |
aux.add(new JBlank(10, 10), BorderLayout.EAST); |
|
203 |
aux.add(getAux2Panel(), BorderLayout.SOUTH); |
|
204 |
} |
|
205 |
return aux; |
|
199 | 206 |
} |
200 | 207 |
|
208 |
JPanel getAux2Panel(){ |
|
209 |
if(aux2 == null){ |
|
210 |
aux2 = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 10)); |
|
211 |
aux2.add(getBtnProperties()); |
|
212 |
} |
|
213 |
return aux2; |
|
214 |
} |
|
215 |
|
|
201 | 216 |
private LabelClassProperties getLcProp() { |
202 | 217 |
if (lcProp == null) { |
203 | 218 |
|
Also available in: Unified diff