Package com.jeta.forms.components.panel

Examples of com.jeta.forms.components.panel.FormPanel


    }
   
    InputStream resource = (InputStream)this.getClass().getResourceAsStream("/MainForm.jfrm");
    System.out.println("Resource: " + resource);
   
    FormPanel panel = new FormPanel( resource );      
    getContentPane().add( panel );
   
    // Configure the GUI-components
    ((RoutinesTable)panel.getTable("routinesTable")).setRoutines(routines);

   
    updateTitle();
   
  }
View Full Code Here


    _yAxisSeenMinMax = new float[] { Float.MAX_VALUE, Float.MIN_VALUE };
  }

  private void initCtrlPanel() {
    try {
      _ctrlPanel = new FormPanel(getClass().getResourceAsStream(
          "ScopeControls.jfrm"));
    } catch (FormException e) {
      throw new RuntimeException(e);
    }
View Full Code Here

            args
        )
    );
    setResizable(false);
   
    FormPanel pane = new FormPanel("be/xtnd/commons/gui/descriptions/about.jfrm");

    GuiCommons.createHeader(pane, "medlogo", bundle);
   
    auteur = pane.getLabel("auteur");
    auteur.setText(bundle.getString("appli.author"));
   
    auteur_label = pane.getLabel("auteur_label");
    auteur_label.setText(CommonsI18n.tr("Author:"));
   
    date = pane.getLabel("date");
    date.setText(bundle.getString("appli.date"));
   
    date_label = pane.getLabel("date_label");
    date_label.setText(CommonsI18n.tr("Date:"));
   
    ecran = pane.getLabel("ecran");
    Dimension tailleEcran = Toolkit.getDefaultToolkit().getScreenSize();
    int scrHauteur = (int)tailleEcran.getHeight();
    int scrLargeur = (int)tailleEcran.getWidth();
    ecran.setText(scrLargeur+"x"+scrHauteur+" pixels");
   
    ecran_label = pane.getLabel("ecran_label");
    ecran_label.setText(CommonsI18n.tr("Screen resolution:"));
   
    systeme = pane.getLabel("systeme");
    String osname = System.getProperty ( "os.name" );
    String osversion = System.getProperty ( "os.version" );
    String osarch = System.getProperty( "os.arch" );
    systeme.setText(osname+" - "+osversion+"("+osarch+")");
   
    systeme_label = pane.getLabel("systeme_label");
    systeme_label.setText(CommonsI18n.tr("System:"));
   
    java = pane.getLabel("java");
    String javaversion = System.getProperty( "java.version" );
    String javahome = System.getProperty( "java.home" );
    java.setText(javaversion+" ("+javahome+")");
   
    java_label = pane.getLabel("java_label");
    java_label.setText(CommonsI18n.tr("Java:"));
   
    vendeur = pane.getLabel("vendeur");
    String javavendor = System.getProperty( "java.vendor" );
    String javaurl = System.getProperty( "java.vendor.url" );
    vendeur.setText(javavendor+"("+javaurl+")");
   
    vendeur_label = pane.getLabel("vendeur_label");
    vendeur_label.setText(CommonsI18n.tr("vendor:"));
   
    locale = pane.getLabel("locale");
    String lang = Locale.getDefault().getDisplayName();
    locale.setText(lang);
   
    locale_label = pane.getLabel("locale_label");
    locale_label.setText(CommonsI18n.tr("Locale:"));
   
    bouton_ok = (JButton)pane.getButton("bouton_ok");
    bouton_ok.setText(CommonsI18n.tr("Ok"));
    bouton_ok.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e) {
                  dispose();
              }
    });
   
    bouton_systeme = (JButton)pane.getButton("bouton_systeme");
    bouton_systeme.setText(CommonsI18n.tr("System..."));
    bouton_systeme.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              new ProprietesSysteme();
            }
View Full Code Here

   *
   * @param frame JInternalFrame à laquelle doivent être ajoutés les boutons
   * @param okayEvent listener du bouton ok
   */
  public void createButtonBar(JInternalFrame frame, ActionListener okayEvent){
    FormPanel pane = new FormPanel( "be/xtnd/commons/gui/descriptions/buttons_bar.jfrm" );

    JButton okay = (JButton)pane.getButton("okay");
    okay.setText(CommonsI18n.tr("Okay"));
    okay.addActionListener(okayEvent);
    frame.getRootPane().setDefaultButton(okay);
   
    JButton cancel = (JButton)pane.getButton("cancel");
    cancel.setText(CommonsI18n.tr("Cancel"));
    cancel.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent e){
        MainGui.desktop.getSelectedFrame().dispose();
      }
View Full Code Here

    public Databases(){
        super();
        super.setLocationRelativeTo(this.getParent());
      PropertyConfigurator.configure(ClassLoader.getSystemResource("be/xtnd/db_updater/log4j.properties"));

        FormPanel pane = new FormPanel( "be/xtnd/commons/gui/descriptions/sql_databases.jfrm" );

        title = (TitledSeparator)pane.getComponentByName("title");
        title.setText(CommonsI18n.tr("Browse databases"));

        db_title = (TitledSeparator)pane.getComponentByName("db_title");
        db_title.setText(CommonsI18n.tr("Database creation (root only)"));

        host_label = pane.getLabel("host_label");
        host_label.setText(CommonsI18n.tr("Host"));
        host = pane.getTextField("host");
        host.setText(host_value);
       
        port_label = pane.getLabel("port_label");
        port_label.setText(CommonsI18n.tr("Port"));
        port = pane.getTextField("port");
        port.setText(port_value);
       
        user_label = pane.getLabel("user_label");
        user_label.setText(CommonsI18n.tr("User name"));
        user = pane.getTextField("user");
        user.setText(user_value);
       
        passe_label = pane.getLabel("passe_label");
        passe_label.setText(CommonsI18n.tr("Password"));
        passe = (JPasswordField)pane.getComponentByName("passe");
        passe.setText(passe_value);
       
        args_label = pane.getLabel("args_label");
        args_label.setText(CommonsI18n.tr("Arguments"));
        args = pane.getTextField("args");
        args.setText(args_value);       
       
        connect = (JButton) pane.getButton("connect");
        connect.setText(CommonsI18n.trc("Connection button (text)", "Connection"));
        connect.setToolTipText(CommonsI18n.trc("Connection button (tooltip)", "Connection to the database with parameters you've entered"));
        connect.setMnemonic(CommonsI18n.trc("Connection button (mnemonic)", "o").charAt(0));
        connect.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
          host_value = host.getText();
          port_value = port.getText();
          user_value = user.getText();
          passe_value = new String(passe.getPassword());
          args_value = args.getText();
         
          sql_server = buildSqlServer();
         
          connect();
          initTree(tree);
        }
        });
       
        select = (JButton) pane.getButton("select");
        select.setText(CommonsI18n.trc("Select button (text)", "Select"));
        select.setToolTipText(CommonsI18n.trc("Select button (tooltip)", "Choose a database in tree"));
        select.setMnemonic(CommonsI18n.trc("Select button (mnemonic)", "s").charAt(0));
        select.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
          TreePath[] paths = tree.getSelectionPaths();
          component.setText(paths[0].getLastPathComponent().toString());
          dispose();
        }
      });
       
        quit = (JButton) pane.getButton("quit");
        quit.setText(CommonsI18n.trc("Close button (text)", "Close"));
        quit.setToolTipText(CommonsI18n.trc("Close button (tooltip)", "Close window without selecting any database"));
        quit.setMnemonic(CommonsI18n.trc("Close button (mnemonic)", "c").charAt(0));
        quit.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
          db.disconnect();
          dispose();
        }
        });
       
        tree = pane.getTree("databases");
        initTree(tree);

        create_label = pane.getLabel("create_label");
        create_label.setText(CommonsI18n.tr("Enter a name"));
        create = pane.getTextField("create");

        create_user_label = pane.getLabel("create_user_label");
        create_user_label.setText(CommonsI18n.tr("User name"));
        create_user_label.setEnabled(false);
        create_user = pane.getTextField("create_user");
        create_user.setEnabled(false);
       
        create_password_label = pane.getLabel("create_password_label");
        create_password_label.setText(CommonsI18n.tr("Password"));
        create_password_label.setEnabled(false);
        create_password = (JPasswordField)pane.getComponentByName("create_password");
        create_password.setEnabled(false);
       
        enable_user = pane.getCheckBox("enable_user");
        enable_user.setText(CommonsI18n.tr("Save user"));
        enable_user.setToolTipText(CommonsI18n.tr("If active, user and its associated password will be saved.\nUser will get utilisation permissions on the database."));
        enable_user.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
          create_user_label.setEnabled(enable_user.isSelected());
          create_user.setEnabled(enable_user.isSelected());
          create_password_label.setEnabled(enable_user.isSelected());
          create_password.setEnabled(enable_user.isSelected());
        }
      });
       
        create_btn = (JButton)pane.getComponentByName("create_btn");
        create_btn.setText(CommonsI18n.tr("Create database"));
        create_btn.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
          if(verifEntrees()){
            connect();
            ArrayList<String> createQueries = createDatabase();
            Iterator<String> i = createQueries.iterator();
            while(i.hasNext()){
              String qry = (String)i.next();
              try {
                logger.debug("Query : "+qry);
                System.out.println("req. : " + qry);
                db.execUpdate(qry);
              } catch (SQLException e1) {
                logger.fatal("SQLException while create database : "+e1.getMessage()+" (code "+e1.getErrorCode()+")");
                logger.debug("Message was : "+e1.getMessage());
                logger.debug("Error Code : "+e1.getErrorCode());
                e1.printStackTrace();
              }
            }
            initTree(tree);
            int startRow = 0;
              String prefix = create.getText();
              TreePath path = tree.getNextMatch(prefix, startRow, Position.Bias.Forward);
            tree.setSelectionPath(path);
          }
        }
        });
       
        export_title = (TitledSeparator)pane.getComponentByName("export_title");
        export_title.setText(CommonsI18n.trc("Title", "Export"));
       
        xml_export = pane.getRadioButton("xml_export");
        xml_export.setText(CommonsI18n.tr("XML File"));
       
        sql_export = pane.getRadioButton("sql_export");
        sql_export.setText(CommonsI18n.tr("SQL File"));
        sql_export.setSelected(true);
       
      btn_group = new ButtonGroup();
      btn_group.add(xml_export);
      btn_group.add(sql_export);
     
      structure = pane.getCheckBox("structure");
      structure.setText(CommonsI18n.tr("Structure"));
     
      datas = pane.getCheckBox("datas");
      datas.setText(CommonsI18n.tr("Datas"));

      export = (JButton)pane.getButton("export");
      export.setText(CommonsI18n.trc("Button", "Export"));
      export.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
          TreePath[] paths = tree.getSelectionPaths();
          if(paths==null || paths.length==0){
View Full Code Here

      activity = new SimulatedActivity(delay);
   
      JPanel p = new JPanel();
      p.setLayout(new BorderLayout());
 
      FormPanel pane = new FormPanel( "be/xtnd/commons/gui/descriptions/header.jfrm" );

      GuiCommons.createHeader(pane, "biglogo", bundle);

      p.add(pane, BorderLayout.CENTER);
View Full Code Here

        this.parentFrame = parent;
        super.setTitle(CommonsI18n.tr("Application configuration"));
            putClientProperty(
                    PlasticInternalFrameUI.IS_PALETTE,
                    Boolean.TRUE);
        FormPanel pane = new FormPanel( "be/xtnd/commons/gui/descriptions/preferences.jfrm" );

        initLabels(pane);
       
      mysqlServer = pane.getTextField("serveur");
      configFields(mysqlServer, server_name);
      mysqlServer.setCaretPosition(0);


      mysqlPassword = (JPasswordField)pane.getTextField("base_passe");
      configFields(mysqlPassword, sql_password);
     
        softRootPassword = (JPasswordField)pane.getTextField("appli_passe");
      configFields(softRootPassword, root_soft_password);

      mysqlUser = pane.getTextField("base_user");
      configFields(mysqlUser, sql_user);
     
      mysqlDb = pane.getTextField("base");
      configFields(mysqlDb, sql_db);
     
      simple_crypt = pane.getRadioButton("simple_crypt");
      simple_crypt.setText(CommonsI18n.tr("simple"));
      simple_crypt.setToolTipText(CommonsI18n.tr("Simple encryption alogithm"));
      if(crypto_mode.equalsIgnoreCase("simple")) simple_crypt.setSelected(true);
      simple_crypt.addActionListener(this);
     
      bouncy_crypt = pane.getRadioButton("bouncy_crypt");
      bouncy_crypt.setText(CommonsI18n.tr("bouncy"));
      bouncy_crypt.setToolTipText(CommonsI18n.tr("Encryption algorithm based on BouncyCastle API (requires unrestricted JCE)"));
      if(crypto_mode.equalsIgnoreCase("bouncy")) bouncy_crypt.setSelected(true);
          bouncy_crypt.addActionListener(this);

      simple_crypto_gui = (JButton)pane.getButton("simple_crypto_gui");
      simple_crypto_gui.setText(CommonsI18n.tr("GUI"));
      simple_crypto_gui.setToolTipText(CommonsI18n.tr("A GUI for simple encryption algorithm."));
      simple_crypto_gui.addActionListener(new SimpleClik());
     
        okay = (JButton)pane.getButton("okay");
        //commons.buildCommonButton(okay, "window.config.buttons.ok", null);
        commons.buildCommonButton(
            okay,
            CommonsI18n.tr("Okay"),
            CommonsI18n.trc("OK Button (tooltip)", "Save configuration and close window"),
            CommonsI18n.trc("OK Button (mnemonic)", "o"),
          null
      );
        okay.addActionListener(new OkClik());
       
        appliquer = (JButton)pane.getButton("appliquer");
        commons.buildCommonButton(
            appliquer,
            CommonsI18n.tr("Apply"),
            CommonsI18n.trc("Apply button (tooltip)", "Apply configuration without closing panel"),
            CommonsI18n.trc("Apply button (mnemonic)", "a"),
            null
      );
        appliquer.addActionListener(new ApplyClik());

        annuler = (JButton)pane.getButton("annuler");
        commons.buildCommonButton(
            annuler,
            CommonsI18n.tr("Cancel"),
            CommonsI18n.trc("Cancel button (tooltip)", "Close panel without saving changes"),
            CommonsI18n.trc("Cancel button (mnemonic)", "c"),
View Full Code Here

        providerAttributes = new JTextField[dimTablo];
       
          ButtonGroup group = new ButtonGroup();

          while(i.hasNext()){
            FormPanel tab = new FormPanel( "be/xtnd/commons/gui/descriptions/database_option_tab.jfrm" );

            JLabel modeLabel = tab.getLabel("mode_label");
            modeLabel.setText(CommonsI18n.tr("Server mode"));
            modeLabel.setToolTipText(CommonsI18n.tr("Select server mode"));
           
              JLabel providerLabel = tab.getLabel("base_provider_label");
              providerLabel.setText(CommonsI18n.tr("Provider"));
              providerLabel.setToolTipText(CommonsI18n.tr("Enter database provider class name"));

              JLabel providerNameLabel = tab.getLabel("base_nom_label");
              providerNameLabel.setText(CommonsI18n.tr("Name"));
              providerNameLabel.setToolTipText(CommonsI18n.tr("Enter provider name"));

              JLabel providerPortLabel = tab.getLabel("base_port_label");
              providerPortLabel.setText(CommonsI18n.tr("Port"));
              providerPortLabel.setToolTipText(CommonsI18n.tr("Enter database server port"));

              JLabel providerDefaultLabel = tab.getLabel("base_defaut_label");
              providerDefaultLabel.setText(CommonsI18n.tr("Default?"));
              providerDefaultLabel.setToolTipText(CommonsI18n.tr("Define current provider as default"));
             
              JLabel attributesLabel = tab.getLabel("attributs_label");
              attributesLabel.setText(CommonsI18n.tr("Optionnal attributes"));
              attributesLabel.setToolTipText(CommonsI18n.tr("Enter here full connection attributes string (including separators)"));

              Element courant = (Element)i.next();
              tabbedPane.addTab(courant.getAttributeValue("name"),tab);

              providerMode[count] = tab.getComboBox("mode");
              providerMode[count].addItem("server");
              providerMode[count].addItem("file");
              providerMode[count].setSelectedItem(courant.getAttributeValue("mode"));
             
              provider[count] = tab.getTextField("base_provider");
              configFields(provider[count], courant.getText());
             
            providerName[count] = tab.getTextField("base_nom");
              configFields(providerName[count], courant.getAttributeValue("name"));
             
              providerPort[count] = tab.getTextField("base_port");
              configFields(providerPort[count], courant.getAttributeValue("port"));
             
              providerAttributes[count] = tab.getTextField("attributs");
              configFields(providerAttributes[count], courant.getAttributeValue("arguments"));
             
              providerDefault[count] = tab.getRadioButton("base_defaut");
              providerDefault[count].addActionListener(this);
                group.add(providerDefault[count]);
             
                if(courant.getAttribute("default").getValue().equals("yes")){
                providerDefault[count].setSelected(true);
View Full Code Here

        super();
        super.setTitle(CommonsI18n.tr("Simple encrypt/decrypt GUI"));
            putClientProperty(
                    PlasticInternalFrameUI.IS_PALETTE,
                    Boolean.TRUE);
        FormPanel pane = new FormPanel( "be/xtnd/commons/gui/descriptions/cryptform.jfrm" );

        initLabels(pane);
       
        title = (TitledSeparator)pane.getComponentByName("title");
        title.setText(CommonsI18n.tr("Simple encrypt/decrypt GUI"));
       
        aleat = pane.getCheckBox("aleatoire");
        aleat.addActionListener(new AleatEvent());
        aleat.setText(CommonsI18n.tr("Random"));
        aleat.setToolTipText(CommonsI18n.tr("Generates a random string"));
        nbre_aleat = (JSpinField)pane.getComponentByName("nbre_aleat");
       
        crypt = pane.getRadioButton("crypt");
        crypt.setText(CommonsI18n.tr("Encrypt"));
        crypt.setToolTipText(CommonsI18n.tr("Encrypt the specified string"));
       
        decrypt = pane.getRadioButton("decrypt");
        decrypt.setText(CommonsI18n.tr("Decrypt"));
        decrypt.setToolTipText(CommonsI18n.tr("Decrypt the specified string"));
       
        param = pane.getTextField("param");
        result = pane.getTextField("result");
       
        mode = (TitledBorderLabel)pane.getComponentByName("mode");
        mode.setText(CommonsI18n.tr("Modes"));
       
        okay = (JButton)pane.getButton("okay");
        okay.setText(CommonsI18n.tr("Okay"));
        okay.addActionListener(new OkayEvent());
       
        cancel = (JButton)pane.getButton("annuler");
        cancel.setText(CommonsI18n.tr("Cancel"));
        cancel.addActionListener(new CancelEvent());
       
        add(pane);
View Full Code Here

TOP

Related Classes of com.jeta.forms.components.panel.FormPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.