Ejemplo n.º 1
0
 public static ICrsUIFactory getUIFactory() {
   ICrsUIFactory factory;
   try {
     factory = (ICrsUIFactory) uiFactory.newInstance();
   } catch (InstantiationException e) {
     PluginServices.getLogger()
         .error("Error creating CRS UI factory. Switching to default factory", e);
     factory = new CrsUIFactory();
   } catch (IllegalAccessException e) {
     PluginServices.getLogger()
         .error("Error creating CRS UI factory. Switching to default factory", e);
     factory = new CrsUIFactory();
   }
   return factory;
 }
Ejemplo n.º 2
0
 public static CRSSelectPanel getPanel(CoordinateReferenceSystem crs) {
   CRSSelectPanel panel = null;
   Class<?>[] args = {CoordinateReferenceSystem.class};
   Object[] params = {crs};
   try {
     panel = (CRSSelectPanel) panelClass.getConstructor(args).newInstance(params);
   } catch (IllegalArgumentException e) {
     PluginServices.getLogger().error("Error creating CRS selection button", e);
   } catch (SecurityException e) {
     PluginServices.getLogger().error("Error creating CRS selection button", e);
   } catch (InstantiationException e) {
     PluginServices.getLogger().error("Error creating CRS selection button", e);
   } catch (IllegalAccessException e) {
     PluginServices.getLogger().error("Error creating CRS selection button", e);
   } catch (InvocationTargetException e) {
     PluginServices.getLogger().error("Error creating CRS selection button", e);
   } catch (NoSuchMethodException e) {
     PluginServices.getLogger().error("Error creating CRS selection button", e);
   }
   return panel;
 }