⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vijxtadialogview.java

📁 Myjxta的源代码 基于JXTA的P2P即时通信系统
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
    }    private JPanel buildConfigNetworkedDevicesPanel() {        double b = 5;        double sizes[][] = {{TableLayout.PREFERRED},                {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}};        TableLayout tbl = new TableLayout(sizes);        JPanel devicePanel = new JPanel(tbl);        devicePanel.setBorder(new TitledBorder("Networked Webcam Config"));        double authenticationSizes[][] = {{TableLayout.PREFERRED},                {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}};        TableLayout authenticationTbl = new TableLayout(authenticationSizes);        JPanel authenticationPanel = new JPanel(authenticationTbl);        devicePanel.add(authenticationPanel, "0,2,c,c");        authenticationPanel.setBorder(new TitledBorder("Authentication"));        // main panel        JLabel label = null;        label = new JLabel("The Remote WebCams URL");        devicePanel.add(label, "0,0");        networkedSourceURLTextField = new JTextField(20);        devicePanel.add(networkedSourceURLTextField, "0,1");        // authentication panel        authenticationCheckBox = new JCheckBox("Use Authentication");        authenticationPanel.add(authenticationCheckBox, "0,0");        authenticationCheckBox.addItemListener(new ItemListener() {            public void itemStateChanged(ItemEvent e) {                boolean authenticated = e.getStateChange() == e.SELECTED;                authenticationUserNameTextField.setEnabled(authenticated);                authenticationPasswordTextField.setEnabled(authenticated);                ((NetworkedDeviceMonitorControl) getCallControl().                        getLocalMonitorControl()).                        setAuthenticated(authenticated);            }        });        label = new JLabel("User Name");        authenticationPanel.add(label, "0,1");        authenticationUserNameTextField = new JTextField(10);        authenticationPanel.add(authenticationUserNameTextField, "0,2");        authenticationUserNameTextField.setEnabled(false);        label = new JLabel("Password");        authenticationPanel.add(label, "0,3");        authenticationPasswordTextField = new JPasswordField(10);        authenticationPanel.add(authenticationPasswordTextField, "0,4");        authenticationPasswordTextField.setEnabled(false);        JButton nextButton = new JButton("Next >");        devicePanel.add(nextButton, "0,3,c,c");        nextButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                localActionNetworkedCaptureDeviceChosen();            }        });        return devicePanel;    }    private JPanel buildConfigLocalDevicesPanel() {        double b = 10;        double sizes[][] = {{TableLayout.FILL},                {TableLayout.PREFERRED, b, TableLayout.PREFERRED, 20, TableLayout.PREFERRED}};        TableLayout tbl = new TableLayout(sizes);        JPanel devicePanel = new JPanel(tbl);        captureDevicesList = new JList();        captureDevicesList.setBorder(new TitledBorder("Capture Devices"));        devicePanel.add(captureDevicesList, "0,0,c,c");        JButton nextButton = new JButton("Next >");        devicePanel.add(nextButton, "0,2,c,c");        nextButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                localActionCaptureDeviceChosen();            }        });        jmfErrorLabel = new JLabel("");        devicePanel.add(jmfErrorLabel, "0,4,c,c");        jmfErrorLabel.addMouseListener(new MouseAdapter() {            public void mouseClicked(MouseEvent me) {                localActionDownloadJmf();            }        });        return devicePanel;    }    private JPanel buildConfigFormatsPanel() {        double b = 10;        double sizes[][] = {{TableLayout.FILL},                {TableLayout.PREFERRED, TableLayout.PREFERRED}};        TableLayout tbl = new TableLayout(sizes);        JPanel formatsPanel = new JPanel(tbl);        formatsList = new JList();        formatsList.setBorder(new TitledBorder("Video Frame Sizes"));        formatsPanel.add(formatsList, "0,0,c,c");        JButton nextButton = new JButton("Next >");        nextButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                localActionFormatChosen();            }        });        formatsPanel.add(nextButton, "0,1, c, c");        return formatsPanel;    }    private JPanel buildConfigTestPanel() {        double b = 10;        double sizes[][] = {{TableLayout.PREFERRED}, {TableLayout.PREFERRED, b, TableLayout.PREFERRED}};        TableLayout tbl = new TableLayout(sizes);        JPanel configTestPanel = new JPanel(tbl);        monitorTestPanel = new JPanel();        monitorTestPanel.setBorder(new TitledBorder("Monitor Panel"));        configTestPanel.add(monitorTestPanel, "0,0");        double actionPanelSizes[][] = {{TableLayout.PREFERRED, TableLayout.PREFERRED}, {TableLayout.PREFERRED}};        TableLayout actionTbl = new TableLayout(actionPanelSizes);        JPanel actionPanel = new JPanel(actionTbl);        JButton nextButton = new JButton("Next >");        actionPanel.add(nextButton, "1,0");        nextButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                localActionMonitorTestSuccessful();            }        });        JButton backButton = new JButton("< Back");        actionPanel.add(backButton, "0, 0");        backButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                localActionMonitorTestUnSuccessful();            }        });        configTestPanel.add(actionPanel, "0, 2, c, c");        return configTestPanel;    }    private JPanel buildConfigLocalOptionsPanel() {        double b = 10;        double sizes[][] = {{TableLayout.PREFERRED, TableLayout.PREFERRED}, {TableLayout.PREFERRED, TableLayout.PREFERRED}};        TableLayout tbl = new TableLayout(sizes);        JPanel optionsPanel = new JPanel(tbl);        double transmitSizes[][] = {{TableLayout.PREFERRED}, {TableLayout.PREFERRED, TableLayout.PREFERRED}};        TableLayout transmitTbl = new TableLayout(transmitSizes);        JPanel transmitPanel = new JPanel(transmitTbl);        transmitPanel.setBorder(new TitledBorder(STRINGS.getString("label.vijxta.transmitoptions")));        optionsPanel.add(transmitPanel, "0, 0");        transmitCheckBox = new JCheckBox(STRINGS.getString("label.vijxta.transmit"));        transmitCheckBox.addItemListener(new ItemListener() {            public void itemStateChanged(ItemEvent e) {                imageQualitySlider.setEnabled(e.getStateChange() == e.SELECTED ? true : false);            }        });        transmitPanel.add(transmitCheckBox, "0, 0");        imageQualitySlider = new JSlider(SwingConstants.HORIZONTAL,                Monitor.MINIMUM_IMAGE_COMPRESSION,                Monitor.MAXIMUM_IMAGE_COMPRESSION,                Monitor.DEFAULT_IMAGE_COMPRESSION);        transmitPanel.add(imageQualitySlider, "0, 1");        imageQualitySlider.setBorder(new TitledBorder("Video Quality"));        imageQualitySlider.setLabelTable(imageQualityLabelTable);        imageQualitySlider.setMajorTickSpacing(1);        imageQualitySlider.setPaintLabels(true);        imageQualitySlider.setPaintTicks(false);        imageQualitySlider.setSnapToTicks(true);        imageQualitySlider.setEnabled(false);        imageQualitySlider.addChangeListener(new ChangeListener() {            public void stateChanged(ChangeEvent ce) {                localActionImageQualityChanged(imageQualitySlider.getValue());            }        });        double receiveSizes[][] = {{TableLayout.PREFERRED}, {TableLayout.PREFERRED}};        TableLayout receiveTbl = new TableLayout(receiveSizes);        JPanel receivePanel = new JPanel(receiveTbl);        receivePanel.setBorder(new TitledBorder(STRINGS.getString("label.vijxta.receiveoptions")));        optionsPanel.add(receivePanel, "1, 0");        receiveCheckBox = new JCheckBox(STRINGS.getString("label.vijxta.receive"));        receiveCheckBox.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                getCallControl().getRemoteMonitorControl().setReceive(receiveCheckBox.isSelected());            }        });        receivePanel.add(receiveCheckBox, "0,0");        JButton actionButton = new JButton(STRINGS.getString("action.ok"));        optionsPanel.add(actionButton, "0, 1,c,c");        actionButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                localActionApplyConfigSettings();            }        });        return optionsPanel;    }    private JPanel buildCallControlPanel() {        double b = 10;        double sizes[][] = {{TableLayout.PREFERRED},                {TableLayout.PREFERRED, TableLayout.PREFERRED}};        TableLayout tbl = new TableLayout(sizes);        JPanel callControlPanel = new JPanel(tbl);        //-----------        double monitorSizes[][] = {{TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED},                {TableLayout.PREFERRED}};        TableLayout monitorTbl = new TableLayout(monitorSizes);        JPanel monitorPanel = new JPanel(monitorTbl);        callControlPanel.add(monitorPanel, "0,0,c,c");        remoteMonitorPanel = new JPanel();        remoteMonitorPanel.setPreferredSize(new Dimension(200, 140));        remoteMonitorPanel.setBorder(new TitledBorder("Remote"));        monitorPanel.add(remoteMonitorPanel, "2,0,c,t");        double localSizes[][] = {{TableLayout.PREFERRED},                {TableLayout.PREFERRED, TableLayout.PREFERRED}};        TableLayout localTbl = new TableLayout(localSizes);        JPanel localPanel = new JPanel(localTbl);        monitorPanel.add(localPanel, "0, 0, c, t");        localMonitorPanel = new JPanel();        localMonitorPanel.setPreferredSize(new Dimension(200, 140));        localMonitorPanel.setBorder(new TitledBorder("Local"));        localPanel.add(localMonitorPanel, "0,0");        refreshRateSlider = new JSlider(SwingConstants.HORIZONTAL,                Monitor.MINIMUM_FRAMES_PER_SECOND,                Monitor.MAXIMUM_FRAMES_PER_SECOND,                Monitor.DEFAULT_FRAMES_PER_SECOND);        refreshRateSlider.setEnabled(false);        localPanel.add(refreshRateSlider, "0, 1");        refreshRateSlider.setFont(new Font(this.getFont().getName(), this.getFont().getStyle(), 13));        refreshRateSlider.setPaintLabels(true);        refreshRateSlider.setBorder(new TitledBorder(null, "Refresh Rate", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION));        refreshRateSlider.setPaintTicks(false);        refreshRateSlider.setSnapToTicks(true);        refreshRateSlider.addChangeListener(new ChangeListener() {            public void stateChanged(ChangeEvent ce) {                getCallControl().getLocalMonitorControl().setRefreshRate(refreshRateSlider.getValue());                refreshRateLabel.setText(String.valueOf(refreshRateSlider.getValue()));            }        });        //-------------        double actionSizes[][] = {{TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED},                {TableLayout.PREFERRED}};        TableLayout actionTbl = new TableLayout(actionSizes);        JPanel actionPanel = new JPanel(actionTbl);        actionPanel.setBorder(null);        callControlPanel.add(actionPanel, "0,1,c,c");        placeAcceptCallButton = new JButton(STRINGS.getString("action.vijxta.placecall"));        placeAcceptCallButton.setEnabled(false);        actionPanel.add(placeAcceptCallButton, "0,0");        placeAcceptCallButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                localActionPlaceAcceptCall();            }        });        holdResumeCallButton = new JButton(STRINGS.getString("action.vijxta.holdcall"));        holdResumeCallButton.setEnabled(false);        actionPanel.add(holdResumeCallButton, "1,0");        holdResumeCallButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                localActionHoldResumeCall();            }        });        endCallButton = new JButton(STRINGS.getString("action.vijxta.endcall"));        endCallButton.setEnabled(true);        actionPanel.add(endCallButton, "2,0");        endCallButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                localActionEndCall();            }        });        statsButton = new JButton(STRINGS.getString("action.vojxta.stats"));        actionPanel.add(statsButton, "3,0");        statsButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                showPanel(STATS_PANEL);            }        });        // it's safe to take this out of the ui        JButton stopMonitorsButton = new JButton("STOP MONITORS");        //actionPanel.add (stopMonitorsButton,"4,0");        stopMonitorsButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                if (Logging.SHOW_INFO &&                        LOG.isLoggable(Level.INFO)) {                    LOG.info("StopMonitor Button Pressed, Ending Call");                }                getCallControl().viewActionEndCall();            }        });        return callControlPanel;    }    private JPanel buildStatsTrafficPanel() {        double b = 5;        double sizes[][] = {{TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED},                {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}};        TableLayout tbl = new TableLayout(sizes);        JPanel trafficPanel = new JPanel(tbl);        trafficPanel.setBorder(new TitledBorder(null, STRINGS.getString("label.vojxta.traffic")));        JLabel label = null;        JSeparator sep = null;        label = new JLabel(STRINGS.getString("label.vojxta.received"));        trafficPanel.add(label, "0,0, 1,0");        label = new JLabel(STRINGS.getString("label.vojxta.sent"));        trafficPanel.add(label,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -