Revision 47426 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/actions/ReportStoreAction.java
ReportStoreAction.java | ||
---|---|---|
19 | 19 |
import org.gvsig.fmap.dal.swing.DALActionFactory.DALActionContext; |
20 | 20 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
21 | 21 |
import org.gvsig.fmap.dal.swing.DataSwingManager; |
22 |
import static org.gvsig.fmap.dal.swing.impl.DefaultDALSwingLibrary.LIBRARY_NAME; |
|
22 | 23 |
import static org.gvsig.fmap.dal.swing.impl.actions.ReportUtils.getReportActions; |
23 | 24 |
import static org.gvsig.fmap.dal.swing.impl.actions.ReportUtils.getReports; |
25 |
import org.gvsig.fmap.dal.swing.impl.searchpanel.DefaultSearchPanel; |
|
24 | 26 |
import org.gvsig.fmap.dal.swing.report.ReportAction; |
25 | 27 |
import org.gvsig.fmap.dal.swing.report.ReportActionFactory; |
26 | 28 |
import org.gvsig.fmap.dal.swing.report.ReportActionFactory.ReportCustomActionFactory; |
27 | 29 |
import org.gvsig.tools.ToolsLocator; |
28 | 30 |
import org.gvsig.tools.i18n.I18nManager; |
29 | 31 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
32 |
import org.gvsig.tools.swing.api.ToolsSwingUtils; |
|
30 | 33 |
import org.gvsig.tools.swing.icontheme.IconTheme; |
31 | 34 |
import org.slf4j.Logger; |
32 | 35 |
import org.slf4j.LoggerFactory; |
... | ... | |
75 | 78 |
public static void selfRegister() { |
76 | 79 |
DataSwingManager dalSwingManager = DALSwingLocator.getSwingManager(); |
77 | 80 |
dalSwingManager.registerStoreAction(new ReportStoreActionFactory()); |
78 |
String[][] iconNames = new String[][]{ |
|
79 |
new String[]{"Report", "report-select-reports"}
|
|
80 |
};
|
|
81 |
IconTheme theme = ToolsSwingLocator.getIconThemeManager().getCurrent();
|
|
82 |
for (String[] icon : iconNames) {
|
|
83 |
URL url = ReportStoreAction.class.getResource("images/" + icon[1] + ".png");
|
|
84 |
theme.registerDefault("Report", icon[0], icon[1], null, url);
|
|
85 |
} |
|
81 |
|
|
82 |
ToolsSwingUtils.registerIcons(
|
|
83 |
ReportStoreAction.class,
|
|
84 |
"images",
|
|
85 |
LIBRARY_NAME,
|
|
86 |
new String[]{"storeaction", "storeaction-reports-select"}
|
|
87 |
);
|
|
88 |
|
|
86 | 89 |
} |
87 | 90 |
|
88 | 91 |
} |
... | ... | |
107 | 110 |
); |
108 | 111 |
this.putValue( |
109 | 112 |
Action.SMALL_ICON, |
110 |
ToolsSwingLocator.getIconThemeManager().getCurrent().get("report-select-reports")
|
|
113 |
ToolsSwingLocator.getIconThemeManager().getCurrent().get("storeaction-reports-select")
|
|
111 | 114 |
); |
112 | 115 |
} |
113 | 116 |
|
Also available in: Unified diff