Package java.lang

Examples of java.lang.Integer


            String utmp;

            String conNumber;
            String usingLocal = new String("");
            Integer conNumberInt;

            //lastConData = new String("");
            //***
            for(int i = 0; i < jftp.CAPACITY; i++)
            {
                if(!(cons[i][0].equals("null")))
                {
                    protocol = cons[i][0];
                    htmp = cons[i][1];
                    utmp = cons[i][2];

                    int j = 3;

                    while(!(cons[i][j].equals(LastConnections.SENTINEL)))
                    {
                        j++;
                    }

                    //usingLocal is always last piece of data!
                    usingLocal = cons[i][j - 1];

                    if(usingLocal.equals("true"))
                    {
                        usingLocal = "(in local tab)";
                    }

                    else
                    {
                        usingLocal = "";
                    }

                    //lastConnections[i] = new JMenuItem(cons[i]);
                    conNumberInt = new Integer(i + 1);
                    conNumber = conNumberInt.toString();

                    //lastConData[i] = new String(conNumber + " " + protocol + ": Hostname: " + htmp + ";  Username: " + utmp);
                    lastConData[i] = new String(conNumber + " " + protocol +
                                                ": " + htmp + " " + usingLocal);

View Full Code Here


                                             "_httpdownload/"), 440, 250);
        }
        else if(e.getSource() == hp)
        {
            HttpBrowser h = new HttpBrowser("http://j-ftp.sourceforge.net");
            JFtp.desktop.add(h, new Integer(Integer.MAX_VALUE - 10));
        }
        else if(e.getSource() == raw)
        {
            RawConnection c = new RawConnection();
        }
        else if(e.getSource() == readme)
        {
            show(Settings.readme);
        }
        else if(e.getSource() == changelog)
        {
            show(Settings.changelog);
        }
        else if(e.getSource() == todo)
        {
            show(Settings.todo);
        }
        else if(e.getSource() == shell)
        {
          UIUtils.runCommand("/bin/bash");
        }
        else if(e.getSource() == loadAudio)
        {
            try
            {
                JFileChooser f = new JFileChooser();
                f.showOpenDialog(jftp);

                File file = f.getSelectedFile();

                Player p = new Player(new FileInputStream(file));

                p.play();
            }
            catch(Exception ex)
            {
                ex.printStackTrace();
                Log.debug("Error: (" + ex + ")");
            }
        }
        else if(e.getSource() == exit)
        {
            jftp.windowClosing(null); // handles everything
        }
        else if(e.getSource() == close)
        {
            JFtp.statusP.jftp.closeCurrentTab();

            /*
            jftp.safeDisconnect();
            FilesystemConnection con = new FilesystemConnection();
            jftp.remoteDir.setCon(con);
            con.addConnectionListener((ConnectionListener)jftp.remoteDir);
            if(!con.chdir("/")) con.chdir("C:\\");
            */
        }
        else if((e.getSource() == ftpCon) && (!jftp.uiBlocked))
        {
            //jftp.safeDisconnect();
            HostChooser hc = new HostChooser();
            hc.toFront();

            //hc.setModal(true);
            hc.update();
        }
        else if((e.getSource() == smbCon) && (!jftp.uiBlocked))
        {
            //jftp.safeDisconnect();
            SmbHostChooser hc = new SmbHostChooser();
            hc.toFront();

            //hc.setModal(true);
            hc.update();
        }
        else if((e.getSource() == sftpCon) && (!jftp.uiBlocked))
        {
            //jftp.safeDisconnect();
            SftpHostChooser hc = new SftpHostChooser();
            hc.toFront();

            //hc.setModal(true);
            hc.update();
        }
        else if((e.getSource() == nfsCon) && (!jftp.uiBlocked))
        {
            // jftp.safeDisconnect();
            NfsHostChooser hc = new NfsHostChooser();
            hc.toFront();

            //hc.setModal(true);
            hc.update();
        }
        else if(e.getSource() == resuming)
        {
            boolean res = resuming.getState();
            Settings.enableResuming = res;
            Settings.setProperty("jftp.enableResuming", res);
            ask.setEnabled(Settings.enableResuming);
            Settings.save();
        }
        else if(e.getSource() == useTableLayout)
        {
            boolean res = useTableLayout.getState();
            Settings.setProperty("jftp.useJTableLayout", res);
            Settings.save();
           
            JOptionPane.showMessageDialog(this, "Please restart JFtp to have the UI changed.");
        }
        else if(e.getSource() == useNewIcons)
        {
            boolean res = useNewIcons.getState();
            Settings.setProperty("jftp.gui.look.newIcons", res);
            Settings.save();
           
            JOptionPane.showMessageDialog(this, "Please restart JFtp to have the UI changed.");
        }
        else if(e.getSource() == hideHidden)
        {
            boolean res = hideHidden.getState();
            Settings.setProperty("jftp.hideHiddenDotNames", res);
            Settings.save();
           
            JFtp.localUpdate();
        }
        else if(e.getSource() == nl)
        {
            boolean res = nl.getState();
            Settings.showNewlineOption = res;
        }
        else if(e.getSource() == stdback)
        {
            Settings.setProperty("jftp.useBackground", stdback.getState());
            Settings.save();
            JFtp.statusP.jftp.fireUpdate();
        }
        else if(e.getSource() == sshKeys)
        {
            Settings.setProperty("jftp.useSshKeyVerification",
                                 sshKeys.getState());
            Settings.save();
            JFtp.statusP.jftp.fireUpdate();
        }
        else if(e.getSource() == rssDisabled)
        {
            Settings.setProperty("jftp.enableRSS", rssDisabled.getState());
            Settings.save();
            JFtp.statusP.jftp.fireUpdate();
        }
        else if(e.getSource() == loadRss)
        {
            String what = JOptionPane.showInputDialog("Enter URL", "http://");

            if(what == null)
            {
                return;
            }

            Settings.setProperty("jftp.customRSSFeed", what);
            Settings.save();

            JFtp.statusP.jftp.feeder.switchTo(what);
        }
        else if(e.getSource() == loadSlash)
        {
            Settings.setProperty("jftp.customRSSFeed",
                                 "http://slashdot.org/rss/slashdot.rss");
            Settings.save();

            JFtp.statusP.jftp.feeder.switchTo("http://slashdot.org/rss/slashdot.rss");
        }
        else if(e.getSource() == loadCNN1)
        {
            Settings.setProperty("jftp.customRSSFeed",
                                 "http://rss.cnn.com/rss/cnn_topstories.rss");
            Settings.save();

            JFtp.statusP.jftp.feeder.switchTo("http://rss.cnn.com/rss/cnn_topstories.rss");
        }
        else if(e.getSource() == loadCNN2)
        {
            Settings.setProperty("jftp.customRSSFeed",
                                 "http://rss.cnn.com/rss/cnn_world.rss");
            Settings.save();

            JFtp.statusP.jftp.feeder.switchTo("http://rss.cnn.com/rss/cnn_world.rss");
        }
        else if(e.getSource() == loadCNN3)
        {
            Settings.setProperty("jftp.customRSSFeed",
                                 "http://rss.cnn.com/rss/cnn_tech.rss");
            Settings.save();

            JFtp.statusP.jftp.feeder.switchTo("http://rss.cnn.com/rss/cnn_tech.rss");
        }
        else if(e.getSource() == debug)
        {
            Settings.setProperty("jftp.enableDebug", debug.getState());
            Settings.save();
        }
        else if(e.getSource() == disableLog)
        {
            Settings.setProperty("jftp.disableLog", disableLog.getState());
            Settings.save();
        }
        else if(e.getSource() == smbThreads)
        {
            Settings.setProperty("jftp.enableSmbMultiThreading",
                                 smbThreads.getState());
            Settings.save();
        }
        else if(e.getSource() == sftpThreads)
        {
            Settings.setProperty("jftp.enableSftpMultiThreading",
                                 sftpThreads.getState());
            Settings.save();
        }
        else if(e.getSource() == ask)
        {
            Settings.askToResume = ask.getState();
        }
        else if(e.getSource() == http)
        {
            HttpDownloader dl = new HttpDownloader();
            jftp.addToDesktop("Http download", dl, 480, 100);
            jftp.setLocation(dl.hashCode(), 100, 150);
        }
        else if(e.getSource() == fadeMenu)
        {
            Settings.setProperty("jftp.gui.enableStatusAnimation",
                                 fadeMenu.getState());
            Settings.save();
        }
        else if(e.getSource() == askToDelete)
        {
            Settings.setProperty("jftp.gui.askToDelete", askToDelete.getState());
            Settings.save();
        }

        //***MY ADDITIONS (***how can I make this flexible enough to
        //*** easily add > 5 connections?)
        else if((e.getSource() == lastConnections[0]) && (!jftp.uiBlocked))
        {
            connectionSelected(0);
        }

        else if((e.getSource() == lastConnections[1]) && (!jftp.uiBlocked))
        {
            connectionSelected(1);
        }
        else if((e.getSource() == lastConnections[2]) && (!jftp.uiBlocked))
        {
            connectionSelected(2);
        }
        else if((e.getSource() == lastConnections[3]) && (!jftp.uiBlocked))
        {
            connectionSelected(3);
        }
        else if((e.getSource() == lastConnections[4]) && (!jftp.uiBlocked))
        {
            connectionSelected(4);
        }
        else if((e.getSource() == lastConnections[5]) && (!jftp.uiBlocked))
        {
            connectionSelected(5);
        }
        else if((e.getSource() == lastConnections[6]) && (!jftp.uiBlocked))
        {
            connectionSelected(6);
        }
        else if((e.getSource() == lastConnections[7]) && (!jftp.uiBlocked))
        {
            connectionSelected(7);
        }
        else if((e.getSource() == lastConnections[8]) && (!jftp.uiBlocked))
        {
            connectionSelected(8);
        }
        else if(e.getSource() == opts)
        {
            AdvancedOptions adv = new AdvancedOptions();
            jftp.addToDesktop("Advanced Options", adv, 500, 180);
            jftp.setLocation(adv.hashCode(), 110, 180);
        }
        else if(e.getSource() == manage)
        {
            BookmarkManager m = new BookmarkManager();
            JFtp.desktop.add(m, new Integer(Integer.MAX_VALUE - 10));
        }
        else if(marks.contains(e.getSource()))
        {
            ((BookmarkItem) e.getSource()).connect();
        }
View Full Code Here

        {
            url = HImage.class.getResource("/" + file);
        }

        Displayer d = new Displayer(url, null);
        JFtp.desktop.add(d, new Integer(Integer.MAX_VALUE - 11));
    }
View Full Code Here

        clearItems.setMnemonic('F');

        try
        {
            //*** end of new code section
            Integer intI;
            String stringI;
            char charI;

            for(int i = 0; i < jftp.CAPACITY; i++)
            {
                //*** I should note that functionality below only allows
                //*** a maximum of nine connections to be remembered
                //BUGFIX 1.40
                //if (!(cons[i].equals("null"))) {
                if(!(cons[i][0].equals("null")))
                {
                    intI = new Integer(i + 1);
                    stringI = intI.toString();
                    charI = stringI.charAt(0);

                    lastConnections[i].setMnemonic(charI);

                    //lastConnections[i].setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, ActionEvent.CTRL_MASK));
View Full Code Here

          min_x = data_item.get(0);
       
        data.addElement(data_item);


        Integer my_class_label= (Integer) Integer.valueOf(result[result.length-1]);
        data_class_label.addElement(my_class_label);
       
        class_labels.add(my_class_label);
       
       
View Full Code Here

  //my_class_label = data_class_label;
 
    Iterator it=data_class_label.iterator();
    while(it.hasNext()) {

      Integer my_label=(Integer) it.next();
      my_class_label.addElement(get_class_label_index(my_label));

    }

  }
View Full Code Here

     * @author Igor T&aacute;mara P.
     * @param id del significado que se va a asociar como sin&oacute;nimo
     */
    public void adicionarSinonimo(int id)
  {
      Integer i;
      i=new Integer(id);
      if (sinonimos==null)
    {
        sinonimos=new Vector();
    }
      sinonimos.addElement(i);
View Full Code Here

     * @author Igor T&aacute;mara P.
     * @param id del significado que se va a asociar como ant&oacute;nimo
     */
    public void adicionarAntonimo(int id)
  {
      Integer i;
      i=new Integer(id);
      if (antonimos==null)
    {
        antonimos=new Vector();
    }
      antonimos.addElement(i);
View Full Code Here

     * @author Igor T&aacute;mara P.
     * @param id del significado que se va a asociar como sin&oacute;nimo
     */
    public void adicionarSinonimo(int id)
  {
      Integer i;
      i=new Integer(id);
      if (sinonimos==null)
    {
        sinonimos=new Vector();
    }
      sinonimos.addElement(i);
View Full Code Here

     * @author Igor T&aacute;mara P.
     * @param id del significado que se va a asociar como ant&oacute;nimo
     */
    public void adicionarAntonimo(int id)
  {
      Integer i;
      i=new Integer(id);
      if (antonimos==null)
    {
        antonimos=new Vector();
    }
      antonimos.addElement(i);
View Full Code Here

TOP

Related Classes of java.lang.Integer

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.