2 Replies Latest reply on Mar 22, 2012 1:56 PM by 916491

    Applying a gui file on an integration


      I am attempting an integration of Autovue using the web server and a custom DMS. Since we want only to allow Autovue to see a single document each time, which is provided at launch time, we wish to disable the options in the GUI to open files - we don't want the users to browse in the repository, and by default the "File open" allows to open a file from your own computer -.

      After searching for the method to do this, we concluded that the easiest way was to generate a custom .gui file based on the default.gui one, remove the "File open" items both from File and from the button GUI, and load it in our applet using the parameter GUIFILE. But the default GUI still loaded. Next, we tried to use JVue method to do so during configuration, also to no avail:

      +public class VueApplet extends com.cimmetry.jvue.JVue {+

      +     public void init(){+
      +          super.init();+
      +          +
      +          String filePath = "******/default.gui";+
      +          String s = null;+
      +          File f = new File(filePath);+
      +     FileInputStream fin;+
      +          try {+
      +               fin = new FileInputStream(f);+
      +          +
      +          byte[] buffer = new byte[(int) f.length()];+

      +          new DataInputStream(fin).readFully(buffer);+
      +               +
      +          fin.close();+
      +          s = new String(buffer, "UTF-8");+
      +     } catch (IOException e) {+
      +               // TODO Auto-generated catch block+
      +               e.printStackTrace();+
      +          }+
      +          +
      +          // At this point, s contains the appropaite default.gui string from the file+
      +          setGUI(s);+
      +          +

      +          String whatGUI = getGuiFile();+
      +          System.out.print(whatGUI); // At this point, we have null value for whatGUI, so s was not loaded+


      So it seems that my applet refuses to take a configuration file from any of the two described methods. So here, I have a dual question:

      1.- How to remove the GUI elements I described?
      2.- And if this is the method to do it, what am I missing?

      Thank you very much.