コード例 #1
0
ファイル: CutPanelView.java プロジェクト: OceanAtlas/JOA
 /**
  * Resets the current pointer collection, notifying the filters, and optionally resetting the
  * current set of filtering constraints (extents).
  *
  * @param pc new pointer collection to be displayed and presented for filtering
  * @param resetFilteringConstraints boolean flag, if true, then set all filtering constaints
  *     (extents) to match the extremes of the data in the pointer collection
  */
 public void setPointerCollection(PointerCollectionGroup pcg, boolean resetFilteringConstraints) {
   if (pcg == null) return;
   mCurrPC = pcg;
   fdm.newPointerCollection(mCurrPC);
   if (resetFilteringConstraints) {
     filterConstraintsMgr.resetFilterConstraints(
         new FilterConstraints(
             NdEditFormulas.GetPrettyRange(mCurrPC.getMinMaxLat(), -90.0, 90.0),
             NdEditFormulas.GetPrettyRange(mCurrPC.getMinMaxLon(), -180.0, 180.0),
             NdEditFormulas.GetPrettyRange(mCurrPC.getMinMaxDepth()),
             NdEditFormulas.GetPrettyRange(mCurrPC.getMinMaxTime()),
             null,
             null));
   }
 }
コード例 #2
0
ファイル: UserSettings.java プロジェクト: OceanAtlas/JOA
 public void save(String filename) {
   try {
     File propFile = new File(NdEditFormulas.getSupportPath(), filename);
     FileOutputStream f = new FileOutputStream(propFile);
     internalToProperties().save(f, "ndEdit User Settings");
   } catch (Exception e) {
     String errmsg = new String("Cannot open FileOutputStream: " + filename);
     JOptionPane.showMessageDialog(null, errmsg, "ERROR", JOptionPane.ERROR_MESSAGE);
   }
 }
コード例 #3
0
ファイル: UserSettings.java プロジェクト: OceanAtlas/JOA
 public void load(String filename) {
   FileInputStream f;
   try {
     File propFile = new File(NdEditFormulas.getSupportPath(), filename);
     f = new FileInputStream(propFile);
   } catch (Exception e) {
     System.out.println("Exception: " + e.toString());
     String errmsg = new String("Cannot open input stream (or load properties): " + filename);
     JOptionPane.showMessageDialog(null, errmsg, "ERROR", JOptionPane.ERROR_MESSAGE);
     return;
   }
   Properties props = new Properties();
   try {
     props.load(f);
   } catch (Exception e) {
     System.out.println("Exception: " + e.toString());
     String errmsg = new String("Cannot or load properties from file: " + filename);
     JOptionPane.showMessageDialog(null, errmsg, "ERROR", JOptionPane.ERROR_MESSAGE);
     return;
   }
   propertiesToInternal(props);
 }