Package com.ca.commons.cbutil

Examples of com.ca.commons.cbutil.CBPanel


        ldapLimit = new JTextField();
        ldapTimeout = new JTextField();

        getLdapLevels();

        CBPanel ldapLevelsPanel = new CBPanel();

        ldapLevelsPanel.addln(new JLabel(CBIntText.get("Set LDAP Options") + ": "));
        ldapLevelsPanel.addln(new JLabel(" "));        //TE: white space.
        ldapLevelsPanel.add(new JLabel(CBIntText.get("LDAP Limit") + ": "));
        ldapLevelsPanel.add(ldapLimit);
        ldapLevelsPanel.newLine();
        ldapLevelsPanel.addln(new JLabel(" "));        //TE: white space.
        ldapLevelsPanel.add(new JLabel(CBIntText.get("LDAP Timeout")+": "));
        ldapLevelsPanel.add(ldapTimeout);

        tabbedPane.addTab(CBIntText.get("Search Limits"),
                new ImageIcon(Theme.getInstance().getDirIcons() + "find.gif"), ldapLevelsPanel,
                CBIntText.get("Set the search levels, that is, the number of entries returned from a search and the timeout."));
    }
View Full Code Here


     */
    private void urlTab()
    {
        String[] url = new String[]{CBIntText.get("JXplorer"), CBIntText.get("Launch")};

        CBPanel urlPanel = new CBPanel();
        urlCombo = new JComboBox(url);

        getURLHandling();

        urlPanel.addln(new JLabel(CBIntText.get("Select URL handling") + ": "));
        urlPanel.addln(new JLabel(" "));
        urlPanel.addln(urlCombo);
        urlPanel.addln(new JLabel(" "));
        urlPanel.addln(new JLabel(CBIntText.get("Note: Launch is for Windows only.")));

        tabbedPane.addTab(CBIntText.get("URL"), new ImageIcon(Theme.getInstance().getDirIcons() + "url.gif"), urlPanel, CBIntText.get("Select how you would like the URLs handled in JXplorer."));
    }
View Full Code Here

     */
    private void pwdTab()
    {
        String[] cache = new String[] {CBIntText.get("Yes"),CBIntText.get("No")};

        CBPanel urlPanel = new CBPanel();
        cachePwdCombo = new JComboBox(cache);

        getPasswordCachingOption();

        urlPanel.addln(new JLabel(CBIntText.get("Cache passwords") + ": "));
        urlPanel.addln(new JLabel(" "));
        urlPanel.addln(cachePwdCombo);
        urlPanel.addln(new JLabel(" "));
        urlPanel.addln(new JLabel(CBIntText.get(" ")));

        tabbedPane.addTab(CBIntText.get("Cache Passwords"), new ImageIcon(Theme.getInstance().getDirIcons() + "cachePwds.gif"), urlPanel, CBIntText.get("Select Yes if you want passwords cached in JXplorer."));
    }
View Full Code Here

        this.mainMenu = mainMenu;
        jx = jxplorer;

        setTitle(CBIntText.get("JXplorer Advanced Options"));

        display = new CBPanel();

        btnApply = new CBButton(CBIntText.get("Apply"), CBIntText.get("Click here to apply the changes"));
        btnApply.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent e)
View Full Code Here

            CBIntText.get("Sets the look and feel to: Motif"),
            CBIntText.get("Sets the look and feel to: GTK"),
            CBIntText.get("Sets the look and feel to: Apple Mac/OSX")};

        ButtonGroup lookAndFeelButtonGroup = new ButtonGroup();
        CBPanel lookAndFeelPanel = new CBPanel();

        lookAndFeelPanel.addln(new JLabel(CBIntText.get("Select a New Look & Feel")+": "));

        // White space...
        lookAndFeelPanel.addln(new JLabel(" "));

        if (JXplorer.isWindows())
            addLookAndFeelOption(lookAndFeelButtonGroup, WINDOWS, lookAndFeelPanel, toolTip);
        else
            lookAndFeel[WINDOWS].setSelected(false);
View Full Code Here

    /**
     * Sets up the log method radio buttons.
     */
    private void logMethod()
    {
        CBPanel logMethodPanel = new CBPanel();

        logMethodPanel.addln(new JLabel(CBIntText.get("Select a New Log Method")+": "));

        // White space...
        logMethodPanel.addln(new JLabel(" "));

        logMethodCombo = new JComboBox(logMethodVal);
        logMethodCombo.setToolTipText(CBIntText.get("Set the log method in JXplorer."));

        logMethodPanel.addln(logMethodCombo);

        // White space...
        logMethodPanel.addln(new JLabel(" "));

        getLogMethod();

        tabbedPane.addTab(CBIntText.get("Log Method"), new ImageIcon(Theme.getInstance().getDirIcons() + "log_method.gif"), logMethodPanel, CBIntText.get("Set the method of logging you want, for example, to a file."));
    }
