Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }