Examples of CBJComboBox


Examples of com.ca.commons.cbutil.CBJComboBox

    //TE: search level combo...
    CBPanel searchLevelPanel = new CBPanel();
    searchLevelPanel.setBorder(new TitledBorder(CBIntText.get("Search Level")))
    searchLevelPanel.addln(new JLabel(CBIntText.get("Select Search Level") + ": "));
    searchLevelPanel.makeWide();
    searchLevelPanel.addln(searchLevelCombo = new CBJComboBox(searchLevelArray));
    searchLevelCombo.setSelectedIndex(FULLSUBTREESEARCH)
   
    //TE: put the alias & search level panels on the options panel then add the options panel to the main panel...
    optionsPanel.add(aliasPanel);
    optionsPanel.makeWide();
    optionsPanel.addln(searchLevelPanel);
   
    panel.makeWide();
    panel.addln(optionsPanel);
 
    //TE: return attributes combo...   
    CBPanel returnAttrsPanel = new CBPanel();
    returnAttributesCombo = new CBJComboBox(ReturnAttributesDialog.getSavedListNames())
    returnAttributesCombo.setSelectedItem(ReturnAttributesDialog.DEFAULT_RETURN_ATTRS);
 
    returnAttrsPanel.makeLight();
    returnAttrsPanel.add(new JLabel(CBIntText.get("Information to retrieve")+": "));
    returnAttrsPanel.makeWide();
View Full Code Here

Examples of com.ca.commons.cbutil.CBJComboBox

    }   
   
    Object listOb[] = list.toArray();
    Arrays.sort(listOb, new SearchModel.StringComparator());        //TE: sort the list alphabetically.
   
    CBJComboBox loadCombo = new CBJComboBox(listOb);
    loadCombo.setRenderer(new CBBasicComboBoxRenderer(listOb));
    loadCombo.setPreferredSize(new Dimension(140, 20));
        int response = JOptionPane.showConfirmDialog(this, loadCombo, CBIntText.get("Select Filter"), JOptionPane.OK_CANCEL_OPTION);
           
        if (response != JOptionPane.OK_OPTION)
            return;                                  //TE: the user has probably decided not to load a filter i.e. has clicked 'cancel'.
       
    if (loadCombo.getSelectedItem()!=null)
    {
      String filter=null;
      try
      {
            filter = searchModel.getFilter(loadCombo.getSelectedItem().toString())//TE: gets the filter that the user selected. 
      }
      catch(Exception e)                //TE: the user has somehow selected nothing in either the attribute or the function combo.
      {
        showMessage(CBIntText.get("The filter cannot be constructed; there appears to be missing information.\nPlease make sure you have entered all the information for the filter correctly."), CBIntText.get("Missing Information"));     
        return;
      }       
     
      if (!build.displayFilter(filter))                  //TE: display the filter.  If unsuccessful show message.
      {
        showMessage(CBIntText.get("Your filter cannot be displayed."), CBIntText.get("Load Unsuccessful"))
      }
      else
      {   
        buildName = loadCombo.getSelectedItem().toString();        //TE: update the name of the join filter so the tab change listener knows the correct name of the filter.
        filterNameTextField.setText(buildName);              //TE: set the name of the filter in the filter name field.
      }
    }
    else
      showMessage(CBIntText.get("Problem loading; there are no filters selected.") , CBIntText.get("Nothing to Load"))
   
    load(loadCombo.getSelectedItem().toString())
  }
View Full Code Here

Examples of com.ca.commons.cbutil.CBJComboBox

    {
      showMessage(CBIntText.get("There are no filters available to load.") , CBIntText.get("Nothing to Load"));
      return;
    }
   
    CBJComboBox loadCombo = new CBJComboBox(list.toArray());
    loadCombo.setRenderer(new CBBasicComboBoxRenderer(list.toArray()));
    loadCombo.setPreferredSize(new Dimension(140, 20));
        int response = JOptionPane.showConfirmDialog(this, loadCombo,
                                    CBIntText.get("Select Filter"), JOptionPane.OK_CANCEL_OPTION);
           
        if (response != JOptionPane.OK_OPTION)
            return;                                  //TE: the user has probably decided not to load a filter i.e. has clicked 'cancel'.
       
    if (loadCombo.getSelectedItem()!=null)
    {   
      String filter = loadCombo.getSelectedItem().toString();        //TE: get the user selected filter from the combo box.
     
      try
      {
        setNumberOfRows(build.getOccurrences(searchModel.getFilter(filter), "JXFilter"))//TE: add the right number of rows for displaying the filter.
       
            list = searchModel.getJoinFilterNames(searchModel.getFilter(filter));        //TE: get a list of the subfilter names.
       
        if(!join.displayFilter(list, searchModel.getFilter(filter)))  //TE: display the filter.  If unsuccessful show message.
          showMessage(CBIntText.get("Your filter cannot be displayed."), CBIntText.get("Load Unsuccessful"));   
        else
        {   
          joinName = loadCombo.getSelectedItem().toString();      //TE: update the name of the join filter so the tab change listener knows the correct name of the filter.
          filterNameTextField.setText(joinName);            //TE: set the name of the filter in the filter name field.
        }
      }
      catch(Exception e)                //TE: the user has somehow selected nothing in either the attribute or the function combo.
      {
        showMessage(CBIntText.get("The filter cannot be constructed; there appears to be missing information.\nPlease make sure you have entered all the information for the filter correctly."), CBIntText.get("Missing Information"));     
        return;
      }
    }
    else
      showMessage(CBIntText.get("Problem loading; there are no filters selected.") , CBIntText.get("Nothing to Load"))
   
    load(loadCombo.getSelectedItem().toString())
  }
View Full Code Here

Examples of com.ca.commons.cbutil.CBJComboBox

    {
      showMessage(CBIntText.get("There are no filters available to load.") , CBIntText.get("Nothing to Load"));
      return;
   
   
    CBJComboBox loadCombo = new CBJComboBox(list.toArray());
    loadCombo.setRenderer(new CBBasicComboBoxRenderer(list.toArray()));
    loadCombo.setPreferredSize(new Dimension(140, 20));
        int response = JOptionPane.showConfirmDialog(this, loadCombo, CBIntText.get("Select Filter"), JOptionPane.OK_CANCEL_OPTION);
           
        if (response != JOptionPane.OK_OPTION)
            return
     
    if (loadCombo.getSelectedItem()!=null)
    {   
      textName = loadCombo.getSelectedItem().toString();          //TE: get the user selected filter from the combo box.       
      text.displayFilter(searchModel.getTextFilter(textName));
      filterNameTextField.setText(textName);                //TE: set the name of the filter in the filter name field.
    }
    else
      showMessage(CBIntText.get("Problem loading; there are no filters selected.") , CBIntText.get("Nothing to Load"));             
   
    load(loadCombo.getSelectedItem().toString())
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.