Revision 38781
branches/v2_0_0_prep/applications/appgvSIG/config/config.xml | ||
---|---|---|
878 | 878 |
/> |
879 | 879 |
|
880 | 880 |
</extension> |
881 |
|
|
882 |
<extension |
|
883 |
class-name="org.gvsig.app.extension.BrowseSymbolsExtension" |
|
884 |
description="" active="true"> |
|
881 | 885 |
|
886 |
<action |
|
887 |
name="tools-symbology-browse-symbols" |
|
888 |
label="_Browse_symbols" |
|
889 |
tooltip="_Browse_symbols" |
|
890 |
action-command="tools-symbology-browse-symbols" |
|
891 |
icon="tools-symbology-browse-symbols" |
|
892 |
position="900400050" |
|
893 |
accelerator="" |
|
894 |
/> |
|
895 |
<menu |
|
896 |
name="tools-symbology-browse-symbols" |
|
897 |
text="tools/Symbols/Browse symbols" |
|
898 |
/> |
|
899 |
</extension> |
|
900 |
|
|
882 | 901 |
</extensions> |
883 | 902 |
|
884 | 903 |
</plugin-config> |
branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/extension/BrowseSymbolsExtension.java | ||
---|---|---|
1 |
package org.gvsig.app.extension; |
|
2 |
|
|
3 |
import org.gvsig.andami.plugins.Extension; |
|
4 |
import org.gvsig.app.ApplicationLocator; |
|
5 |
import org.gvsig.app.ApplicationManager; |
|
6 |
import org.gvsig.app.gui.styling.SymbolSelector; |
|
7 |
import org.slf4j.Logger; |
|
8 |
import org.slf4j.LoggerFactory; |
|
9 |
|
|
10 |
public class BrowseSymbolsExtension extends Extension { |
|
11 |
|
|
12 |
@SuppressWarnings("unused") |
|
13 |
private static Logger logger = LoggerFactory.getLogger(BrowseSymbolsExtension.class); |
|
14 |
|
|
15 |
public void initialize() { |
|
16 |
// Do nothing |
|
17 |
} |
|
18 |
public void execute(String actionCommand) { |
|
19 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
20 |
|
|
21 |
if("tools-symbology-browse-symbols".equalsIgnoreCase(actionCommand)) { |
|
22 |
application.getUIManager().addWindow(SymbolSelector.createSymbolBrowser()); |
|
23 |
} |
|
24 |
} |
|
25 |
|
|
26 |
public boolean isEnabled() { |
|
27 |
return true; |
|
28 |
} |
|
29 |
|
|
30 |
public boolean isVisible() { |
|
31 |
return true; |
|
32 |
} |
|
33 |
|
|
34 |
} |
|
0 | 35 |
branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/ApplicationManager.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.app; |
29 | 29 |
|
30 |
import java.awt.Component; |
|
30 | 31 |
import java.util.List; |
31 | 32 |
|
32 | 33 |
import org.cresques.cts.IProjection; |
33 |
|
|
34 | 34 |
import org.gvsig.about.AboutManager; |
35 | 35 |
import org.gvsig.andami.ui.mdiFrame.ThreadSafeDialogs; |
36 | 36 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
... | ... | |
304 | 304 |
* JOptionPane.WARNING_MESSAGE, JOptionPane.INFORMATION_MESSAGE |
305 | 305 |
*/ |
306 | 306 |
public void message(String message, int message_type); |
307 |
|
|
308 |
public String translate(String message, String... args) ; |
|
307 | 309 |
|
310 |
public Component getRootComponent(); |
|
311 |
|
|
308 | 312 |
} |
branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/imp/DefaultAppgvSIGManager.java | ||
---|---|---|
35 | 35 |
import java.util.Iterator; |
36 | 36 |
import java.util.List; |
37 | 37 |
|
38 |
import javax.swing.JComponent; |
|
39 |
|
|
40 | 38 |
import org.cresques.cts.IProjection; |
41 | 39 |
import org.gvsig.about.AboutLocator; |
42 | 40 |
import org.gvsig.about.AboutManager; |
... | ... | |
464 | 462 |
MainFrame main = PluginServices.getMainFrame(); |
465 | 463 |
return main.createComponentWithParams(theClass, parameters); |
466 | 464 |
} |
465 |
|
|
466 |
public String translate(String message, String... args) { |
|
467 |
String msg = message; |
|
468 |
if (msg == null) { |
|
469 |
return ""; |
|
470 |
} |
|
471 |
msg = org.gvsig.i18n.Messages.getText(msg, args); |
|
472 |
if (msg == null) { |
|
473 |
msg = "_" + message.replace("_", " "); |
|
474 |
} |
|
475 |
return msg; |
|
476 |
} |
|
477 |
|
|
478 |
public Component getRootComponent() { |
|
479 |
return (Component) PluginServices.getMainFrame(); |
|
480 |
} |
|
467 | 481 |
} |
branches/v2_0_0_prep/libraries/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/MultiShapeSymbolSelector.java | ||
---|---|---|
57 | 57 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol; |
58 | 58 |
|
59 | 59 |
|
60 |
/** |
|
61 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
|
62 |
*/ |
|
63 | 60 |
public class MultiShapeSymbolSelector extends JPanel implements ISymbolSelector { |
64 | 61 |
/** |
65 | 62 |
* |
... | ... | |
71 | 68 |
private WindowInfo wi; |
72 | 69 |
private JTabbedPane tabbedPane; |
73 | 70 |
|
71 |
public static ISymbolSelector createSymbolBrowser() { |
|
72 |
WindowInfo winfo = new WindowInfo(WindowInfo.RESIZABLE|WindowInfo.MAXIMIZABLE|WindowInfo.ICONIFIABLE); |
|
73 |
winfo.setWidth(706); |
|
74 |
winfo.setHeight(500); |
|
75 |
winfo.setTitle(Messages.getText("symbols_browser")); |
|
76 |
return new MultiShapeSymbolSelector(winfo); |
|
77 |
} |
|
78 |
|
|
79 |
private MultiShapeSymbolSelector(WindowInfo wi) { |
|
80 |
this((Object)null); |
|
81 |
this.wi = wi; |
|
82 |
} |
|
83 |
|
|
74 | 84 |
MultiShapeSymbolSelector(Object currSymbol) { |
75 | 85 |
IMultiShapeSymbol sym = (IMultiShapeSymbol) currSymbol; |
76 |
markerSelector = (SymbolSelector) SymbolSelector. |
|
77 |
createSymbolSelector( |
|
78 |
sym.getMarkerSymbol(), Geometry.TYPES.POINT); |
|
79 |
lineSelector = (SymbolSelector) SymbolSelector. |
|
80 |
createSymbolSelector( |
|
81 |
sym.getLineSymbol(), Geometry.TYPES.CURVE); |
|
82 |
fillSelector = (SymbolSelector) SymbolSelector. |
|
83 |
createSymbolSelector( |
|
84 |
sym.getFillSymbol(), Geometry.TYPES.SURFACE); |
|
86 |
if (sym == null) { |
|
87 |
markerSelector = (SymbolSelector) SymbolSelector |
|
88 |
.createSymbolSelector(null, Geometry.TYPES.POINT); |
|
89 |
lineSelector = (SymbolSelector) SymbolSelector |
|
90 |
.createSymbolSelector(null, Geometry.TYPES.CURVE); |
|
91 |
fillSelector = (SymbolSelector) SymbolSelector |
|
92 |
.createSymbolSelector(null, Geometry.TYPES.SURFACE); |
|
93 |
} else { |
|
94 |
markerSelector = (SymbolSelector) SymbolSelector |
|
95 |
.createSymbolSelector(sym.getMarkerSymbol(), |
|
96 |
Geometry.TYPES.POINT); |
|
97 |
lineSelector = (SymbolSelector) SymbolSelector |
|
98 |
.createSymbolSelector(sym.getLineSymbol(), |
|
99 |
Geometry.TYPES.CURVE); |
|
100 |
fillSelector = (SymbolSelector) SymbolSelector |
|
101 |
.createSymbolSelector(sym.getFillSymbol(), |
|
102 |
Geometry.TYPES.SURFACE); |
|
103 |
} |
|
85 | 104 |
initialize(); |
86 | 105 |
} |
87 | 106 |
|
... | ... | |
131 | 150 |
} |
132 | 151 |
|
133 | 152 |
public Object getWindowProfile() { |
134 |
return WindowInfo.DIALOG_PROFILE; |
|
153 |
if( wi.isModal() ) { |
|
154 |
return WindowInfo.DIALOG_PROFILE; |
|
155 |
} |
|
156 |
return WindowInfo.EDITOR_PROFILE; |
|
135 | 157 |
} |
136 | 158 |
} |
branches/v2_0_0_prep/libraries/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolSelector.java | ||
---|---|---|
1061 | 1061 |
} |
1062 | 1062 |
} |
1063 | 1063 |
|
1064 |
public static ISymbolSelector createSymbolBrowser() { |
|
1065 |
return MultiShapeSymbolSelector.createSymbolBrowser(); |
|
1066 |
} |
|
1067 |
|
|
1064 | 1068 |
public static ISymbolSelector createSymbolSelector(Object currSymbol, int shapeType) { |
1065 | 1069 |
return createSymbolSelector(currSymbol, shapeType, null); |
1066 | 1070 |
} |
Also available in: Unified diff