use of org.geosdi.geoplatform.gui.configuration.action.GeoPlatformAction in project geo-platform by geosdi.
the class ManageRolesWidget method createGuiComponentDetail.
private GuiComponentDetail createGuiComponentDetail(String componentId) {
GuiComponentDetail gc = new GuiComponentDetail();
gc.setComponentId(componentId);
// gc.setDescription(action.get....()); // TODO Manage description
// TODO Manage icon
MenuActionRegistar menuRegistar = BasicGinInjector.MainInjector.getInstance().getMenuActionRegistar();
GeoPlatformAction action = menuRegistar.get(componentId);
if (action != null) {
if (action instanceof MenuBaseAction) {
AbstractImagePrototype image = ((MenuBaseAction) action).getImage();
if (image != null) {
gc.setImage(image);
}
// }else{
// action = ToolbarActionRegistar.get(entry.getKey(), null)
}
}
if (gc.getImage() == null) {
gc.setImage(defaultImage);
}
return gc;
}
Aggregations