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

📄 vijxtadialogpanel.java

📁 jxta官方例程
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                EventQueue.invokeLater(new Runnable() {                        public void run() {                                holdResumeCallButton.setText(finalButtonText);                            }        });            }        protected void localActionEndCall() {                EventQueue.invokeLater(new Runnable() {                        public void run() {                                placeAcceptCallButton.setEnabled(false);                                holdResumeCallButton.setEnabled(false);                                endCallButton.setEnabled(false);                            }        });                this.getCallControl().viewActionEndCall();            }        private void UI() {                this.setPreferredSize(new Dimension(440, 300));                double sizes[][] = {{TableLayout.FILL},{TableLayout.PREFERRED, TableLayout.FILL}};        TableLayout tbl = new TableLayout(sizes);        JPanel uiPanel = new JPanel(tbl);                uiPanel.add(buildMessagePanel(), "0,0,l,c");                cardLayout  = new CardLayout();        deckPanel = new JPanel(cardLayout);                deckPanel.add(buildNoResponsePanel(), NO_RESPONSE_PANEL);                deckPanel.add(buildConfigPanel(), CONFIG_PANEL);                deckPanel.add(this.buildCallControlPanel(), this.CALL_CONTROL_PANEL);                deckPanel.add(this.buildStatsPanel(), this.STATS_PANEL);                deckPanel.add(this.buildErrorPanel(), this.ERROR_PANEL);                deckPanel.add(this.buildIdlePanel(), this.IDLE_PANEL);                                uiPanel.add(deckPanel,"0,1,c,c");                showPanel(this.NO_RESPONSE_PANEL);                this.add(uiPanel);    }        private JPanel buildErrorPanel() {                double sizes[][] = {{TableLayout.PREFERRED},        {TableLayout.PREFERRED,TableLayout.PREFERRED}};                TableLayout tbl = new TableLayout(sizes);                JPanel panel = new JPanel(tbl);                errorMessageLabel = new JLabel("ERROR");                panel.add(errorMessageLabel,"0,0");                return panel;            }        private JPanel buildMessagePanel() {                double b = 5;        double sizes[][] = {{ b, TableLayout.FILL, b},        {b,TableLayout.PREFERRED,b,TableLayout.PREFERRED,b,TableLayout.PREFERRED, b}};                TableLayout tbl = new TableLayout(sizes);                JPanel panel = new JPanel(tbl);                productLabel = new JLabel("viJXTA .01");        //productLabel.setFont (new Font ("Arial", Font.BOLD, 14));        productLabel.setForeground(new Color(0.0f,0.0f,0.0f,0.5f));        panel.add(productLabel, "1,1,l,c");                protocolStateLabel = new JLabel("protocolState");        panel.add(protocolStateLabel, "1,3,l,c");                messageLabel = new JLabel("Message");        messageLabel.setFont(new Font("Arial", Font.BOLD, 14));        messageLabel.setForeground(new Color(0.0f,0.0f,0.0f));        panel.add(messageLabel, "1,5,c,c");                return panel;    }        private JPanel buildConfigPanel() {                configCardLayout = new CardLayout();                configDeckPanel = new JPanel(configCardLayout);                configDeckPanel.add(buildConfigChooseVideoSourcePanel(),this.CONFIG_VIDEO_SOURCE_PANEL);                configDeckPanel.add(buildConfigLocalDevicesPanel(),this.CONFIG_LOCAL_DEVICES_PANEL);                configDeckPanel.add(buildConfigNetworkedDevicesPanel(),this.CONFIG_NETWORKED_DEVICES_PANEL);                configDeckPanel.add(buildConfigFormatsPanel(),this.CONFIG_FORMATS_PANEL);                configDeckPanel.add(this.buildConfigLocalOptionsPanel(), this.CONFIG_LOCAL_OPTIONS_PANEL);                configDeckPanel.add(buildConfigTestPanel(),this.CONFIG_TEST_PANEL);                this.showConfigPanel(this.CONFIG_VIDEO_SOURCE_PANEL);                return configDeckPanel;            }        private JPanel buildConfigChooseVideoSourcePanel() {                double b  = 5;        double sizes[][] = {{TableLayout.PREFERRED},        {TableLayout.PREFERRED,TableLayout.PREFERRED,TableLayout.PREFERRED,TableLayout.PREFERRED}};                TableLayout tbl = new TableLayout(sizes);                JPanel panel = new JPanel(tbl);        panel.setBorder(new TitledBorder("VideoSource"));                JRadioButton localDeviceRadioButton = new JRadioButton("Local Webcam (FireWire 1394 or USB)");        panel.add(localDeviceRadioButton,"0,0");        localDeviceRadioButton.addItemListener(new ItemListener() {            public void itemStateChanged(ItemEvent e) {                localDevice = e.getStateChange() == e.SELECTED ? true : false;            }        });                JRadioButton networkedDeviceRadioButton = new JRadioButton("Networked Webcam (URL)");        panel.add(networkedDeviceRadioButton,"0,1");        networkedDeviceRadioButton.addItemListener(new ItemListener() {            public void itemStateChanged(ItemEvent e) {                networkedDevice = e.getStateChange() == e.SELECTED ? true : false;            }        });                JRadioButton noDeviceRadioButton = new JRadioButton("No Webcam (Receive Only)");        panel.add(noDeviceRadioButton,"0,2");        noDeviceRadioButton.addItemListener(new ItemListener() {            public void itemStateChanged(ItemEvent e) {                noDevice = e.getStateChange() == e.SELECTED ? true : false;            }        });                ButtonGroup bGroup = new ButtonGroup();                bGroup.add(localDeviceRadioButton);        bGroup.add(networkedDeviceRadioButton);        bGroup.add(noDeviceRadioButton);                JButton nextButton = new JButton("Next >");        panel.add(nextButton, "0,3,c,c");        nextButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent ae) {                                localActionVideoSourceChosen();            }        });                return panel;            }            private JPanel buildIdlePanel() {        double b  = 20;        double sizes[][] = {{ b,TableLayout.FILL,b},        {b,TableLayout.FILL,b}};                TableLayout tbl = new TableLayout(sizes);                JPanel panel = new JPanel(tbl);                JLabel tempLabel = new JLabel("LOGO Goes Here.");        panel.add(tempLabel,"1,1,c,c");                        return panel;    }        private JPanel buildNoResponsePanel() {                double sizes[][] = {{ TableLayout.FILL},        {TableLayout.FILL}};                TableLayout tbl = new TableLayout(sizes);                JPanel panel = new JPanel(tbl);                        return panel;    }        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();       

⌨️ 快捷键说明

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