Revision 41398 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolSelector.java
SymbolSelector.java | ||
---|---|---|
77 | 77 |
import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport; |
78 | 78 |
import org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol; |
79 | 79 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
80 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol_v2; |
|
80 | 81 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol; |
81 | 82 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager; |
82 | 83 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolPreferences; |
... | ... | |
880 | 881 |
* Invoked when the SAVE button is pressed |
881 | 882 |
*/ |
882 | 883 |
protected void savePressed() { |
884 |
Object selected = getSelectedObject(); |
|
883 | 885 |
if (getSelectedObject() ==null) { |
884 | 886 |
return; |
885 | 887 |
} |
... | ... | |
907 | 909 |
JPanel accessory = new JPanel(new FlowLayout(FlowLayout.LEADING, 5, 5)); |
908 | 910 |
accessory.add(new JLabel(Messages.getText("enter_description"))); |
909 | 911 |
JTextField txtDesc = new JTextField(25); |
912 |
if( selected instanceof ISymbol ) { |
|
913 |
txtDesc.setText(((ISymbol)selected).getDescription()); |
|
914 |
} |
|
915 |
if( selected instanceof ISymbol_v2 ) { |
|
916 |
jfc.setSelectedFile(new File(((ISymbol_v2)selected).getID())); |
|
917 |
} |
|
918 |
|
|
910 | 919 |
accessory.add(txtDesc); |
911 | 920 |
jfc.setAccessory(accessory); |
912 | 921 |
if (jfc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) { |
Also available in: Unified diff