Package com.sun.dtv.lwuit

Examples of com.sun.dtv.lwuit.List


        loadForm.setY(130);
        loadForm.setStyle(style);
        Label lblStatus = new Label("Escolha qual jar voce vai carregar:");
        lblStatus.setY(0);

        final List list = new List();
        String[] arquivos = File.getAllFilesWithExtensions("/home/mos/xlets/", new String[] {"jar"});
        if (arquivos != null){
            for (int i=0;i<arquivos.length;i++)
                list.addItem(arquivos[i]);
        }
        list.setY(15);
        list.setHeight(10);
        Style stylebotao = new Style();
        stylebotao.setBgColor(0x000000, true);
        stylebotao.setBgSelectionColor(0x090909, true);
        list.setStyle(stylebotao);

        final Button btnLoadXlet = new Button("Carregar >>");
        btnLoadXlet.setY(143);
        btnLoadXlet.setX(160);
        final Button btnVoltar = new Button("<< Voltar");
        btnVoltar.setY(143);
        btnVoltar.setX();

        // Criando actionListener
        ActionListener listener = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                if (evt.getSource() == btnLoadXlet) {
                    context.notifyPaused();
                    ApplicationManager.loadXlet("/home/mos/xlets/" + (String)list.getSelectedItem());
                } else if (evt.getSource() == btnVoltar) {
                    loadForm.setVisible(false);
                    mainForm.show();

                }
View Full Code Here


        videoForm.setY(130);
        videoForm.setStyle(style);
        Label lblStatus = new Label("Escolha um video para tocar:");
        lblStatus.setY(0);

        final List list = new List();
        String[] arquivos = File.getAllFilesWithExtensions("/home/mos/zvideos/", new String[] {"avi","mpg","ts"});
        if (arquivos != null){
            for (int i=0;i<arquivos.length;i++){
                //final Button arq = new Button(arquivos[i]);
                list.addItem(arquivos[i]);
            }
        }
        list.setY(15);
        list.setHeight(10);
        list.setHandlesInput(true);
        Style stylebotao = new Style();
        stylebotao.setBgColor(0x000000, true);
        stylebotao.setBgSelectionColor(0x090909, true);
        list.setStyle(stylebotao);

        final Button btnLoadXlet = new Button("Carregar >>");
        btnLoadXlet.setY(143);
        btnLoadXlet.setX(160);
        final Button btnVoltar = new Button("<< Voltar");
        btnVoltar.setY(143);
        btnVoltar.setX(0);

        // Criando actionListener
        ActionListener listener = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                //System.out.println("A��o!");
                if (evt.getSource() == btnVoltar) {
                    videoForm.setVisible(false);
                    mainForm.show();
                } else if (evt.getSource() == btnLoadXlet) {
                    MPlayer.openfile("/home/mos/zvideos/" + (String)list.getSelectedItem());
                }
            }
        };

        // Adicionando actionListeners
View Full Code Here

TOP

Related Classes of com.sun.dtv.lwuit.List

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.