Example #1
0
 /**
  * This method opens a new explorer window (with "save all peers" properties)
  *
  * @param none No parameters needed
  * @return no return value
  */
 public static void saveAll() {
   if (explorer != null) {
     explorer.close();
   }
   buttonString = saveString;
   init();
 }
Example #2
0
 /**
  * This method opens a new explorer window (with "load" properties)
  *
  * @param none No parameters needed
  * @return none no return value
  */
 public static void load() {
   if (explorer != null) {
     explorer.close();
   }
   buttonString = loadString;
   init();
 }
Example #3
0
 /**
  * This method opens a new explorer window (with "save one peer" properties)
  *
  * @param peerName Name of the peer you want to save
  * @return no return value
  */
 public static void savePeer(String peerName) {
   if (explorer != null) {
     explorer.close();
   }
   Explorer.fieldName = peerName;
   buttonString = savePeerString;
   init();
 }
Example #4
0
 /**
  * This method opens a new explorer window (with "browse" properties). Choose the mode (DIRECTORY
  * or FILE) to browse for directories or files.
  *
  * @param text textfield to fill with file or directory
  * @param mode specifies if you browse for DIRECTORY or FILE
  * @return none no return value
  */
 public static void browse(Text text, int mode) {
   if (explorer != null) {
     explorer.close();
   }
   Explorer.mode = mode;
   buttonString = okString;
   Explorer.text = text;
   init();
 }
Example #5
0
 /**
  * This method opens a new explorer window
  *
  * @param none No parameters needed
  * @return no return value
  */
 private static void init() {
   explorer = new Explorer();
   Controller.setExplorer(explorer);
   explorer.setBlockOnOpen(true);
   explorer.open();
 }
Example #6
0
 /**
  * This method opens a new basic explorer window
  *
  * @param none No parameters needed
  * @return no return value
  */
 public static void main(String[] args) {
   Explorer w = new Explorer();
   w.setBlockOnOpen(true);
   w.open();
   Display.getCurrent().dispose();
 }