Revision 458
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/Abrir.java | ||
---|---|---|
78 | 78 |
|
79 | 79 |
if (lyr != null) { |
80 | 80 |
try { |
81 |
if (lyr instanceof FLyrVect) { |
|
82 |
FLyrVect lyrVect = (FLyrVect) lyr; |
|
83 |
lyrVect.setLegend(LegendFactory.createSingleSymbolLegend()); |
|
84 |
} |
|
85 | 81 |
|
86 | 82 |
lyr.setVisible(true); |
87 | 83 |
lyr.setName(layerName); |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/toc/TocItemLeaf.java | ||
---|---|---|
11 | 11 |
import java.awt.Rectangle; |
12 | 12 |
import java.awt.datatransfer.DataFlavor; |
13 | 13 |
import java.awt.datatransfer.UnsupportedFlavorException; |
14 |
import java.awt.geom.AffineTransform; |
|
14 | 15 |
import java.awt.image.BufferedImage; |
15 | 16 |
import java.io.IOException; |
16 | 17 |
|
... | ... | |
18 | 19 |
import javax.swing.ImageIcon; |
19 | 20 |
|
20 | 21 |
import com.iver.cit.gvsig.fmap.core.FShape; |
22 |
import com.iver.cit.gvsig.fmap.core.v02.FGraphicUtilities; |
|
23 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
21 | 24 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
22 | 25 |
import com.iver.cit.gvsig.fmap.rendering.styling.SymbolPreviewDrawer; |
23 | 26 |
|
... | ... | |
29 | 32 |
*/ |
30 | 33 |
public class TocItemLeaf implements ITocItem { |
31 | 34 |
|
32 |
private FStyle2D symbol;
|
|
35 |
private FSymbol symbol;
|
|
33 | 36 |
private String description; |
34 | 37 |
private int layerType; |
35 | 38 |
private static int w_1symbol = 20; |
... | ... | |
45 | 48 |
static DataFlavor flavors[] = {INFO_FLAVOR }; |
46 | 49 |
|
47 | 50 |
|
48 |
public TocItemLeaf(FStyle2D symbol, String description, int layerType)
|
|
51 |
public TocItemLeaf(FSymbol symbol, String description, int layerType)
|
|
49 | 52 |
{ |
50 | 53 |
this.symbol = symbol; |
51 | 54 |
this.description = description; |
... | ... | |
65 | 68 |
// System.out.println("Dentro de getIcon: layerType=" + layerType); |
66 | 69 |
BufferedImage img = new BufferedImage(w_1symbol, h_1symbol, BufferedImage.TYPE_INT_ARGB); |
67 | 70 |
Graphics2D g2 = img.createGraphics(); |
68 |
pSD.setSymbol(symbol); |
|
69 | 71 |
Rectangle r; |
70 | 72 |
switch (layerType) |
71 | 73 |
{ |
72 | 74 |
case FShape.POINT: |
73 | 75 |
r = new Rectangle(w_1symbol, h_1symbol); |
74 |
pSD.drawPoint(g2,r);
|
|
76 |
FGraphicUtilities.DrawSymbol(g2, new AffineTransform(), r, symbol);
|
|
75 | 77 |
// System.out.println("Dibujo icono punto"); |
76 | 78 |
break; |
77 | 79 |
case FShape.LINE: |
78 | 80 |
r = new Rectangle(w_1symbol, h_1symbol); |
79 |
pSD.drawLine(g2,r);
|
|
81 |
FGraphicUtilities.DrawSymbol(g2, new AffineTransform(), r, symbol);
|
|
80 | 82 |
// System.out.println("Dibujo icono linea"); |
81 | 83 |
break; |
82 | 84 |
case FShape.POLYGON: |
83 | 85 |
r = new Rectangle(w_1symbol, h_1symbol); |
84 |
pSD.drawPolygon(g2,r);
|
|
86 |
FGraphicUtilities.DrawSymbol(g2, new AffineTransform(), r, symbol);
|
|
85 | 87 |
// System.out.println("Dibujo icono pol?gono"); |
86 | 88 |
break; |
87 | 89 |
} |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/toc/FPopupMenu.java | ||
---|---|---|
28 | 28 |
import com.iver.cit.gvsig.gui.IView; |
29 | 29 |
import com.iver.cit.gvsig.gui.View; |
30 | 30 |
import com.iver.cit.gvsig.gui.Panels.AdjustTransparencyPanel; |
31 |
import com.iver.cit.gvsig.gui.legendmanager.FLegendManagerWindow; |
|
32 |
import com.iver.mdiApp.App; |
|
31 | 33 |
import com.iver.mdiApp.Utilities; |
32 | 34 |
|
33 | 35 |
|
... | ... | |
106 | 108 |
estilo.addActionListener(new ActionListener() { |
107 | 109 |
public void actionPerformed(ActionEvent e) { |
108 | 110 |
// TODO: |
109 |
// getView().getTOC().openLegendManager(); |
|
111 |
FLegendManagerWindow m_LegendEditor = new FLegendManagerWindow(); |
|
112 |
if (App.instance == null) |
|
113 |
{ |
|
114 |
JDialog dlg = new JDialog(); |
|
115 |
|
|
116 |
m_LegendEditor.setPreferredSize(m_LegendEditor.getSize()); |
|
117 |
dlg.getContentPane().add(m_LegendEditor); |
|
118 |
dlg.setModal(false); |
|
119 |
dlg.pack(); |
|
120 |
dlg.show(); |
|
121 |
|
|
122 |
} |
|
123 |
else |
|
124 |
App.instance.getMDIContext().addView(m_LegendEditor); |
|
125 |
|
|
110 | 126 |
|
111 | 127 |
} |
112 | 128 |
}); |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/FLegendManagerWindow.java | ||
---|---|---|
16 | 16 |
import java.awt.event.ActionEvent; |
17 | 17 |
import java.awt.event.ActionListener; |
18 | 18 |
import java.io.File; |
19 |
import java.util.ArrayList; |
|
20 | 19 |
|
21 | 20 |
import javax.swing.JButton; |
22 | 21 |
import javax.swing.JDialog; |
... | ... | |
25 | 24 |
import javax.swing.JTabbedPane; |
26 | 25 |
import javax.xml.transform.TransformerFactory; |
27 | 26 |
import javax.xml.transform.sax.SAXTransformerFactory; |
28 |
import javax.xml.transform.sax.TransformerHandler; |
|
29 |
import javax.xml.transform.stream.StreamResult; |
|
30 | 27 |
|
31 | 28 |
import org.xml.sax.SAXNotSupportedException; |
32 | 29 |
import org.xml.sax.XMLReader; |
33 | 30 |
import org.xml.sax.helpers.XMLReaderFactory; |
34 | 31 |
|
35 | 32 |
import com.iver.cit.gvsig.fmap.NewMapControl; |
36 |
import com.iver.cit.gvsig.fmap.core.FLabel; |
|
37 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
|
38 | 33 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
39 | 34 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
40 |
import com.iver.cit.gvsig.fmap.layers.FRecordset; |
|
41 | 35 |
import com.iver.cit.gvsig.fmap.rendering.IntervalLegend; |
42 |
import com.iver.cit.gvsig.fmap.rendering.LegendInfo;
|
|
36 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
|
43 | 37 |
import com.iver.cit.gvsig.fmap.rendering.SingleSymbolLegend; |
44 | 38 |
import com.iver.cit.gvsig.fmap.rendering.UniqueValueLegend; |
45 | 39 |
import com.iver.cit.gvsig.gui.TOC; |
46 |
import com.iver.cit.gvsig.gui.legendmanager.panels.FPanelLegendBreaks; |
|
47 | 40 |
import com.iver.cit.gvsig.gui.legendmanager.panels.FPanelLegendDefault; |
48 |
import com.iver.cit.gvsig.gui.legendmanager.panels.FPanelLegendLabels; |
|
49 |
import com.iver.cit.gvsig.gui.legendmanager.panels.FPanelLegendValues; |
|
50 | 41 |
import com.iver.cit.gvsig.project.XMLEntityXMLHandler; |
51 | 42 |
import com.iver.mdiApp.App; |
52 | 43 |
import com.iver.mdiApp.Messages; |
... | ... | |
74 | 65 |
private NewMapControl m_MapControl; |
75 | 66 |
private FLyrVect m_Lyr; |
76 | 67 |
private TOC m_Toc; |
77 |
private LegendInfo m_Renderer; // Le asignaremos la leyenda del primer tema activo.
|
|
68 |
private Legend m_Renderer; // Le asignaremos la leyenda del primer tema activo. |
|
78 | 69 |
private JTabbedPane organizador = new JTabbedPane(); |
79 | 70 |
private FPanelLegendDefault m_defaultLegendPanel; |
80 | 71 |
// private FPanelLegendValues m_valuesLegendPanel; |
... | ... | |
160 | 151 |
add(organizador, java.awt.BorderLayout.NORTH); |
161 | 152 |
add(panelButtons, java.awt.BorderLayout.SOUTH); |
162 | 153 |
|
163 |
//pack(); |
|
154 |
// pack();
|
|
164 | 155 |
} |
165 | 156 |
|
166 | 157 |
private FLyrVect getFirstActiveLayerVect() |
... | ... | |
204 | 195 |
m_Toc = associatedToc; |
205 | 196 |
|
206 | 197 |
FLyrVect lyr = getFirstActiveLayerVect(); |
207 |
m_Renderer = (LegendInfo) lyr.getLegendInfo(); //.cloneRenderer();
|
|
198 |
m_Renderer = (Legend) lyr.getLegendInfo(); //.cloneRenderer(); |
|
208 | 199 |
actualizar(); |
209 | 200 |
} |
210 | 201 |
|
... | ... | |
390 | 381 |
* @see com.iver.mdiApp.FileListener#readFile(java.io.File) |
391 | 382 |
*/ |
392 | 383 |
public Object read(File file) { |
393 |
LegendInfo ret = null;
|
|
384 |
Legend ret = null; |
|
394 | 385 |
try { |
395 | 386 |
TransformerFactory transFact = TransformerFactory.newInstance(); |
396 | 387 |
|
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/FIntervalCellEditor.java | ||
---|---|---|
15 | 15 |
import javax.swing.AbstractCellEditor; |
16 | 16 |
import javax.swing.JButton; |
17 | 17 |
import javax.swing.JDialog; |
18 |
import javax.swing.JOptionPane; |
|
19 | 18 |
import javax.swing.JPanel; |
20 | 19 |
import javax.swing.JTable; |
21 | 20 |
import javax.swing.table.TableCellEditor; |
22 | 21 |
|
23 |
import com.iver.cit.gvsig.fmap.FInterval; |
|
22 |
import com.iver.cit.gvsig.fmap.rendering.FInterval;
|
|
24 | 23 |
|
25 | 24 |
/** |
26 | 25 |
* @author fjp |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/FSymbolFactory.java | ||
---|---|---|
15 | 15 |
import java.awt.geom.Rectangle2D; |
16 | 16 |
import java.awt.image.BufferedImage; |
17 | 17 |
|
18 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
|
18 | 19 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
19 | 20 |
|
20 | 21 |
|
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/FSymbolTable.java | ||
---|---|---|
17 | 17 |
* TableRenderDemo.java is a 1.4 application that requires no other files. |
18 | 18 |
*/ |
19 | 19 |
|
20 |
import java.awt.Color; |
|
21 | 20 |
import java.awt.Component; |
22 | 21 |
import java.awt.Dimension; |
23 | 22 |
import java.awt.GridLayout; |
... | ... | |
28 | 27 |
import javax.swing.JPanel; |
29 | 28 |
import javax.swing.JScrollPane; |
30 | 29 |
import javax.swing.JTable; |
31 |
import javax.swing.ListSelectionModel; |
|
32 | 30 |
import javax.swing.table.DefaultTableModel; |
33 | 31 |
import javax.swing.table.TableCellRenderer; |
34 | 32 |
import javax.swing.table.TableColumn; |
35 | 33 |
|
36 |
import com.iver.cit.gvsig.fmap.FInterval; |
|
37 |
import com.iver.cit.gvsig.fmap.FSymbol; |
|
34 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
38 | 35 |
import com.iver.mdiApp.Utilities; |
39 | 36 |
|
40 | 37 |
|
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/FPanelLegendValues.java | ||
---|---|---|
21 | 21 |
import javax.swing.JOptionPane; |
22 | 22 |
import javax.swing.JPanel; |
23 | 23 |
|
24 |
import com.iver.cit.gvsig.fmap.FConstant; |
|
25 |
import com.iver.cit.gvsig.fmap.FLyrVect; |
|
26 |
import com.iver.cit.gvsig.fmap.FRecordset; |
|
27 |
import com.iver.cit.gvsig.fmap.FRenderer; |
|
28 |
import com.iver.cit.gvsig.fmap.FSymbol; |
|
29 |
import com.iver.cit.gvsig.gui.TOC; |
|
24 |
import com.hardcode.gdbms.engine.data.DataSource; |
|
25 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
|
26 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
27 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
|
28 |
import com.iver.cit.gvsig.fmap.layers.FRecordset; |
|
29 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
|
30 |
import com.iver.cit.gvsig.fmap.rendering.VectorialLegend; |
|
31 |
import com.iver.cit.gvsig.fmap.rendering.VectorialUniqueValueLegend; |
|
30 | 32 |
import com.iver.mdiApp.Utilities; |
31 | 33 |
|
32 | 34 |
/** |
... | ... | |
39 | 41 |
|
40 | 42 |
private MyListener listener = new MyListener(); |
41 | 43 |
// private TOC m_TOC; |
42 |
private FRenderer m_Renderer;
|
|
44 |
private VectorialUniqueValueLegend m_Renderer;
|
|
43 | 45 |
private FLyrVect m_lyr; |
44 | 46 |
public boolean m_bCacheDirty = true; |
45 | 47 |
public String[] m_keysCache; |
... | ... | |
174 | 176 |
} |
175 | 177 |
private void fillTableValues() |
176 | 178 |
{ |
177 |
FRecordset elRs = m_lyr.getRecordset();
|
|
179 |
DataSource elRs = m_lyr.getRecordset();
|
|
178 | 180 |
int idField = -1; |
179 | 181 |
String fieldName = (String) m_cboFields.getSelectedItem(); |
180 | 182 |
System.out.println("Nombre del campo: " + fieldName); |
181 |
m_Renderer.setField(fieldName); |
|
183 |
idField = elRs.getFieldIndexByName(fieldName); |
|
184 |
m_Renderer.setField(idField); |
|
185 |
long numReg = elRs.getRowCount(); |
|
182 | 186 |
|
183 |
m_keysCache = new String[m_lyr.m_NumShapes]; |
|
184 |
|
|
185 |
String nomField = m_Renderer.getFieldName(); |
|
186 |
|
|
187 |
for (int i=0; i< elRs.getFieldsCount();i++) |
|
188 |
{ |
|
189 |
String nomAux = elRs.getFieldName(i).trim(); |
|
190 |
if (nomField.compareToIgnoreCase(nomAux) == 0) |
|
191 |
{ |
|
192 |
idField = i; |
|
193 |
break; |
|
194 |
} |
|
195 |
} |
|
187 |
m_keysCache = new String[(int) numReg]; |
|
196 | 188 |
if (idField == -1) |
197 | 189 |
{ |
198 |
System.err.println("Campo no reconocido " + nomField);
|
|
190 |
System.err.println("Campo no reconocido " + fieldName);
|
|
199 | 191 |
return; |
200 | 192 |
} |
201 | 193 |
|
... | ... | |
324 | 316 |
|
325 | 317 |
} |
326 | 318 |
|
327 |
public void setLayer(FLyrVect lyr, FRenderer r)
|
|
319 |
public void setLayer(FLyrVect lyr, Legend r)
|
|
328 | 320 |
{ |
329 | 321 |
// OJO, COMPROBAR ANTES SI ES DE TIPO VECTORIAL |
330 | 322 |
m_lyr = lyr; |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/FPanelLegendLabels.java | ||
---|---|---|
12 | 12 |
import javax.swing.JButton; |
13 | 13 |
import javax.swing.JPanel; |
14 | 14 |
|
15 |
import com.iver.cit.gvsig.fmap.FLyrVect;
|
|
16 |
import com.iver.cit.gvsig.fmap.FRecordset;
|
|
17 |
import com.iver.cit.gvsig.fmap.FRenderer;
|
|
18 |
import com.iver.cit.gvsig.fmap.FSymbol;
|
|
15 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol;
|
|
16 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect;
|
|
17 |
import com.iver.cit.gvsig.fmap.layers.FRecordset;
|
|
18 |
import com.iver.cit.gvsig.fmap.rendering.Legend;
|
|
19 | 19 |
import com.iver.cit.gvsig.gui.Dialogs.FontChooser; |
20 | 20 |
import com.iver.cit.gvsig.gui.Panels.ColorChooserPanel; |
21 | 21 |
import com.iver.mdiApp.Utilities; |
... | ... | |
30 | 30 |
|
31 | 31 |
|
32 | 32 |
// private TOC m_TOC; |
33 |
private FRenderer m_Renderer;
|
|
33 |
private Legend m_Renderer;
|
|
34 | 34 |
private FLyrVect m_lyr; |
35 | 35 |
|
36 | 36 |
private ColorChooserPanel m_colorChooser = new ColorChooserPanel(); |
... | ... | |
46 | 46 |
private javax.swing.JTextField jTextField = null; |
47 | 47 |
private javax.swing.JRadioButton jRadioButton = null; |
48 | 48 |
private javax.swing.JRadioButton jRadioButton1 = null; |
49 |
private com.iver.cit.gvsig.gui.legendmanager.panels.FPreviewSymbol fPreviewSymbol = null;
|
|
49 |
private com.iver.cit.gvsig.gui.Panels.FPreviewSymbol fPreviewSymbol = null;
|
|
50 | 50 |
private javax.swing.JLabel jLabel3 = null; |
51 | 51 |
private javax.swing.JButton jButton = null; |
52 | 52 |
|
... | ... | |
92 | 92 |
this.add(m_colorChooser); |
93 | 93 |
|
94 | 94 |
} |
95 |
public void setLayer(FLyrVect lyr, FRenderer r)
|
|
95 |
public void setLayer(FLyrVect lyr, Legend r)
|
|
96 | 96 |
{ |
97 | 97 |
// m_TOC = t; |
98 | 98 |
// m_lyr = (FLyrVect) t.getFirstLyrVectSelected(); |
... | ... | |
369 | 369 |
* @return com.iver.cit.opensig.gui.Panels.FPreviewSymbol |
370 | 370 |
|
371 | 371 |
*/ |
372 |
private com.iver.cit.gvsig.gui.legendmanager.panels.FPreviewSymbol getFPreviewSymbol() {
|
|
372 |
private com.iver.cit.gvsig.gui.Panels.FPreviewSymbol getFPreviewSymbol() {
|
|
373 | 373 |
if (fPreviewSymbol == null) { |
374 |
fPreviewSymbol = new com.iver.cit.gvsig.gui.legendmanager.panels.FPreviewSymbol();
|
|
374 |
fPreviewSymbol = new com.iver.cit.gvsig.gui.Panels.FPreviewSymbol();
|
|
375 | 375 |
fPreviewSymbol.setBounds(311, 53, 134, 77); |
376 | 376 |
} |
377 | 377 |
return fPreviewSymbol; |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/FPanelLegendDefault.java | ||
---|---|---|
43 | 43 |
import javax.swing.event.ChangeListener; |
44 | 44 |
import javax.swing.plaf.basic.BasicComboBoxEditor; |
45 | 45 |
|
46 |
import org.geotools.renderer.style.MarkStyle2D; |
|
47 |
|
|
46 |
import com.iver.cit.gvsig.fmap.core.FPoint2D; |
|
47 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
|
48 |
import com.iver.cit.gvsig.fmap.core.v02.FGraphicUtilities; |
|
49 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
48 | 50 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
49 | 51 |
import com.iver.cit.gvsig.gui.GUIUtil; |
50 | 52 |
import com.iver.cit.gvsig.gui.Panels.ColorChooserPanel; |
... | ... | |
62 | 64 |
|
63 | 65 |
public class FPanelLegendDefault extends JPanel { |
64 | 66 |
|
65 |
private FStyle2D m_FSymbol = null;
|
|
67 |
private FSymbol m_FSymbol = null;
|
|
66 | 68 |
|
67 | 69 |
|
68 | 70 |
protected static final int SLIDER_TEXT_FIELD_COLUMNS = 3; |
... | ... | |
153 | 155 |
}); |
154 | 156 |
setRenderer(new ListCellRenderer() { |
155 | 157 |
private Integer pointType; |
156 |
private MarkStyle2D myFSymbol = new MarkStyle2D();
|
|
158 |
private FSymbol myFSymbol = new FSymbol(FConstant.SYMBOL_TYPE_POINT);
|
|
157 | 159 |
private JPanel panel = new JPanel() { |
158 | 160 |
|
159 | 161 |
protected void paintComponent(Graphics g) { |
... | ... | |
163 | 165 |
AffineTransform mT = new AffineTransform(); |
164 | 166 |
mT.setToIdentity(); |
165 | 167 |
|
166 |
FShape shp = new FShape(new FPoint(panel.getWidth()/2,
|
|
167 |
panel.getHeight()/2),FConstant.SHAPE_TYPE_POINT);
|
|
168 |
FPoint2D shp = new FPoint2D(panel.getWidth()/2,
|
|
169 |
panel.getHeight()/2); |
|
168 | 170 |
myFSymbol.m_Color = m_FSymbol.m_Color; |
169 | 171 |
FGraphicUtilities.DrawShape(g2,mT, shp,myFSymbol); |
170 | 172 |
} |
... | ... | |
546 | 548 |
new Insets(2, 2, 0, 2), 0, 0)); |
547 | 549 |
|
548 | 550 |
pointTypeComboBox.setBounds(143, 25, 120, 20); |
549 |
pointColorChooserPanel.addActionListener(new java.awt.event.ActionListener() { |
|
551 |
pointColorChooserPanel.addActionListener(new java.awt.event.ActionListener() {
|
|
550 | 552 |
public void actionPerformed(ActionEvent e) { |
551 | 553 |
updateControls(); |
552 | 554 |
} |
553 | 555 |
}); |
554 | 556 |
|
557 |
// this.setSize(348, 243); |
|
558 |
|
|
555 | 559 |
} |
556 | 560 |
|
557 | 561 |
protected void setAlpha(int alpha) { |
... | ... | |
641 | 645 |
} |
642 | 646 |
if (m_FSymbol != null) |
643 | 647 |
{ |
644 |
/* if (m_FSymbol.m_symbolType == FConstant.SYMBOL_TYPE_POINT)
|
|
648 |
if (m_FSymbol.m_symbolType == FConstant.SYMBOL_TYPE_POINT) |
|
645 | 649 |
{ |
646 | 650 |
m_FSymbol.m_Size = Integer.parseInt(getJTextField().getText()); |
647 | 651 |
|
... | ... | |
722 | 726 |
} |
723 | 727 |
// System.out.println(fillPatternComboBox.getSelectedItem().toString() + " " + linePatternComboBox.getSelectedItem().toString()); |
724 | 728 |
// JOptionPane.showMessageDialog(this,"HOla","Colega", JOptionPane.INFORMATION_MESSAGE); |
725 |
m_previewSymbol.setSymbol(m_FSymbol); */
|
|
729 |
m_previewSymbol.setSymbol(m_FSymbol); |
|
726 | 730 |
} |
727 | 731 |
|
728 | 732 |
updateFillPatternColors(); |
729 | 733 |
fillPatternComboBox.repaint(); |
730 | 734 |
} |
731 | 735 |
|
732 |
public void setFSymbol(FStyle2D s)
|
|
736 |
public void setFSymbol(FSymbol s)
|
|
733 | 737 |
{ |
734 |
m_FSymbol = s; //.cloneSymbol();
|
|
738 |
m_FSymbol = s.cloneSymbol(); |
|
735 | 739 |
m_previewSymbol.setSymbol(m_FSymbol); |
736 |
if (m_FSymbol.getPolygonStyle2D() != null)
|
|
740 |
if (m_FSymbol.m_symbolType == FConstant.SYMBOL_TYPE_LINE)
|
|
737 | 741 |
{ |
738 | 742 |
// Deber?amos habilitar la pesta?a de pol?gonos |
739 | 743 |
getJPanelPoint().setVisible(false); |
... | ... | |
745 | 749 |
lineCheckBox.setVisible(true); |
746 | 750 |
lineColorChooserPanel.setVisible(true); |
747 | 751 |
|
748 |
boolean bUseOutline = m_FSymbol.getPolygonStyle2D().getContour() == null; |
|
749 |
lineCheckBox.setSelected(bUseOutline); |
|
750 |
lineColorChooserPanel.setColor(bUseOutline = m_FSymbol.getPolygonStyle2D().getContour()); |
|
752 |
lineCheckBox.setSelected(m_FSymbol.m_useOutline); |
|
753 |
lineColorChooserPanel.setColor(m_FSymbol.m_Color); |
|
751 | 754 |
if (m_FSymbol.m_Color != null) |
752 | 755 |
{ |
753 | 756 |
fillCheckBox.setSelected(true); |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/PanelEditInterval.java | ||
---|---|---|
8 | 8 |
|
9 | 9 |
import java.awt.GridLayout; |
10 | 10 |
|
11 |
import com.iver.cit.gvsig.fmap.FInterval; |
|
12 |
|
|
13 | 11 |
import javax.swing.JLabel; |
14 | 12 |
import javax.swing.JPanel; |
15 | 13 |
import javax.swing.JTextField; |
16 | 14 |
|
15 |
import com.iver.cit.gvsig.fmap.rendering.FInterval; |
|
17 | 16 |
|
17 |
|
|
18 | 18 |
/** |
19 | 19 |
* DOCUMENT ME! |
20 | 20 |
* |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/FCellEditor.java | ||
---|---|---|
7 | 7 |
package com.iver.cit.gvsig.gui.legendmanager.panels; |
8 | 8 |
|
9 | 9 |
import java.awt.BorderLayout; |
10 |
import java.awt.Color; |
|
11 | 10 |
import java.awt.Component; |
12 | 11 |
import java.awt.Dimension; |
13 | 12 |
import java.awt.event.ActionEvent; |
... | ... | |
20 | 19 |
import javax.swing.JTable; |
21 | 20 |
import javax.swing.table.TableCellEditor; |
22 | 21 |
|
23 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D;
|
|
22 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol;
|
|
24 | 23 |
|
25 | 24 |
/** |
26 | 25 |
* @author fjp |
... | ... | |
31 | 30 |
public class FCellEditor extends AbstractCellEditor |
32 | 31 |
implements TableCellEditor, |
33 | 32 |
ActionListener { |
34 |
FStyle2D currentSymbol;
|
|
33 |
FSymbol currentSymbol;
|
|
35 | 34 |
JButton button; |
36 | 35 |
// JColorChooser colorChooser; |
37 | 36 |
FPanelLegendDefault m_panelDefault; |
... | ... | |
74 | 73 |
|
75 | 74 |
button.setBackground(currentSymbol.m_Color); |
76 | 75 |
m_panelDefault.setVisible(true); |
77 |
m_panelDefault.setSymbol(currentSymbol); |
|
76 |
m_panelDefault.setFSymbol(currentSymbol);
|
|
78 | 77 |
// colorChooser.setColor(currentSymbol.m_Color); |
79 | 78 |
dialog.setVisible(true); |
80 | 79 |
|
... | ... | |
101 | 100 |
int column) { |
102 | 101 |
|
103 | 102 |
System.out.println(value.toString()); |
104 |
currentSymbol = (FStyle2D )value;
|
|
103 |
currentSymbol = (FSymbol )value;
|
|
105 | 104 |
// button.setBackground(currentSymbol.m_Color); |
106 | 105 |
return button; |
107 | 106 |
} |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/FCellRenderer.java | ||
---|---|---|
14 | 14 |
import javax.swing.border.Border; |
15 | 15 |
import javax.swing.table.TableCellRenderer; |
16 | 16 |
|
17 |
import com.iver.cit.gvsig.fmap.FSymbol; |
|
17 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol;
|
|
18 | 18 |
|
19 | 19 |
/** |
20 | 20 |
* @author fjp |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/FPanelLegendBreaks.java | ||
---|---|---|
8 | 8 |
|
9 | 9 |
import java.awt.BorderLayout; |
10 | 10 |
import java.awt.Color; |
11 |
import java.awt.Dimension; |
|
12 |
import java.awt.FlowLayout; |
|
13 | 11 |
import java.awt.GridBagConstraints; |
14 | 12 |
import java.awt.GridBagLayout; |
15 |
import java.awt.GridLayout; |
|
16 | 13 |
import java.awt.Insets; |
17 | 14 |
import java.awt.event.ActionEvent; |
18 | 15 |
import java.awt.event.ActionListener; |
19 | 16 |
import java.text.NumberFormat; |
20 | 17 |
import java.util.ArrayList; |
21 |
import java.util.Comparator; |
|
22 | 18 |
import java.util.Date; |
23 | 19 |
import java.util.TreeMap; |
24 | 20 |
|
... | ... | |
29 | 25 |
import javax.swing.JOptionPane; |
30 | 26 |
import javax.swing.JPanel; |
31 | 27 |
import javax.swing.JTextField; |
32 |
import javax.swing.border.Border; |
|
33 | 28 |
|
34 |
import com.iver.cit.gvsig.fmap.FConstant; |
|
35 |
import com.iver.cit.gvsig.fmap.FInterval; |
|
36 |
import com.iver.cit.gvsig.fmap.FLyrVect; |
|
37 |
import com.iver.cit.gvsig.fmap.FRecordset; |
|
38 |
import com.iver.cit.gvsig.fmap.FRenderer; |
|
39 |
import com.iver.cit.gvsig.fmap.FSymbol; |
|
40 |
import com.iver.cit.gvsig.gui.TOC; |
|
29 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
|
30 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
31 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
|
32 |
import com.iver.cit.gvsig.fmap.layers.FRecordset; |
|
33 |
import com.iver.cit.gvsig.fmap.rendering.FInterval; |
|
34 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
|
41 | 35 |
import com.iver.cit.gvsig.gui.Panels.ColorChooserPanel; |
42 | 36 |
import com.iver.mdiApp.Utilities; |
43 |
import com.vividsolutions.jts.io.ParseException; |
|
44 | 37 |
|
45 | 38 |
/** |
46 | 39 |
* @author fjp |
... | ... | |
51 | 44 |
public class FPanelLegendBreaks extends JPanel { |
52 | 45 |
private MyListener listener = new MyListener(); |
53 | 46 |
// private TOC m_TOC; |
54 |
private FRenderer m_Renderer;
|
|
47 |
private Legend m_Renderer;
|
|
55 | 48 |
private FLyrVect m_lyr; |
56 | 49 |
public boolean m_bCacheDirty = true; |
57 | 50 |
public Object[] m_valuesCache; |
... | ... | |
492 | 485 |
|
493 | 486 |
} |
494 | 487 |
|
495 |
public void setLayer(FLyrVect lyr, FRenderer r)
|
|
488 |
public void setLayer(FLyrVect lyr, Legend r)
|
|
496 | 489 |
{ |
497 | 490 |
// m_TOC = t; |
498 | 491 |
// OJO, COMPROBAR ANTES SI ES DE TIPO VECTORIAL |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/legendmanager/panels/FPreviewSymbol.java | ||
---|---|---|
16 | 16 |
|
17 | 17 |
import javax.swing.JComponent; |
18 | 18 |
|
19 |
import com.iver.cit.gvsig.fmap.core.FShape; |
|
20 |
import com.iver.cit.gvsig.fmap.drivers.shp.SHP; |
|
21 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
|
22 |
import com.iver.cit.gvsig.fmap.rendering.styling.SymbolPreviewDrawer; |
|
19 |
import com.iver.cit.gvsig.fmap.core.v02.FGraphicUtilities; |
|
20 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
23 | 21 |
|
24 | 22 |
|
25 | 23 |
/** |
... | ... | |
29 | 27 |
* Window>Preferences>Java>Code Generation>Code and Comments |
30 | 28 |
*/ |
31 | 29 |
public class FPreviewSymbol extends JComponent { |
32 |
private FStyle2D m_FSymbol; |
|
30 |
|
|
31 |
private FSymbol m_FSymbol; |
|
33 | 32 |
private String m_Str; |
34 |
private int type; |
|
35 | 33 |
private boolean m_bUseFSymbol; |
36 |
private static SymbolPreviewDrawer pSD = new SymbolPreviewDrawer(); |
|
37 | 34 |
|
38 | 35 |
|
39 | 36 |
/** |
... | ... | |
59 | 56 |
} |
60 | 57 |
protected void paintComponent(Graphics g) { |
61 | 58 |
super.paintComponent(g); |
62 |
|
|
63 | 59 |
if (m_FSymbol == null) return; |
64 |
|
|
65 |
|
|
66 | 60 |
// Seg?n el tipo de s?mbolo, creamos un shape u otro y utilizamos |
67 | 61 |
// la funci?n com?n de dibujado de shape sobre un graphics con un simbolo |
68 | 62 |
|
... | ... | |
71 | 65 |
|
72 | 66 |
|
73 | 67 |
g.setClip(0,0,getWidth(), getHeight()); |
74 |
// Rectangle r = g.getClipBounds(); //getClipRect(); |
|
75 |
Rectangle r = new Rectangle(2,3,getWidth()-4,getHeight()-7); |
|
68 |
Rectangle r = g.getClipBounds(); //getClipRect(); |
|
76 | 69 |
// g.setColor(Color.WHITE); |
77 | 70 |
// g2.fillRect(0, 0,getWidth(), getHeight()); |
78 | 71 |
if (m_bUseFSymbol) |
79 | 72 |
{ |
80 |
// AffineTransform mT2 = AffineTransform.getScaleInstance(0.8, 0.8); |
|
81 |
// mT2.concatenate(AffineTransform.getTranslateInstance(r.width * 0.1, r.height * 0.1 )); |
|
82 |
|
|
83 |
pSD.setSymbol(m_FSymbol); |
|
84 |
switch (type) |
|
85 |
{ |
|
86 |
case FShape.POINT: |
|
87 |
pSD.drawPoint(g2,r); |
|
88 |
break; |
|
89 |
case FShape.LINE: |
|
90 |
pSD.drawLine(g2,r); |
|
91 |
break; |
|
92 |
case FShape.POLYGON: |
|
93 |
pSD.drawPolygon(g2,r); |
|
94 |
break; |
|
95 |
} |
|
96 |
// FGraphicUtilities.DrawSymbol((Graphics2D)g,mT2,r,m_FSymbol); |
|
73 |
AffineTransform mT2 = AffineTransform.getScaleInstance(0.8, 0.8); |
|
74 |
mT2.concatenate(AffineTransform.getTranslateInstance(r.width * 0.1, r.height * 0.1 )); |
|
75 |
|
|
76 |
FGraphicUtilities.DrawSymbol((Graphics2D)g,mT2,r,m_FSymbol); |
|
97 | 77 |
} |
98 | 78 |
else |
99 | 79 |
{ |
... | ... | |
107 | 87 |
|
108 | 88 |
} |
109 | 89 |
|
110 |
public void setSymbol(FStyle2D symbol) { |
|
90 |
/** |
|
91 |
* @param symbol |
|
92 |
*/ |
|
93 |
public void setSymbol(FSymbol symbol) { |
|
111 | 94 |
// Lo clonamos para que si viene en coordenadas de mundo real |
112 | 95 |
// (m_bUseSize = true), dibujarlo con un tama?o fijo en pixels. |
113 |
// TODO: TENER EN CUENTA LO DE LAS COORDENADAS EN MUNDO REAL |
|
114 |
/* FStyle2D cloneSym = symbol.cloneSymbol();
|
|
96 |
|
|
97 |
FSymbol cloneSym = symbol.cloneSymbol();
|
|
115 | 98 |
cloneSym.m_bUseSize = false; |
116 | 99 |
cloneSym.m_Size = 10; // pixels |
117 |
*/ |
|
118 |
m_FSymbol = symbol;
|
|
100 |
|
|
101 |
m_FSymbol = cloneSym;
|
|
119 | 102 |
m_bUseFSymbol = true; |
103 |
|
|
120 | 104 |
repaint(); |
121 | 105 |
} |
122 | 106 |
|
... | ... | |
125 | 109 |
m_bUseFSymbol = false; |
126 | 110 |
m_Str = str; |
127 | 111 |
} |
128 |
|
|
129 |
public void setType(int type) |
|
130 |
{ |
|
131 |
this.type = type; |
|
132 |
} |
|
133 | 112 |
|
134 | 113 |
/* (non-Javadoc) |
135 | 114 |
* @see java.awt.Component#isShowing() |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/TOC.java | ||
---|---|---|
35 | 35 |
|
36 | 36 |
import com.iver.cit.gvsig.fmap.FMap; |
37 | 37 |
import com.iver.cit.gvsig.fmap.NewMapControl; |
38 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
38 | 39 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
39 | 40 |
import com.iver.cit.gvsig.fmap.layers.CancelationException; |
40 | 41 |
import com.iver.cit.gvsig.fmap.layers.CommonOperations; |
41 | 42 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
42 | 43 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
43 | 44 |
import com.iver.cit.gvsig.fmap.rendering.ClassifiedLegendInfo; |
44 |
import com.iver.cit.gvsig.fmap.rendering.LegendInfo;
|
|
45 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
|
45 | 46 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
46 | 47 |
import com.iver.cit.gvsig.gui.toc.DnDJTree; |
47 | 48 |
import com.iver.cit.gvsig.gui.toc.FPopupMenu; |
... | ... | |
259 | 260 |
else |
260 | 261 |
{ |
261 | 262 |
CommonOperations aux = (CommonOperations) lyr; |
262 |
LegendInfo legendInfo = aux.getLegendInfo();
|
|
263 |
Legend legendInfo = aux.getLegendInfo(); |
|
263 | 264 |
try { |
264 | 265 |
if (legendInfo instanceof ClassifiedLegendInfo) |
265 | 266 |
{ |
266 | 267 |
ClassifiedLegendInfo cl = (ClassifiedLegendInfo) legendInfo; |
267 | 268 |
String[] descriptions = cl.getDescriptions(); |
268 |
FStyle2D[] symbols = cl.getSymbols();
|
|
269 |
FSymbol[] symbols = cl.getSymbols();
|
|
269 | 270 |
for (int j=0; j<descriptions.length;j++) |
270 | 271 |
{ |
271 | 272 |
TocItemLeaf itemLeaf; |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/layout/fframes/FFrameLegend.java | ||
---|---|---|
12 | 12 |
import org.geotools.renderer.style.TextStyle2D; |
13 | 13 |
|
14 | 14 |
import com.iver.cit.gvsig.fmap.FMap; |
15 |
import com.iver.cit.gvsig.fmap.core.v02.FGraphicUtilities; |
|
16 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
15 | 17 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
16 | 18 |
import com.iver.cit.gvsig.fmap.layers.CommonOperations; |
17 | 19 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
... | ... | |
179 | 181 |
String s = cli.getDescriptions()[j]; |
180 | 182 |
drawNameLegend(g, s, re, sizefont, xl, yl,h); |
181 | 183 |
|
182 |
FStyle2D fs2d = cli.getSymbols()[j];
|
|
184 |
FSymbol fs2d = cli.getSymbols()[j];
|
|
183 | 185 |
drawSymbolLegend(g, re, xl, yl, fs2d,sizefont,cO.getShapeType()); |
184 | 186 |
|
185 | 187 |
n++; |
... | ... | |
202 | 204 |
|
203 | 205 |
//FStyle2D fs2d = cO.getLegendInfo().getSymbol(); |
204 | 206 |
//drawSymbolLegend(g, re, xl, yl, fs2d,sizefont,cO.getShapeType()); |
205 |
FStyle2D fs2d = cO.getLegendInfo().getDefaultSymbol();
|
|
207 |
FSymbol fs2d = cO.getLegendInfo().getDefaultSymbol();
|
|
206 | 208 |
System.out.println("sizefont = "+sizefont); |
207 | 209 |
drawSymbolLegend(g, re, xl, yl, fs2d,sizefont,cO.getShapeType()); |
208 | 210 |
System.out.println("cO.getShapeType()= "+cO.getShapeType()); |
... | ... | |
257 | 259 |
pSD.draw(g, new Rectangle(x, yaux, wl, haux), type); |
258 | 260 |
|
259 | 261 |
} |
262 |
private void drawSymbolLegend(Graphics2D g, Rectangle2D re, int x, int y, |
|
263 |
FSymbol fs2d,int sizefont,int type) { |
|
264 |
double pW = 1; |
|
265 |
double pH = m_numLayers; |
|
266 |
int wl = (int) (re.getWidth() / pW); |
|
267 |
int hl = (int) (re.getHeight() / pH); |
|
268 |
int haux=(int)(sizefont*1.8); |
|
269 |
int yaux=(int)(y+(hl-haux)/2); |
|
270 |
FGraphicUtilities.DrawSymbol(g, new AffineTransform(), new Rectangle(x, yaux, wl, haux), fs2d); |
|
271 |
|
|
272 |
} |
|
260 | 273 |
|
261 | 274 |
/** |
262 | 275 |
* DOCUMENT ME! |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/Dialogs/General.java | ||
---|---|---|
753 | 753 |
private javax.swing.JLabel getJLabel17() { |
754 | 754 |
if (jLabel17 == null) { |
755 | 755 |
jLabel17 = new javax.swing.JLabel(); |
756 |
jLabel17.setText(m_layer.getPath()); |
|
756 |
// TODO: REVISAR. AQU? DEBER?A PONER EL ORIGEN DE DATOS DE ESTA CAPA |
|
757 |
jLabel17.setText(m_layer.getSource().getDriver().toString()); |
|
757 | 758 |
} |
758 | 759 |
|
759 | 760 |
return jLabel17; |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/DEMO/ComandosListener.java | ||
---|---|---|
152 | 152 |
|
153 | 153 |
try { |
154 | 154 |
lyr = (FLyrVect) LayerFactory.createLayer(fileDlg.getDriverName(), fich, proj); |
155 |
if (lyr instanceof FLyrVect) |
|
156 |
{ |
|
157 |
FLyrVect lyrVect = (FLyrVect) lyr; |
|
158 |
lyrVect.setLegend(LegendFactory.createSingleSymbolLegend()); |
|
159 |
} |
|
160 | 155 |
|
161 | 156 |
lyr.setVisible(true); |
162 | 157 |
lyr.setName(layerName); |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrComplexRaster.java | ||
---|---|---|
15 | 15 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
16 | 16 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
17 | 17 |
import com.iver.cit.gvsig.fmap.operations.QueriedPoint; |
18 |
import com.iver.cit.gvsig.fmap.rendering.LegendInfo;
|
|
18 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
|
19 | 19 |
import com.iver.cit.gvsig.fmap.rendering.RasterLegend; |
20 | 20 |
import com.iver.utiles.XMLEntity; |
21 | 21 |
|
... | ... | |
109 | 109 |
/** |
110 | 110 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#getLegendInfo() |
111 | 111 |
*/ |
112 |
public LegendInfo getLegendInfo() {
|
|
112 |
public Legend getLegendInfo() { |
|
113 | 113 |
return null; |
114 | 114 |
} |
115 | 115 |
|
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java | ||
---|---|---|
22 | 22 |
import com.iver.cit.gvsig.fmap.operations.strategies.Strategy; |
23 | 23 |
import com.iver.cit.gvsig.fmap.operations.strategies.StrategyManager; |
24 | 24 |
import com.iver.cit.gvsig.fmap.rendering.LegendFactory; |
25 |
import com.iver.cit.gvsig.fmap.rendering.LegendInfo;
|
|
25 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
|
26 | 26 |
import com.iver.cit.gvsig.fmap.rendering.VectorialLegend; |
27 | 27 |
import com.iver.utiles.XMLEntity; |
28 | 28 |
|
... | ... | |
212 | 212 |
} |
213 | 213 |
|
214 | 214 |
public VectorialLegend getLegend() { |
215 |
//Leyenda por defecto |
|
216 |
if (legend == null){ |
|
217 |
legend = LegendFactory.createSingleSymbolLegend(); |
|
218 |
} |
|
219 | 215 |
|
220 | 216 |
return legend; |
221 | 217 |
} |
... | ... | |
223 | 219 |
/** |
224 | 220 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#getLegendInfo() |
225 | 221 |
*/ |
226 |
public LegendInfo getLegendInfo() {
|
|
227 |
return (LegendInfo) legend;
|
|
222 |
public Legend getLegendInfo() { |
|
223 |
return (Legend) legend; |
|
228 | 224 |
} |
229 | 225 |
|
230 | 226 |
/** |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/LayerFactory.java | ||
---|---|---|
17 | 17 |
import com.iver.cit.gvsig.fmap.drivers.VectorialDriver; |
18 | 18 |
import com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver; |
19 | 19 |
import com.iver.cit.gvsig.fmap.drivers.wfs.WFSDriver; |
20 |
import com.iver.cit.gvsig.fmap.rendering.LegendFactory; |
|
20 | 21 |
|
21 | 22 |
|
22 | 23 |
/** |
... | ... | |
96 | 97 |
// los s?mbolos en el TOC. |
97 | 98 |
capa.getSource().start(); |
98 | 99 |
capa.getSource().stop(); |
100 |
|
|
101 |
// Le asignamos tambi?n una legenda por defecto acorde con |
|
102 |
// el tipo de shape que tenga. Tampoco s? si es aqu? el |
|
103 |
// sitio adecuado, pero en fin.... |
|
104 |
capa.setLegend(LegendFactory.createSingleSymbolLegend(capa.getShapeType())); |
|
105 |
|
|
99 | 106 |
|
100 | 107 |
return capa; |
101 | 108 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/CommonOperations.java | ||
---|---|---|
6 | 6 |
import com.hardcode.gdbms.engine.data.DataSource; |
7 | 7 |
|
8 | 8 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
9 |
import com.iver.cit.gvsig.fmap.rendering.LegendInfo;
|
|
9 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
|
10 | 10 |
|
11 | 11 |
import java.util.BitSet; |
12 | 12 |
|
... | ... | |
80 | 80 |
*/ |
81 | 81 |
void fireSelectionEvents(); |
82 | 82 |
|
83 |
Legend getLegendInfo(); |
|
84 |
|
|
83 | 85 |
/** |
84 |
* DOCUMENT ME! |
|
85 |
* |
|
86 |
* @return DOCUMENT ME! |
|
87 |
*/ |
|
88 |
LegendInfo getLegendInfo(); |
|
89 |
|
|
90 |
/** |
|
91 | 86 |
* Obtiene el tipo de las geometr?as almacenadas en esta fuente de datos |
92 | 87 |
* |
93 | 88 |
* @return Obtiene el tipo de la capa. Es un bit-oring de los tipos |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/LegendInfo.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.rendering; |
|
4 |
|
|
5 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
|
6 |
import com.iver.utiles.XMLEntity; |
|
7 |
|
|
8 |
/** |
|
9 |
* Informaci?n sobre la leyenda para la representaci?n en la interfaz |
|
10 |
*/ |
|
11 |
public interface LegendInfo { |
|
12 |
/** |
|
13 |
* Obtiene el s?mbolo por defecto de la leyenda |
|
14 |
*/ |
|
15 |
FStyle2D getDefaultSymbol(); |
|
16 |
XMLEntity getXMLEntity(); |
|
17 |
LegendInfo cloner() throws ClassNotFoundException, InstantiationException, IllegalAccessException; |
|
18 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/LegendFactory.java | ||
---|---|---|
8 | 8 |
import org.geotools.renderer.style.LineStyle2D; |
9 | 9 |
import org.geotools.renderer.style.MarkStyle2D; |
10 | 10 |
import org.geotools.renderer.style.PolygonStyle2D; |
11 |
import org.geotools.renderer.style.Style2D; |
|
12 | 11 |
|
12 |
import com.iver.cit.gvsig.fmap.core.FShape; |
|
13 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
|
14 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
13 | 15 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
14 | 16 |
import com.iver.utiles.XMLEntity; |
15 | 17 |
|
... | ... | |
20 | 22 |
* @author Fernando Gonz?lez Cort?s |
21 | 23 |
*/ |
22 | 24 |
public class LegendFactory { |
23 |
public static FStyle2D DEFAULT_SYMBOL; |
|
24 |
private static MarkStyle2D DEFAULT_POINT_SYMBOL = new MarkStyle2D(); |
|
25 |
private static LineStyle2D DEFAULT_LINE_SYMBOL = new LineStyle2D(); |
|
26 |
private static PolygonStyle2D DEFAULT_POLYGON_SYMBOL = new PolygonStyle2D(); |
|
27 |
static { |
|
28 |
|
|
29 |
DEFAULT_POLYGON_SYMBOL = new PolygonStyle2D(); |
|
30 |
DEFAULT_POLYGON_SYMBOL.setContour(Color.DARK_GRAY); |
|
31 |
DEFAULT_POLYGON_SYMBOL.setStroke(new BasicStroke(3)); |
|
32 |
DEFAULT_POLYGON_SYMBOL.setFill(Color.LIGHT_GRAY); |
|
25 |
public static FSymbol DEFAULT_POINT_SYMBOL = new FSymbol(FConstant.SYMBOL_TYPE_POINT); |
|
26 |
public static FSymbol DEFAULT_LINE_SYMBOL = new FSymbol(FConstant.SYMBOL_TYPE_LINE);; |
|
27 |
public static FSymbol DEFAULT_POLYGON_SYMBOL = new FSymbol(FConstant.SYMBOL_TYPE_FILL); |
|
33 | 28 |
|
34 |
DEFAULT_POINT_SYMBOL = new MarkStyle2D(); |
|
35 |
|
|
36 |
DEFAULT_POINT_SYMBOL.setShape(Java2DMark.getWellKnownMark("")); |
|
37 |
DEFAULT_POINT_SYMBOL.setFill(Color.RED); |
|
38 |
DEFAULT_POINT_SYMBOL.setSize(5); |
|
39 |
|
|
40 |
DEFAULT_LINE_SYMBOL.setContour(Color.BLUE); |
|
41 |
DEFAULT_LINE_SYMBOL.setContourComposite(null); |
|
42 |
|
|
43 |
BasicStroke stroke = new BasicStroke(1); |
|
44 |
DEFAULT_LINE_SYMBOL.setStroke(stroke); |
|
45 |
|
|
46 |
/* |
|
47 |
* TODO Falta definir los Style2D's de punto, de pol?gono |
|
48 |
* y de texto por defecto |
|
49 |
*/ |
|
50 |
|
|
51 |
DEFAULT_SYMBOL = new FStyle2D(); |
|
52 |
DEFAULT_SYMBOL.setPointStyle2D(DEFAULT_POINT_SYMBOL); |
|
53 |
DEFAULT_SYMBOL.setLineStyle2D(DEFAULT_LINE_SYMBOL); |
|
54 |
DEFAULT_SYMBOL.setPolygonStyle2D(DEFAULT_POLYGON_SYMBOL); |
|
55 |
} |
|
56 |
|
|
57 | 29 |
// TODO Descomentar esto cuando se tenga la interfaz de datos |
58 | 30 |
|
59 | 31 |
/* |
... | ... | |
72 | 44 |
* Crea un objeto renderer de s?mbolo ?nico con las caracter?sticas que se |
73 | 45 |
* pasan como par?metro |
74 | 46 |
* |
75 |
* @param pointStyle DOCUMENT ME! |
|
76 |
* @param lineStyle DOCUMENT ME! |
|
77 |
* @param polygonStyle DOCUMENT ME! |
|
78 |
* @param textStyle DOCUMENT ME! |
|
79 |
* |
|
80 | 47 |
* @return DOCUMENT ME! |
81 | 48 |
*/ |
82 |
public static VectorialLegend createUniqueSymbolLegend(Style2D pointStyle, |
|
83 |
LineStyle2D lineStyle, PolygonStyle2D polygonStyle, Style2D textStyle) { |
|
84 |
FStyle2D style = new FStyle2D(); |
|
85 |
|
|
86 |
if (pointStyle != null) { |
|
87 |
style.setPointStyle2D(pointStyle); |
|
88 |
} |
|
89 |
|
|
90 |
if (lineStyle != null) { |
|
91 |
style.setLineStyle2D(lineStyle); |
|
92 |
} |
|
93 |
|
|
94 |
if (polygonStyle != null) { |
|
95 |
style.setPolygonStyle2D(polygonStyle); |
|
96 |
} |
|
97 |
|
|
98 |
if (textStyle != null) { |
|
99 |
style.setTextStyle2D(textStyle); |
|
100 |
} |
|
101 |
|
|
102 |
return new SingleSymbolLegend(style); |
|
49 |
public static VectorialLegend createSingleSymbolLegend(int shapeType) { |
|
50 |
switch (shapeType) |
|
51 |
{ |
|
52 |
case FShape.POINT: |
|
53 |
return new SingleSymbolLegend(new FSymbol(FConstant.SYMBOL_TYPE_POINT)); |
|
54 |
case FShape.LINE: |
|
55 |
return new SingleSymbolLegend(new FSymbol(FConstant.SYMBOL_TYPE_LINE)); |
|
56 |
case FShape.POLYGON: |
|
57 |
return new SingleSymbolLegend(new FSymbol(FConstant.SYMBOL_TYPE_FILL)); |
|
58 |
|
|
59 |
} |
|
60 |
return null; |
|
61 |
|
|
103 | 62 |
} |
104 | 63 |
|
105 | 64 |
/** |
106 |
* Crea un objeto renderer de s?mbolo ?nico con las caracter?sticas que se |
|
107 |
* pasan como par?metro |
|
108 |
* |
|
109 |
* @return DOCUMENT ME! |
|
110 |
*/ |
|
111 |
public static VectorialLegend createSingleSymbolLegend() { |
|
112 |
return new SingleSymbolLegend(DEFAULT_SYMBOL); |
|
113 |
} |
|
114 |
|
|
115 |
/** |
|
116 | 65 |
* Obtiene un objeto con las propiedades del renderer. Este m?todo se |
117 | 66 |
* invocar? con el fin de guardar el s?mbolo en disco. |
118 | 67 |
* |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/SingleSymbolLegend.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig.fmap.rendering; |
2 | 2 |
|
3 | 3 |
|
4 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
4 | 5 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
5 | 6 |
import com.iver.utiles.XMLEntity; |
6 | 7 |
|
7 | 8 |
|
8 | 9 |
|
9 |
public class SingleSymbolLegend implements VectorialLegend, LegendInfo {
|
|
10 |
public class SingleSymbolLegend implements VectorialLegend, Legend { |
|
10 | 11 |
|
11 |
private FStyle2D symbol;
|
|
12 |
private FSymbol symbol;
|
|
12 | 13 |
private int labelField = -1; |
13 | 14 |
|
14 |
public SingleSymbolLegend(FStyle2D style){
|
|
15 |
public SingleSymbolLegend(FSymbol style){
|
|
15 | 16 |
symbol = style; |
16 | 17 |
} |
17 | 18 |
public SingleSymbolLegend(){ |
18 |
symbol = LegendFactory.DEFAULT_SYMBOL; |
|
19 |
symbol = LegendFactory.DEFAULT_POLYGON_SYMBOL;
|
|
19 | 20 |
} |
20 | 21 |
/** |
21 | 22 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#setDefaultSymbol(FStyle2D) |
22 | 23 |
*/ |
23 |
public void setDefaultSymbol(FStyle2D s) {
|
|
24 |
public void setDefaultSymbol(FSymbol s) {
|
|
24 | 25 |
symbol = s; |
25 | 26 |
} |
26 | 27 |
|
... | ... | |
41 | 42 |
/** |
42 | 43 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getSymbol(int) |
43 | 44 |
*/ |
44 |
public FStyle2D getSymbol(int recordIndex) {
|
|
45 |
public FSymbol getSymbol(int recordIndex) {
|
|
45 | 46 |
return symbol; |
46 | 47 |
} |
47 | 48 |
|
48 | 49 |
/** |
49 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#getDefaultSymbol()
|
|
50 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getDefaultSymbol() |
|
50 | 51 |
*/ |
51 |
public FStyle2D getDefaultSymbol() {
|
|
52 |
public FSymbol getDefaultSymbol() {
|
|
52 | 53 |
return symbol; |
53 | 54 |
} |
54 | 55 |
/** |
55 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#getXMLEntity()
|
|
56 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getXMLEntity() |
|
56 | 57 |
*/ |
57 | 58 |
public XMLEntity getXMLEntity() { |
58 | 59 |
XMLEntity xml=new XMLEntity(); |
... | ... | |
69 | 70 |
} |
70 | 71 |
|
71 | 72 |
/** |
72 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#cloner()
|
|
73 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#cloner() |
|
73 | 74 |
*/ |
74 |
public LegendInfo cloner() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
|
|
75 |
return (LegendInfo)LegendFactory.createFromXML(getXMLEntity());
|
|
75 |
public Legend cloner() throws ClassNotFoundException, InstantiationException, IllegalAccessException { |
|
76 |
return (Legend)LegendFactory.createFromXML(getXMLEntity()); |
|
76 | 77 |
} |
77 | 78 |
|
78 | 79 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/VectorialUniqueValueLegend.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig.fmap.rendering; |
2 | 2 |
|
3 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
3 | 4 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
4 | 5 |
|
5 | 6 |
import com.iver.utiles.XMLEntity; |
... | ... | |
19 | 20 |
private int index = 0; |
20 | 21 |
private int field; |
21 | 22 |
private int labelfield; |
22 |
private FStyle2D defaultSymbol;
|
|
23 |
private FSymbol defaultSymbol;
|
|
23 | 24 |
|
24 | 25 |
/** |
25 | 26 |
* @see com.iver.cit.gvsig.fmap.rendering.UniqueValueLegend#setValueSymbol(java.lang.Object, |
... | ... | |
84 | 85 |
/** |
85 | 86 |
* @see com.iver.cit.gvsig.fmap.rendering.ClassifiedLegend#getSymbols() |
86 | 87 |
*/ |
87 |
public FStyle2D[] getSymbols() {
|
|
88 |
return (FStyle2D[]) symbols.values().toArray(new FStyle2D[0]);
|
|
88 |
public FSymbol[] getSymbols() {
|
|
89 |
return (FSymbol[]) symbols.values().toArray(new FSymbol[0]);
|
|
89 | 90 |
} |
90 | 91 |
|
91 | 92 |
/** |
... | ... | |
98 | 99 |
/** |
99 | 100 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#setDefaultSymbol(com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D) |
100 | 101 |
*/ |
101 |
public void setDefaultSymbol(FStyle2D s) {
|
|
102 |
public void setDefaultSymbol(FSymbol s) {
|
|
102 | 103 |
defaultSymbol = s; |
103 | 104 |
} |
104 | 105 |
|
... | ... | |
136 | 137 |
/** |
137 | 138 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getSymbol(int) |
138 | 139 |
*/ |
139 |
public FStyle2D getSymbol(int recordIndex) {
|
|
140 |
public FSymbol getSymbol(int recordIndex) {
|
|
140 | 141 |
return null; |
141 | 142 |
} |
142 | 143 |
|
143 | 144 |
/** |
144 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#getDefaultSymbol()
|
|
145 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getDefaultSymbol() |
|
145 | 146 |
*/ |
146 |
public FStyle2D getDefaultSymbol() {
|
|
147 |
public FSymbol getDefaultSymbol() {
|
|
147 | 148 |
return null; |
148 | 149 |
} |
149 | 150 |
|
150 | 151 |
/** |
151 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#getXMLEntity()
|
|
152 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getXMLEntity() |
|
152 | 153 |
*/ |
153 | 154 |
public XMLEntity getXMLEntity() { |
154 | 155 |
XMLEntity xml = new XMLEntity(); |
... | ... | |
193 | 194 |
* @throws IllegalAccessException |
194 | 195 |
* @throws InstantiationException |
195 | 196 |
* @throws ClassNotFoundException |
196 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#cloner()
|
|
197 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#cloner() |
|
197 | 198 |
*/ |
198 |
public LegendInfo cloner() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
|
|
199 |
return (LegendInfo)LegendFactory.createFromXML(getXMLEntity());
|
|
199 |
public Legend cloner() throws ClassNotFoundException, InstantiationException, IllegalAccessException { |
|
200 |
return (Legend)LegendFactory.createFromXML(getXMLEntity()); |
|
200 | 201 |
} |
201 | 202 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/Legend.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.rendering; |
|
4 |
|
|
5 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
6 |
import com.iver.utiles.XMLEntity; |
|
7 |
|
|
8 |
/** |
|
9 |
* Informaci?n sobre la leyenda para la representaci?n en la interfaz |
|
10 |
*/ |
|
11 |
public interface Legend { |
|
12 |
/** |
|
13 |
* Obtiene el s?mbolo por defecto de la leyenda |
|
14 |
*/ |
|
15 |
FSymbol getDefaultSymbol(); |
|
16 |
XMLEntity getXMLEntity(); |
|
17 |
Legend cloner() throws ClassNotFoundException, InstantiationException, IllegalAccessException; |
|
18 |
} |
|
0 | 19 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/ColorRamp.java | ||
---|---|---|
1 | 1 |
/* Generated by Together */ |
2 | 2 |
package com.iver.cit.gvsig.fmap.rendering; |
3 | 3 |
|
4 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
4 | 5 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
5 | 6 |
|
6 | 7 |
import com.iver.utiles.StringUtilities; |
... | ... | |
81 | 82 |
/** |
82 | 83 |
* @see com.iver.cit.gvsig.fmap.rendering.ClassifiedLegendInfo#getSymbols() |
83 | 84 |
*/ |
84 |
public FStyle2D[] getSymbols() {
|
|
85 |
public FSymbol[] getSymbols() {
|
|
85 | 86 |
return null; |
86 | 87 |
} |
87 | 88 |
|
... | ... | |
93 | 94 |
} |
94 | 95 |
|
95 | 96 |
/** |
96 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#getDefaultSymbol()
|
|
97 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getDefaultSymbol() |
|
97 | 98 |
*/ |
98 |
public FStyle2D getDefaultSymbol() {
|
|
99 |
public FSymbol getDefaultSymbol() {
|
|
99 | 100 |
return null; |
100 | 101 |
} |
101 | 102 |
|
... | ... | |
113 | 114 |
} |
114 | 115 |
|
115 | 116 |
/** |
116 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#getXMLEntity()
|
|
117 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getXMLEntity() |
|
117 | 118 |
*/ |
118 | 119 |
public XMLEntity getXMLEntity() { |
119 | 120 |
XMLEntity xml = new XMLEntity(); |
... | ... | |
145 | 146 |
} |
146 | 147 |
|
147 | 148 |
/** |
148 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#cloner()
|
|
149 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#cloner() |
|
149 | 150 |
*/ |
150 |
public LegendInfo cloner() {
|
|
151 |
public Legend cloner() { |
|
151 | 152 |
return createFromXML(getXMLEntity()); |
152 | 153 |
} |
153 | 154 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/ClassifiedLegendInfo.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
package com.iver.cit.gvsig.fmap.rendering; |
4 | 4 |
|
5 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D;
|
|
5 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol;
|
|
6 | 6 |
|
7 | 7 |
/** |
8 | 8 |
* Informaci?n de la leyenda para poder representarla gr?ficamente al usuario |
9 | 9 |
*/ |
10 |
public interface ClassifiedLegendInfo extends LegendInfo {
|
|
10 |
public interface ClassifiedLegendInfo extends Legend { |
|
11 | 11 |
/** |
12 | 12 |
* Obtiene las descripciones de las clases que hay en la clasificaci?n |
13 | 13 |
*/ |
... | ... | |
16 | 16 |
/** |
17 | 17 |
* Obtiene los s?mbolos de cada clase de la clasificaci?n para el usuario. |
18 | 18 |
*/ |
19 |
FStyle2D[] getSymbols();
|
|
19 |
FSymbol[] getSymbols();
|
|
20 | 20 |
|
21 | 21 |
/** |
22 | 22 |
* Obtiene los valores relacionados con cada clase de la clasificaci?n |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/RasterUniqueValueLegend.java | ||
---|---|---|
3 | 3 |
package com.iver.cit.gvsig.fmap.rendering; |
4 | 4 |
|
5 | 5 |
|
6 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
6 | 7 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
7 | 8 |
import com.iver.utiles.XMLEntity; |
8 | 9 |
|
... | ... | |
62 | 63 |
/** |
63 | 64 |
* @see com.iver.cit.gvsig.fmap.rendering.ClassifiedLegendInfo#getSymbols() |
64 | 65 |
*/ |
65 |
public FStyle2D[] getSymbols() {
|
|
66 |
public FSymbol[] getSymbols() {
|
|
66 | 67 |
return null; |
67 | 68 |
} |
68 | 69 |
|
... | ... | |
74 | 75 |
} |
75 | 76 |
|
76 | 77 |
/** |
77 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#getDefaultSymbol()
|
|
78 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getDefaultSymbol() |
|
78 | 79 |
*/ |
79 |
public FStyle2D getDefaultSymbol() {
|
|
80 |
public FSymbol getDefaultSymbol() {
|
|
80 | 81 |
return null; |
81 | 82 |
} |
82 | 83 |
|
83 | 84 |
/** |
84 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#getXMLEntity()
|
|
85 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getXMLEntity() |
|
85 | 86 |
*/ |
86 | 87 |
public XMLEntity getXMLEntity() { |
87 | 88 |
XMLEntity xml=new XMLEntity(); |
... | ... | |
94 | 95 |
return ruvl; |
95 | 96 |
} |
96 | 97 |
/** |
97 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#cloner()
|
|
98 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#cloner() |
|
98 | 99 |
*/ |
99 |
public LegendInfo cloner() {
|
|
100 |
public Legend cloner() { |
|
100 | 101 |
return createFromXML(getXMLEntity()); |
101 | 102 |
} |
102 | 103 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/VectorialLegend.java | ||
---|---|---|
1 | 1 |
/* Generated by Together */ |
2 | 2 |
package com.iver.cit.gvsig.fmap.rendering; |
3 | 3 |
|
4 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
4 | 5 |
import com.iver.cit.gvsig.fmap.layers.FRecordset; |
5 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
|
6 | 6 |
|
7 | 7 |
import com.iver.utiles.XMLEntity; |
8 | 8 |
|
... | ... | |
24 | 24 |
* |
25 | 25 |
* @return DOCUMENT ME! |
26 | 26 |
*/ |
27 |
FStyle2D getSymbol(int recordIndex);
|
|
27 |
FSymbol getSymbol(int recordIndex);
|
|
28 | 28 |
|
29 | 29 |
/** |
30 | 30 |
* Establece el s?mbolo por defecto del Legend. En un Legend de s?mbolo |
... | ... | |
32 | 32 |
* |
33 | 33 |
* @param s DOCUMENT ME! |
34 | 34 |
*/ |
35 |
void setDefaultSymbol(FStyle2D s);
|
|
35 |
void setDefaultSymbol(FSymbol s);
|
|
36 | 36 |
|
37 | 37 |
/** |
38 | 38 |
* Establece el campo por el que se etiqueta. -1 quita el etiquetado |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/styling/SymbolPreviewDrawer.java | ||
---|---|---|
6 | 6 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
7 | 7 |
import com.iver.cit.gvsig.fmap.core.ShapeFactory; |
8 | 8 |
import com.iver.cit.gvsig.fmap.rendering.LegendFactory; |
9 |
import com.iver.cit.gvsig.fmap.rendering.LegendInfo;
|
|
9 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
|
10 | 10 |
|
11 | 11 |
import org.geotools.renderer.style.Style2D; |
12 | 12 |
|
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/VectorialIntervalLegend.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.HashMap; |
4 | 4 |
|
5 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
5 | 6 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
6 | 7 |
import com.iver.utiles.XMLEntity; |
7 | 8 |
|
... | ... | |
17 | 18 |
private int index = 0; |
18 | 19 |
private int field; |
Also available in: Unified diff