View Full Code Here

    /**
     * Sets up the log level radio buttons.
     */
    private void logLevel()
    {
        CBPanel logLevelPanel = new CBPanel();

        logLevelPanel.addln(new JLabel(CBIntText.get("Select a New Log Level")+": "));
        logLevelPanel.addln(new JLabel(" "));

        logLevelCombo = new JComboBox(logLevelVal);
        logLevelCombo.setToolTipText(CBIntText.get("Set the logging level in JXplorer."));
        logLevelPanel.addln(logLevelCombo);
        logLevelPanel.addln(new JLabel(" "));

        getLogLevel();

        tabbedPane.addTab(CBIntText.get("Log Level"),
                new ImageIcon(Theme.getInstance().getDirIcons() + "log_level.gif"), logLevelPanel,
View Full Code Here

    text = new TextFilterPanel();
   
    buttonCounter++;
    searchModel = new SearchModel();
   
    CBPanel panel = getMainPanel(baseDN);
   
    tabbedPane = new JTabbedPane();

    tabbedPane.addTab(CBIntText.get("Build Filter"), new ImageIcon(Theme.getInstance().getDirImages()+"build.gif"), build, CBIntText.get("Build a filter from scratch."));
    tabbedPane.addTab(CBIntText.get("Join Filters"), new ImageIcon(Theme.getInstance().getDirImages()+"join.gif"), join, CBIntText.get("Join filters that have been made in the Build tab."));
View Full Code Here

  @param baseDN the Distinguished Name where the searching is done from.  This is added to a text field on this panel.
  *  @return the panel with the components added.
  */
  public CBPanel getMainPanel(DN baseDN)
  {
    CBPanel panel = new CBPanel();
   
    //TE: adds a label & text field for the name of the filter...
    panel.add(new JLabel(CBIntText.get("Filter Name") + ": "));
    panel.makeWide();
    panel.add(filterNameTextField = new JTextField("Untitled"));
    panel.makeLight();
    panel.newLine();   

    //TE: adds a label & text field for the name of the DN being searched from...
    panel.add(new JLabel(CBIntText.get("Start Searching From") + ": "));
    panel.makeWide();
    if(baseDN == null)
      panel.add(baseDNTextField = new JTextField(""));
    else
       panel.add(baseDNTextField = new JTextField(baseDN.toString()))
    panel.makeLight();
    panel.newLine();
   
    CBPanel optionsPanel = new CBPanel()//TE: panel for adding the alias & search level panels to (for layout).

    //TE: alias check boxes... 
    CBPanel aliasPanel = new CBPanel();
         aliasPanel.setBorder(new TitledBorder(CBIntText.get("Alias Options")));
   
    aliasPanel.makeWide();
    aliasPanel.addln(aliasSearchCheckBox = new JCheckBox(CBIntText.get("Resolve aliases while searching.")));   
    aliasSearchCheckBox.setToolTipText(CBIntText.get("Resolve aliases while searching."));
    aliasPanel.addln(aliasFindingCheckBox = new JCheckBox(CBIntText.get("Resolve aliases when finding base object.")))
    aliasFindingCheckBox.setToolTipText(CBIntText.get("Resolve aliases when finding base object."));

    //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();
    returnAttrsPanel.addln(returnAttributesCombo);
   
    panel.addln(returnAttrsPanel);
   
    return panel;   
  }
View Full Code Here

  *  with listeners and are placed one above the other.
  *  @return the panel with the buttons on it.
  */
  public CBPanel getButtonPanel()
  {
    CBPanel panel = new CBPanel();   

    btnMore = new CBButton(CBIntText.get("More"), CBIntText.get("Add a Line to the search window."));
    btnMore.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e){
          if (isFilterValid()) 
          {
            if (tabbedPane.getSelectedIndex()==0//TE: make sure that you are adding rows to the tab that is visible, not to both tabs!
            {
              build.addFilterRow();
            }
            else if (tabbedPane.getSelectedIndex()==1 && buttonCounter<50)
            { 
              join.addFilterRow(getEditButton());  
              buttonCounter++;          //TE: a counter that keeps track of the number of created 'edit' buttons.        
            }
          }
          else
          {
            showMessage(CBIntText.get("There is an error in the filter; there appears to be missing information.\nPlease make sure you have entered all the information for the filter correctly,\nthen try to add more rows."), CBIntText.get("Missing Information"));             
          }
    }});
   
    btnLess = new CBButton(CBIntText.get("Less"), CBIntText.get("Remove a Line from the search window."));
    btnLess.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e){
          if (tabbedPane.getSelectedIndex()==0//TE: make sure that you are removing rows from the tab that is visible, not from both tabs!
          {
            build.removeFilterRow();
          }
          else if (tabbedPane.getSelectedIndex()==1 && buttonCounter>1)
          {    
            buttonCounter--; 
            join.removeFilterRow(btnEdit[buttonCounter]);                   
          }
    }})
   
    btnSave = new CBButton(CBIntText.get("Save"), CBIntText.get("Save this filter."));
    btnSave.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e){
          if (isFilterValid())
            save();
          else
            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"));             
    }});
   
    btnLoad = new CBButton(CBIntText.get("Load"), CBIntText.get("Load a previously saved filter."));
    btnLoad.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e){
          if(tabbedPane.getSelectedIndex()==0)
            loadBuild();
          else if(tabbedPane.getSelectedIndex()==1)
            loadJoin()
          else if(tabbedPane.getSelectedIndex()==2)
            loadText();             
    }});   
   
    btnView = new CBButton(CBIntText.get("View"), CBIntText.get("View this search filter as text."));
    btnView.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e){
          if (!isFilterValid())
            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"));
          else if(tabbedPane.getSelectedIndex()==1 && recursiveFilterCheck(null, join.getFilter(), "View"))   // We don't care about the name of this filter b/c we are just viewing it.
            return
          else
            showDialog(CBIntText.get("Current Filter"), getLDAPFilter());
    }});

    panel.makeHigh();        //TE: add a label that it takes up the any remaining space above the buttons, so that the buttons are at the bottom of the panel.
    panel.addln(new JLabel(" "));
    panel.makeLight();
    panel.addln(btnMore);
    panel.addln(btnLess);
    panel.addln(btnSave);
    panel.addln(btnLoad);
    panel.addln(btnView)
   
    return panel;
  }
View Full Code Here

TOP

Related Classes of com.ca.commons.cbutil.CBPanel

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.