Ejemplo n.º 1
0
 private void openVPFCoveragePanel(VPFDatabase db, VPFLayer layer) {
   VPFCoveragePanel panel = new VPFCoveragePanel(getWwd(), db);
   panel.setLayer(layer);
   JFrame frame = new JFrame(db.getName());
   frame.setResizable(true);
   frame.setAlwaysOnTop(true);
   frame.add(panel);
   frame.pack();
   WWUtil.alignComponent(this, frame, AVKey.CENTER);
   frame.setVisible(true);
 }
Ejemplo n.º 2
0
  public static VPFDatabase readDatabase(File file) {
    if (file == null) {
      String message = Logging.getMessage("nullValue.FileIsNull");
      Logging.logger().severe(message);
      throw new IllegalArgumentException(message);
    }

    if (!file.exists()) {
      return null;
    }

    try {
      return VPFDatabase.fromFile(file.getPath());
    } catch (WWRuntimeException e) {
      // Exception already logged by VPFLibrary.
      return null;
    }
  }