Package net.java.sip.communicator.util.swing

Examples of net.java.sip.communicator.util.swing.TransparentPanel


        JLabel photoLabel = new JLabel();

        photoLabel.setIcon(photoLabelIcon);

        JPanel photoPanel
            = new TransparentPanel(new GridBagLayout())
            {
                /**
                 * @{inheritDoc}
                 */
                @Override
                public void paintComponent(Graphics g)
                {
                    super.paintComponent(g);

                    g = g.create();
                    try
                    {
                        AntialiasingManager.activateAntialiasing(g);

                        g.setColor(Color.GRAY);
                        g.fillRoundRect(
                                0, 0, this.getWidth(), this.getHeight(),
                                6, 6);
                    }
                    finally
                    {
                        g.dispose();
                    }
                }
            };

        photoPanel.setPreferredSize(new Dimension(320, 240));

        GridBagConstraints photoPanelConstraints = new GridBagConstraints();

        photoPanelConstraints.anchor = GridBagConstraints.CENTER;
        photoPanelConstraints.fill = GridBagConstraints.NONE;
        photoPanel.add(photoLabel, photoPanelConstraints);

        return photoPanel;
    }
View Full Code Here


     * @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

        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

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

        localLevel = new InputVolumeControlButton(
                callPeer.getCall(),
                ImageLoader.MICROPHONE,
                ImageLoader.MUTE_BUTTON,
                false, 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

        deviceLabel.setDisplayedMnemonic(getDisplayedMnemonic(type));
        deviceLabel.setLabelFor(deviceComboBox);

        final Container devicePanel
            = new TransparentPanel(new FlowLayout(FlowLayout.CENTER));

        devicePanel.setMaximumSize(new Dimension(WIDTH, 25));
        devicePanel.add(deviceLabel);
        devicePanel.add(deviceComboBox);

        final JPanel deviceAndPreviewPanel
            = new TransparentPanel(new BorderLayout());
        int preferredDeviceAndPreviewPanelHeight;

        switch (type)
        {
        case DeviceConfigurationComboBoxModel.AUDIO:
            preferredDeviceAndPreviewPanelHeight = 225;
            break;
        case DeviceConfigurationComboBoxModel.VIDEO:
            preferredDeviceAndPreviewPanelHeight = 305;
            break;
        default:
            preferredDeviceAndPreviewPanelHeight = 0;
            break;
        }
        if (preferredDeviceAndPreviewPanelHeight > 0)
            deviceAndPreviewPanel.setPreferredSize(
                    new Dimension(WIDTH, preferredDeviceAndPreviewPanelHeight));
        deviceAndPreviewPanel.add(devicePanel, BorderLayout.NORTH);

        final ActionListener deviceComboBoxActionListener
            = new ActionListener()
            {
                public void actionPerformed(ActionEvent event)
                {
                    boolean revalidateAndRepaint = false;

                    for (int i = deviceAndPreviewPanel.getComponentCount() - 1;
                            i >= 0;
                            i--)
                    {
                        Component c = deviceAndPreviewPanel.getComponent(i);

                        if (c != devicePanel)
                        {
                            deviceAndPreviewPanel.remove(i);
                            revalidateAndRepaint = true;
                        }
                    }

                    Component preview = null;

                    if ((deviceComboBox.getSelectedItem() != null)
                            && deviceComboBox.isShowing())
                    {
                        preview = createPreview(type, deviceComboBox,
                            deviceAndPreviewPanel.getPreferredSize());
                    }

                    if (preview != null)
                    {
                        deviceAndPreviewPanel.add(preview, BorderLayout.CENTER);
                        revalidateAndRepaint = true;
                    }

                    if (revalidateAndRepaint)
                    {
                        deviceAndPreviewPanel.revalidate();
                        deviceAndPreviewPanel.repaint();
                    }
                }
            };

        deviceComboBox.addActionListener(deviceComboBoxActionListener);
View Full Code Here

        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);

        Container container = new TransparentPanel(new BorderLayout());
        container.setPreferredSize(new Dimension(WIDTH, 100));
        container.setMaximumSize(new Dimension(WIDTH, 100));

        container.add(new JScrollPane(table), BorderLayout.CENTER);
        container.add(parentButtonBar, BorderLayout.EAST);

        table.setModel(new EncodingConfigurationTableModel(type,
                encodingConfiguration));
        /*
         * The first column contains the check boxes which enable/disable their
View Full Code Here

                AudioSystem audioSystem = (AudioSystem) selectedItem;

                if (!NoneAudioSystem.LOCATOR_PROTOCOL.equalsIgnoreCase(
                        audioSystem.getLocatorProtocol()))
                {
                    preview = new TransparentPanel(new GridBagLayout());
                    createAudioSystemControls(audioSystem, preview);
                }
            }
        }
        else if (type == DeviceConfigurationComboBoxModel.VIDEO)
View Full Code Here

        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

Related Classes of net.java.sip.communicator.util.swing.TransparentPanel

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.