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

📄 vijxtadialogpanel.java

📁 jxta官方例程
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                    }                captureDevicesList.setModel(captureDevicesModel);    }                public static void setInitiatedLocally(boolean initiatedLocally) {                ViJxtaDialogPanel.initiatedLocally = initiatedLocally;                setInSession(initiatedLocally);            }        protected static boolean isInitiatedLocally() {                return ViJxtaDialogPanel.initiatedLocally;    }        public static boolean isInSession() {                return ViJxtaDialogPanel.inSession;    }        protected static void setInSession( boolean inSession) {                ViJxtaDialogPanel.inSession = inSession;    }        protected void showPanel(final String panelName) {                                EventQueue.invokeLater(new Runnable() {                        public void run() {                                cardLayout.show(deckPanel, panelName);                            }        });    }        protected void showConfigPanel(final String panelName) {                                EventQueue.invokeLater(new Runnable() {                        public void run() {                                configCardLayout.show(configDeckPanel, panelName);                            }        });    }                protected void setupNetworkedDevicesPanel() {                    }        protected void localActionVideoSourceChosen() {                if( localDevice) {                        getCallControl().setLocalVideoSourceType(ViJxtaCallControl.LOCAL_DEVICE);                        this.setupLocalDevicesPanel();                        this.showConfigPanel(this.CONFIG_LOCAL_DEVICES_PANEL);                    }else if( networkedDevice ) {                        getCallControl().setLocalVideoSourceType(ViJxtaCallControl.NETWORKED_DEVICE);                        this.setupNetworkedDevicesPanel();                        this.showConfigPanel(this.CONFIG_NETWORKED_DEVICES_PANEL);                    }else if( noDevice) {                        getCallControl().setLocalVideoSourceType(ViJxtaCallControl.NO_DEVICE);                        this.setupOptionsPanel();                        this.showConfigPanel(this.CONFIG_LOCAL_OPTIONS_PANEL);        }    }        public void localActionNetworkedCaptureDeviceChosen() {                                        ((NetworkedDeviceMonitorControl)getCallControl().                getLocalMonitorControl()).setAuthenticated(this.authenticationCheckBox.isSelected());                ((NetworkedDeviceMonitorControl)getCallControl().                getLocalMonitorControl()).setURL(this.networkedSourceURLTextField.getText());                if(authenticationCheckBox.isSelected()) {                        ((NetworkedDeviceMonitorControl)getCallControl().                    getLocalMonitorControl()).setUserName(this.authenticationUserNameTextField.getText());                        ((NetworkedDeviceMonitorControl)getCallControl().                    getLocalMonitorControl()).setPassword(this.authenticationPasswordTextField.getText());                    }                this.setupMonitorTestPanel();                this.showConfigPanel(this.CONFIG_TEST_PANEL);    }                protected void localActionCaptureDeviceChosen() {                if(noLocalCaptureDevicesFound) {                        this.setupOptionsPanel();                        this.showConfigPanel(this.CONFIG_LOCAL_OPTIONS_PANEL);        }else{                                    if(captureDevicesList.getSelectedIndex() == -1) {                return;            }                        String deviceName = (String) captureDevicesList.getSelectedValue();                        ((LocalDeviceMonitorControl)this.getCallControl().getLocalMonitorControl()).setCaptureDevice(deviceName);                        this.setupFormatsPanel();                        this.showConfigPanel(this.CONFIG_FORMATS_PANEL);        }    }        private void setupFormatsPanel() {                DefaultListModel formatsModel = new DefaultListModel();                Iterator itr = ((LocalDeviceMonitorControl)this.getCallControl().getLocalMonitorControl()).getCaptureDeviceFormats();                while(itr.hasNext()) {                        String formatSize = (String) itr.next();                        formatsModel.addElement(formatSize);        }                this.updateMessageLabel("Please choose video capture size.");                formatsList.setModel(formatsModel);            }        private void setupOptionsPanel() {                this.updateMessageLabel("Please choose desired options for this session.");                                if(this.noLocalCaptureDevicesFound ||                getCallControl().getLocalVideoSourceType() == ViJxtaCallControl.NO_DEVICE) {                        EventQueue.invokeLater(new Runnable() {                                public void run() {                                        transmitCheckBox.setSelected(false);                                        transmitCheckBox.setEnabled(false);                }            });        }else{                        EventQueue.invokeLater(new Runnable() {                                public void run() {                                        transmitCheckBox.setSelected(true);                                        if(getCallControl().getLocalVideoSourceType() == ViJxtaCallControl.NO_DEVICE) {                                                imageQualitySlider.setEnabled(false);                                            }else{                        imageQualitySlider.setEnabled(true);                    }                }            });        }                        EventQueue.invokeLater(new Runnable() {                        public void run() {                                receiveCheckBox.setSelected(true);                                receiveCheckBox.setEnabled(true);                            }        });            }        private void localActionFormatChosen() {                if(formatsList.getSelectedIndex() == -1) {            return;        }                String selectedFormat = (String) formatsList.getSelectedValue();                ((LocalDeviceMonitorControl)this.getCallControl().getLocalMonitorControl()).setFormat(selectedFormat);                this.setupMonitorTestPanel();                        this.showConfigPanel(this.CONFIG_TEST_PANEL);    }        private void setupMonitorTestPanel() {                                this.getCallControl().getLocalMonitorControl().obtainHardware();                this.getCallControl().getLocalMonitorControl().startMonitor();                        for(int i = 0; i< 5; i++) {                        if(getCallControl().getLocalMonitorControl().getFormatSize().width != 0) {                                break;            }                        try{                                Thread.sleep(1000);            }catch(InterruptedException ix) {                ix.printStackTrace();            }        }                Dimension size = getCallControl().getLocalMonitorControl().getFormatSize();                LOG.info("testMonitorPanel Size "+ size);                monitorTestPanel.setSize(new Dimension(size.width + 40, size.height + 40));                monitorTestPanel.add(this.getCallControl().getLocalMonitorControl().getMonitorComponent());                this.updateMessageLabel("Click Next if you see live video.");            }        protected void localActionMonitorTestUnSuccessful() {                this.getCallControl().getLocalMonitorControl().resetMonitor();                if( getCallControl().getLocalVideoSourceType() == ViJxtaCallControl.NETWORKED_DEVICE ) {                        this.showConfigPanel(this.CONFIG_NETWORKED_DEVICES_PANEL);                    }else if( getCallControl().getLocalVideoSourceType() == ViJxtaCallControl.LOCAL_DEVICE ) {                        this.showConfigPanel(this.CONFIG_LOCAL_DEVICES_PANEL);        }    }        protected void localActionMonitorTestSuccessful() {                        //this.monitorTestPanel.remove (this.getCallControl ().getLocalMonitorControl ().getMonitorComponent ());                this.monitorTestComponent = null;                this.setupOptionsPanel();                this.showConfigPanel(this.CONFIG_LOCAL_OPTIONS_PANEL);                                    }        protected void localActionApplyConfigSettings() {                                getCallControl().getLocalMonitorControl().setTransmit(this.transmitCheckBox.isSelected());                this.getCallControl().getRemoteMonitorControl().setReceive(this.receiveCheckBox.isSelected());                if (LOG.isEnabledFor(Level.INFO)) {            LOG.info("Apply Config Settings");            LOG.info("LocalMonitor Control Transmit = " + getCallControl().getLocalMonitorControl().isTransmit());            LOG.info("RemoteMonitor Control Receive  = " + getCallControl().getRemoteMonitorControl().isReceive());        }                this.getCallControl().viewActionConfigured();                                this.updateMessageLabel("Ready.");                this.showPanel(this.CALL_CONTROL_PANEL);            }        protected void localActionPlaceAcceptCall() {                EventQueue.invokeLater(new Runnable() {                        public void run() {                                placeAcceptCallButton.setEnabled(false);                            }        });                if(placeAcceptCallButton.getText().equals(STRINGS.getString("action.vijxta.placecall"))) {                        this.getCallControl().viewActionPlaceCall();                    }else if(placeAcceptCallButton.getText().equals(STRINGS.getString("action.vijxta.acceptcall"))) {                        this.getCallControl().viewActionAcceptCall();        }            }        private void localActionDownloadJmf() {        try {                        ExecFactory.getExec().execDocument(new URL(URL_JMF_DOWNLOAD));        }catch(MalformedURLException mux) {                        mux.printStackTrace();        }    }        private void localActionImageQualityChanged(int value) {                                getCallControl().getLocalMonitorControl().setImageCompression(value);            }        protected void localActionHoldResumeCall() {                String buttonText = null;                if(this.getCallControl().getProtocolState() == this.getCallControl().SESSION_VIJXTA_INCALL) {                        this.getCallControl().viewActionHoldCall();                        buttonText = STRINGS.getString("action.vijxta.holdcall");                    }else if(this.getCallControl().getProtocolState() == this.getCallControl().SESSION_VIJXTA_HOLDING) {                        this.getCallControl().viewActionResumeCall();                        buttonText = STRINGS.getString("action.vijxta.resumecall");        }                final String finalButtonText = buttonText;

⌨️ 快捷键说明

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