@Override public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); MediaDevice mediaDevice = (MediaDevice) value; Dimension screenSize = null; if (mediaDevice != null) screenSize = ((VideoMediaFormat) mediaDevice.getFormat()).getSize(); this.setText(screenSize.width + "x" + screenSize.height); return this; }
/** * Sets the indicator which determines whether the streaming of local video in a specific * <tt>Call</tt> is allowed. The setting does not reflect the availability of actual video capture * devices, it just expresses the desire of the user to have the local video streamed in the case * the system is actually able to do so. * * @param call the <tt>Call</tt> to allow/disallow the streaming of local video for * @param mediaDevice the media device to use for the desktop streaming * @param allowed <tt>true</tt> to allow the streaming of local video for the specified * <tt>Call</tt>; <tt>false</tt> to disallow it * @throws OperationFailedException if initializing local video fails. */ public void setLocalVideoAllowed(Call call, MediaDevice mediaDevice, boolean allowed) throws OperationFailedException { ((CallJabberImpl) call).setVideoDevice(mediaDevice); size = ((VideoMediaFormat) mediaDevice.getFormat()).getSize(); super.setLocalVideoAllowed(call, allowed); }