Examples of TransparentPanel


Examples of com.kokakiwi.mclauncher.ui.simple.components.TransparentPanel

    private void buildLoginBox(boolean offline)
    {
        loginBox.removeAll();
        loginBox.setLayout(new BorderLayout(0, 8));
       
        final TransparentPanel titles = new TransparentPanel();
        titles.setLayout(new GridLayout(0, 1, 0, 2));
       
        titles.add(new TransparentLabel(Translater
                .getString("login.usernameLabel") + " :", 4));
        titles.add(new TransparentLabel(Translater
                .getString("login.passwordLabel") + " :", 4));
        titles.add(new TransparentLabel("", 4));
       
        titles.setInsets(0, 0, 0, 4);
       
        final TransparentPanel fields = new TransparentPanel();
        fields.setLayout(new GridLayout(0, 1, 0, 2));
       
        fields.add(userName);
        fields.add(password);
        fields.add(rememberMe);
       
        final TransparentPanel buttons = new TransparentPanel();
        buttons.setLayout(new GridLayout(0, 1, 0, 2));
       
        if (offline)
        {
            final TransparentButton optionsButton = new TransparentButton(
                    Translater.getString("login.retryButton"));
            optionsButton.addActionListener(new ActionListener() {
               
                public void actionPerformed(ActionEvent e)
                {
                    buildLoginBox(false);
                }
            });
            buttons.add(optionsButton);
           
            final TransparentButton loginButton = new TransparentButton(
                    Translater.getString("login.offlineButton"));
            loginButton.addActionListener(new ActionListener() {
               
                public void actionPerformed(ActionEvent e)
                {
                    new OptionsDialog(api).setVisible(true);
                }
            });
            buttons.add(loginButton);
        }
        else
        {
            final TransparentButton optionsButton = new TransparentButton(
                    Translater.getString("login.optionsButton"));
            optionsButton.addActionListener(new ActionListener() {
               
                public void actionPerformed(ActionEvent e)
                {
                    new OptionsDialog(api).setVisible(true);
                }
            });
            buttons.add(optionsButton);
           
            final TransparentButton loginButton = new TransparentButton(
                    Translater.getString("login.loginButton"));
            loginButton.addActionListener(new ActionListener() {
               
                public void actionPerformed(ActionEvent e)
                {
                    statusText.setText(Translater.getString("login.loginning"));
                   
                    new Thread(new Runnable() {
                       
                        public void run()
                        {
                            String result = null;
                           
                            if (!api.getConfig()
                                    .getBoolean("login.offlineMode"))
                            {
                                result = api.getLoginer().doLogin(
                                        userName.getText(),
                                        new String(password.getPassword()),
                                        rememberMe.isSelected());
                            }
                            else
                            {
                                api.getLoginer().getLastLogin()
                                        .setUsername(userName.getText());
                                api.getLoginer().getLastLogin()
                                        .setSessionId("123456");
                                api.getLoginer().getLastLogin().setTimestamp(0);
                                api.getLoginer().getLastLogin()
                                        .setDownloadTicket("12345");
                                if (rememberMe.isSelected())
                                {
                                    try
                                    {
                                        api.getLoginer().storeLogin(userName.getText(), "lolilol");
                                    }
                                    catch (Exception e)
                                    {
                                        e.printStackTrace();
                                    }
                                }
                            }
                           
                            if (result == null)
                            {
                                api.getTimeLine().next();
                            }
                            else
                            {
                                statusText.setText(result);
                               
                                if (!result.equalsIgnoreCase("Bad login"))
                                {
                                    buildLoginBox(true);
                                }
                            }
                        }
                    }).start();
                }
            });
            buttons.add(loginButton);
        }
       
        buttons.add(new TransparentPanel());
       
        buttons.setInsets(0, 10, 0, 10);
       
        loginBox.add(titles, "West");
        loginBox.add(fields, "Center");
        loginBox.add(buttons, "East");
       
View Full Code Here

Examples of com.kokakiwi.mclauncher.ui.simple.components.TransparentPanel

        panel.validate();
    }
   
    private Component center(Component c)
    {
        final TransparentPanel tp = new TransparentPanel(new GridBagLayout());
        tp.add(c);
        return tp;
    }
View Full Code Here

