Package com.sun.dtv.lwuit

Examples of com.sun.dtv.lwuit.Form$MenuBar


     */
    public static void showLog() {
        try {
            String text = getLogContent();
            TextArea area = new TextArea(text, 5, 20);
            Form f = new Form("Log");
            final Form current = Display.getInstance().getCurrent();
            Command back = new Command("Back") {
                public void actionPerformed(ActionEvent ev) {
                    current.show();
                }
            };
            f.addCommand(back);
            f.setBackCommand(back);
            f.setLayout(new BorderLayout());
View Full Code Here


    }

    public void buildUI() {
        createLoadForm();
        createLoadVideoForm();
        mainForm = new Form();
        mainForm.setLayout(new CoordinateLayout(200, 480));
        mainForm.setY(130);
        mainForm.setX(0);
        // Create buttons in the main form
        final Button btnLoadXlet = new Button("Carregar um Xlet");
View Full Code Here

        style = new Style();
        style.setBgTransparency(0);
    }

    public void createLoadForm() {
        loadForm = new Form();
        loadForm.setLayout(new CoordinateLayout(510, 250));
        //loadForm.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
        //loadForm.setHeight(200);
        loadForm.setX(230);
        loadForm.setY(130);
View Full Code Here

        loadForm.addComponent(btnLoadXlet);
        loadForm.addComponent(btnVoltar);
    }

    public void createLoadVideoForm(){
        videoForm = new Form();
        videoForm.setLayout(new CoordinateLayout(510, 250));
        videoForm.setX(230);
        videoForm.setY(130);
        videoForm.setStyle(style);
        Label lblStatus = new Label("Escolha um video para tocar:");
View Full Code Here

     * Start()
     */
    public void start() {
        init();
        setupTheme();
        Form mainForm = buildUI();
        try {
            s.reserve(true, 0L, null);
        } catch (IllegalArgumentException ex) {
            Logger.getLogger(HelloLWUIT.class.getName()).log(Level.SEVERE, null, ex);
            exit();
        } catch (TimeoutException ex) {
            Logger.getLogger(HelloLWUIT.class.getName()).log(Level.SEVERE, null, ex);
            exit();
        } catch (SecurityException ex) {
            Logger.getLogger(HelloLWUIT.class.getName()).log(Level.SEVERE, null, ex);
            exit();
        }
        mainForm.show();
    }
View Full Code Here

     * Cria o form
     * @return
     */
    public Form buildUI() {

        Form mainForm = new Form("Hello LWUIT");
        mainForm.setLayout(new CoordinateLayout(300, 300));
        mainForm.setX(0);
        mainForm.setY(0);
        mainForm.setWidth(300);
        mainForm.setHeight(300);
        //Sair
        final Button btnSair = new Button("Sair");
        btnSair.setX(0);
        btnSair.setY(22);
        // Create buttons in the main form
        final Label lblHello = new Label("Hello LWUIT");

        ActionListener listener = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                    if (evt.getSource() == btnSair) {
                    exit();
                }


            }
        };

        btnSair.addActionListener(listener);
        mainForm.addComponent(lblHello);
        mainForm.addComponent(btnSair);
        mainForm.setCommandListener(listener);

        return mainForm;
    }
View Full Code Here

TOP

Related Classes of com.sun.dtv.lwuit.Form$MenuBar

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.