gov.nasa.pds.ltdt.gui.util
Class ProjectUtility

java.lang.Object
  extended by gov.nasa.pds.ltdt.gui.util.ProjectUtility

public class ProjectUtility
extends java.lang.Object

Utilities for project management related functions.

Author:
jwang

Constructor Summary
ProjectUtility()
           
 
Method Summary
static boolean keepCurrentTemplate(java.util.Properties props, MainWindow window)
          Prompts user of their wish to keep the existing template.
static void openBlankPage(java.util.Properties props, MainWindow window)
          Open an editing are for fragment template, which is blank
static void openFile(java.util.Properties props, MainWindow window, boolean returning)
          Prepare to open a local file.
static void openURL(java.util.Properties props, MainWindow window, boolean returning)
          Prepare to open a URL
static int openURL(java.util.Properties props, MainWindow window, java.net.URL url)
          Open a named local or remote file through url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectUtility

public ProjectUtility()
Method Detail

openFile

public static void openFile(java.util.Properties props,
                            MainWindow window,
                            boolean returning)
Prepare to open a local file. The file location is converted to URL for with file:/ as protocol

Parameters:
returning - This is a boolean flag to signal whether this method was called from a new reuqest or as an error retry false - a new request selected from the menu true - invoked internally due to invalid entry

openURL

public static void openURL(java.util.Properties props,
                           MainWindow window,
                           boolean returning)
Prepare to open a URL


openURL

public static int openURL(java.util.Properties props,
                          MainWindow window,
                          java.net.URL url)
Open a named local or remote file through url.

Parameters:
url -
Returns:
0=Successful -1=error

openBlankPage

public static void openBlankPage(java.util.Properties props,
                                 MainWindow window)
Open an editing are for fragment template, which is blank


keepCurrentTemplate

public static boolean keepCurrentTemplate(java.util.Properties props,
                                          MainWindow window)
Prompts user of their wish to keep the existing template. true - keep the template false - overwrite the template or don't care (possible due to no template or blank template)

Parameters:
props -
Returns:
true to keep the template, false to overwrite. Default is true.


Copyright © 2005-2008 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.