Examples of net.java.sip.communicator.plugin.desktoputil.TransparentPanel

        // If we only have one configuration form we don't need to create
        // a tabbed pane.
        if (compCount < 2)
        {
            container = new TransparentPanel(new BorderLayout());

            if (devicesComponent != null)
                container.add(devicesComponent);
            else if (encodingsComponent != null)
                container.add(encodingsComponent);
View Full Code Here

Examples of net.java.sip.communicator.plugin.desktoputil.TransparentPanel

        key = "impl.media.configform.DOWN";
        final JButton downButton = new JButton(resources.getI18NString(key));
        downButton.setMnemonic(resources.getI18nMnemonic(key));
        downButton.setOpaque(false);

        Container buttonBar = new TransparentPanel(new GridLayout(0, 1));
        buttonBar.add(upButton);
        buttonBar.add(downButton);

        Container parentButtonBar = new TransparentPanel(new BorderLayout());
        parentButtonBar.add(buttonBar, BorderLayout.NORTH);

        table.setModel(new EncodingConfigurationTableModel(type,
                encodingConfiguration));
        /*
         * The first column contains the check boxes which enable/disable their
         * associated encodings and it doesn't make sense to make it wider than
         * the check boxes.
         */
        TableColumnModel tableColumnModel = table.getColumnModel();
        TableColumn tableColumn = tableColumnModel.getColumn(0);
        tableColumn.setMaxWidth(tableColumn.getMinWidth());

        final ListSelectionListener tableSelectionListener =
            new ListSelectionListener()
            {
                public void valueChanged(ListSelectionEvent event)
                {
                    if (table.getSelectedRowCount() == 1)
                    {
                        int selectedRow = table.getSelectedRow();
                        if (selectedRow > -1)
                        {
                            upButton.setEnabled(selectedRow > 0);
                            downButton.setEnabled(selectedRow < (table
                                .getRowCount() - 1));
                            return;
                        }
                    }
                    upButton.setEnabled(false);
                    downButton.setEnabled(false);
                }
            };
        table.getSelectionModel().addListSelectionListener(
            tableSelectionListener);
        tableSelectionListener.valueChanged(null);

        ActionListener buttonListener = new ActionListener()
        {
            public void actionPerformed(ActionEvent event)
            {
                Object source = event.getSource();
                boolean up;
                if (source == upButton)
                    up = true;
                else if (source == downButton)
                    up = false;
                else
                    return;

                move(table, up);
            }
        };
        upButton.addActionListener(buttonListener);
        downButton.addActionListener(buttonListener);

        Container container = new TransparentPanel(new BorderLayout())
        {
            @Override
            public void setEnabled(boolean enabled)
            {
                super.setEnabled(enabled);
                table.setEnabled(enabled);
                if (enabled)
                {
                    tableSelectionListener.valueChanged(null);
                }
                else
                {
                    upButton.setEnabled(false);
                    downButton.setEnabled(false);
                }
            }
        };
        container.setPreferredSize(new Dimension(WIDTH, 100));
        container.setMaximumSize(new Dimension(WIDTH, 100));

        container.add(new JScrollPane(table), BorderLayout.CENTER);
        container.add(parentButtonBar, BorderLayout.EAST);
        return container;
    }
View Full Code Here

Examples of net.java.sip.communicator.plugin.desktoputil.TransparentPanel

            if (audioSystem != null
                && !NoneAudioSystem.LOCATOR_PROTOCOL.equalsIgnoreCase(
                    audioSystem.getLocatorProtocol()))
            {
                preview = new TransparentPanel(new GridBagLayout());
                createAudioSystemControls(audioSystem, preview);
            }
            else
            {
                AudioSystem[] availableAudioSystems
                    = AudioSystem.getAudioSystems();
                AudioSystem[] activeAudioSystems = mediaService
                    .getDeviceConfiguration().getAvailableAudioSystems();

                // If the only one active audio system which is "None" and there
                // is(are) other(s) available audio system(s), then it means
                // that the other(s) audio system(s) do(es) not have detected
                // any device.
                if(availableAudioSystems != null
                        && availableAudioSystems.length > 1
                        && activeAudioSystems != null
                        && activeAudioSystems.length == 1)
                {
                    String noAvailableAudioDevice
                        = NeomediaActivator.getResources().getI18NString(
                            "impl.media.configform.NO_AVAILABLE_AUDIO_DEVICE");
                    preview = new TransparentPanel(new GridBagLayout());
                    preview.add(new JLabel(noAvailableAudioDevice));
                }
            }
        }
        else if (type == DeviceConfigurationComboBoxModel.VIDEO)
View Full Code Here

Examples of net.java.sip.communicator.plugin.desktoputil.TransparentPanel

        statusComboBox = new GlobalStatusSelectorBox(mainFrame);
        // Align status combo box with account name field.
        statusComboBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));

        TransparentPanel statusToolsPanel
            = new TransparentPanel(new BorderLayout(0, 0));

        SIPCommMenuBar statusMenuBar = new SIPCommMenuBar();
        statusMenuBar.add(statusComboBox);
        statusToolsPanel.add(statusMenuBar, BorderLayout.WEST);

        toolbarPluginPanel
            = new TransparentPanel(new FlowLayout(FlowLayout.RIGHT, 0, 0));

        mainToolbarPluginContainer = new PluginContainer(toolbarPluginPanel,
                            Container.CONTAINER_MAIN_TOOL_BAR);

        statusToolsPanel.add(toolbarPluginPanel, BorderLayout.EAST);

        TransparentPanel rightPanel = new TransparentPanel();
        rightPanel.setLayout(new BorderLayout(0, 0));
        rightPanel.add(accountNameLabel, BorderLayout.NORTH);
        rightPanel.add(statusToolsPanel, BorderLayout.SOUTH);

        this.add(accountImageLabel, BorderLayout.WEST);
        this.add(rightPanel, BorderLayout.CENTER);

        southPluginPanel = new TransparentPanel(new BorderLayout());

        southPluginContainer = new PluginContainer(
            southPluginPanel,
            Container.CONTAINER_ACCOUNT_SOUTH);
View Full Code Here

Examples of net.java.sip.communicator.plugin.desktoputil.TransparentPanel

        cancelButton.addActionListener(this);
       
        initAccessWebcam();

        // Timer Panel
        TransparentPanel timerPanel = new TransparentPanel();
        timerPanel.setLayout(new GridLayout(0, timerImages.length));
       
        TransparentPanel tp;
        for (int i = 0; i < this.timerImages.length; i++)
        {
            this.timerImages[i] = new TimerImage("" + (timerImages.length - i));
           
            tp = new TransparentPanel();
            tp.add(this.timerImages[i], BorderLayout.CENTER);
           
            timerPanel.add(tp);
        }
       
        TransparentPanel buttonsPanel
                = new TransparentPanel(new FlowLayout(FlowLayout.RIGHT));
        buttonsPanel.add(this.grabSnapshot);
        buttonsPanel.add(cancelButton);
       
        // South Panel
        TransparentPanel southPanel = new TransparentPanel(new BorderLayout());
        southPanel.add(timerPanel, BorderLayout.CENTER);
        southPanel.add(buttonsPanel, BorderLayout.SOUTH);

        TransparentPanel videoPanel
                = new TransparentPanel(new FlowLayout(FlowLayout.CENTER));
        videoPanel.add(this.videoContainer);

        this.add(videoPanel, BorderLayout.CENTER);
        this.add(southPanel, BorderLayout.SOUTH);

        this.setResizable(false);
View Full Code Here

Examples of net.java.sip.communicator.plugin.desktoputil.TransparentPanel

    /**
     * Creates sound level related components.
     */
    private void createSoundLevelIndicators()
    {
        TransparentPanel localLevelPanel
            = new TransparentPanel(new BorderLayout(5, 0));
        TransparentPanel remoteLevelPanel
            = new TransparentPanel(new BorderLayout(5, 0));
        Call call = callPeer.getCall();

        localLevel
            = new InputVolumeControlButton(
                    call,
                    ImageLoader.MICROPHONE,
                    ImageLoader.MUTE_BUTTON,
                    false,
                    false);
        remoteLevel
            = new OutputVolumeControlButton(ImageLoader.HEADPHONE, false, false)
                .getComponent();

        final SoundLevelIndicator localLevelIndicator
            = new SoundLevelIndicator(
                    SoundLevelChangeEvent.MIN_LEVEL,
                    SoundLevelChangeEvent.MAX_LEVEL);
        final SoundLevelIndicator remoteLevelIndicator
            = new SoundLevelIndicator(
                    SoundLevelChangeEvent.MIN_LEVEL,
                    SoundLevelChangeEvent.MAX_LEVEL);

        localLevelPanel.add(localLevel, BorderLayout.WEST);
        localLevelPanel.add(localLevelIndicator, BorderLayout.CENTER);
        remoteLevelPanel.add(remoteLevel, BorderLayout.WEST);
        remoteLevelPanel.add(remoteLevelIndicator, BorderLayout.CENTER);

        GridBagConstraints constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.NONE;
        constraints.gridx = 0;
        constraints.gridy = 5;
View Full Code Here

Examples of net.java.sip.communicator.plugin.desktoputil.TransparentPanel

     * @return the buttons panel
     */
    private Component createButtonsPanel()
    {
        JPanel buttonsPanel
            = new TransparentPanel(new FlowLayout(FlowLayout.RIGHT));

        JButton okButton = new JButton(
            GuiActivator.getResources().getI18NString("service.gui.OK"));

        okButton.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent e)
            {
                selectedDevice
                    = (MediaDevice) deviceComboBox.getSelectedItem();

                dispose();
            }
        });

        buttonsPanel.add(okButton);

        cancelButton.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent e)
            {
                selectedDevice = null;
                dispose();
            }
        });

        buttonsPanel.add(cancelButton);

        return buttonsPanel;
    }
View Full Code Here

Examples of net.java.sip.communicator.plugin.desktoputil.TransparentPanel

        ResourceManagementService resources = NeomediaActivator.getResources();

        final DeviceConfiguration deviceConfig =
            mediaService.getDeviceConfiguration();

        TransparentPanel centerPanel =
            new TransparentPanel(new GridBagLayout());
        centerPanel.setMaximumSize(new Dimension(WIDTH, 150));

        JButton resetDefaultsButton = new JButton(
            resources.getI18NString(
                    "impl.media.configform.VIDEO_RESET"));
        JPanel resetButtonPanel = new TransparentPanel(
                new FlowLayout(FlowLayout.RIGHT));
        resetButtonPanel.add(resetDefaultsButton);

        final JPanel centerAdvancedPanel
            = new TransparentPanel(new BorderLayout());
        centerAdvancedPanel.add(centerPanel, BorderLayout.NORTH);
        centerAdvancedPanel.add(resetButtonPanel, BorderLayout.SOUTH);

        GridBagConstraints constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.anchor = GridBagConstraints.NORTHWEST;
        constraints.insets = new Insets(5, 5, 0, 0);
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.