@Override public void setSettings(ProjectiveDevice.Settings settings) { super.setSettings(settings); if (settings instanceof ProjectiveDevice.CalibrationSettings) { this.settings = new CalibrationSettings((ProjectiveDevice.CalibrationSettings)settings); } else if (settings instanceof ProjectiveDevice.CalibratedSettings) { this.settings = new CalibratedSettings((ProjectiveDevice.CalibratedSettings)settings); } else { this.settings = new SettingsImplementation((ProjectiveDevice.Settings)settings); } if (this.settings.getName() == null || this.settings.getName().length() == 0) { this.settings.setName("Camera " + String.format("%2d", this.settings.getDeviceNumber())); } }
public void setFrameGrabber(Class<? extends FrameGrabber> frameGrabber) { String oldDescription = getDescription(); firePropertyChange("frameGrabber", this.frameGrabber, this.frameGrabber = frameGrabber); firePropertyChange("description", oldDescription, getDescription()); firePropertyChange("deviceNumber", this.deviceNumber, this.deviceNumber = null); firePropertyChange("deviceFile", this.deviceFile, this.deviceFile = null); firePropertyChange("devicePath", this.devicePath, this.devicePath = null); return; hasDeviceNumber = true; } catch (NoSuchMethodException e2) { firePropertyChange("deviceNumber", this.deviceNumber, this.deviceNumber = null); frameGrabber.getConstructor(File.class); } catch (NoSuchMethodException e) { firePropertyChange("deviceFile", this.deviceFile, this.deviceFile = null); firePropertyChange("devicePath", this.devicePath, this.devicePath = null); setDeviceNumber(0); } catch (PropertyVetoException e) { }
public String getDeviceFilename() { return getDeviceFile() == null ? "" : getDeviceFile().getPath(); } public void setDeviceFilename(String deviceFilename) throws PropertyVetoException {
public void setDeviceNumber(Integer deviceNumber) throws PropertyVetoException { if (deviceNumber != null) { try { if (frameGrabber != null) { try { frameGrabber.getConstructor(int.class); } catch (NoSuchMethodException e) { frameGrabber.getConstructor(Integer.class); } } setDevicePath(null); setDeviceFile(null); } catch (NoSuchMethodException e) { throw new PropertyVetoExceptionThatNetBeansLikes(frameGrabber.getSimpleName() + " does not accept a deviceNumber.", new PropertyChangeEvent(this, "deviceNumber", this.deviceNumber, this.deviceNumber = null)); } } String oldDescription = getDescription(); firePropertyChange("deviceNumber", this.deviceNumber, this.deviceNumber = deviceNumber); firePropertyChange("description", oldDescription, getDescription()); }
public void setDeviceFile(File deviceFile) throws PropertyVetoException { if (deviceFile != null) { try { if (frameGrabber != null) { frameGrabber.getConstructor(File.class); } setDeviceNumber(null); setDevicePath(null); } catch (NoSuchMethodException e) { deviceFile = null; throw new PropertyVetoExceptionThatNetBeansLikes(frameGrabber.getSimpleName() + " does not accept a deviceFile.", new PropertyChangeEvent(this, "deviceFile", this.deviceFile, this.deviceFile = null)); } } String oldDescription = getDescription(); firePropertyChange("deviceFile", this.deviceFile, this.deviceFile = deviceFile); firePropertyChange("description", oldDescription, getDescription()); } public String getDeviceFilename() {
public void setDevicePath(String devicePath) throws PropertyVetoException { if (devicePath != null) { try { if (frameGrabber != null) { frameGrabber.getConstructor(String.class); } setDeviceNumber(null); setDeviceFile(null); } catch (NoSuchMethodException e) { devicePath = ""; throw new PropertyVetoExceptionThatNetBeansLikes(frameGrabber.getSimpleName() + " does not accept a devicePath.", new PropertyChangeEvent(this, "devicePath", this.devicePath, this.devicePath = null)); } } String oldDescription = getDescription(); firePropertyChange("devicePath", this.devicePath, this.devicePath = devicePath); firePropertyChange("description", oldDescription, getDescription()); }
public String getDescription() { return si.getDescription(); }
public String getDescription() { return si.getDescription(); }
public String getDevicePath() { return si.getDevicePath(); } public void setDevicePath(String devicePath) throws PropertyVetoException { si.setDevicePath(devicePath); }
public String getDevicePath() { return si.getDevicePath(); } public void setDevicePath(String devicePath) throws PropertyVetoException { si.setDevicePath(devicePath); }
public String getDeviceFilename() { return si.getDeviceFilename(); } public void setDeviceFilename(String deviceFilename) throws PropertyVetoException { si.setDeviceFilename(deviceFilename); }
public Integer getDeviceNumber() { return si.getDeviceNumber(); } public void setDeviceNumber(Integer deviceNumber) throws PropertyVetoException { si.setDeviceNumber(deviceNumber); }
public Class<? extends FrameGrabber> getFrameGrabber() { return si.getFrameGrabber(); } public void setFrameGrabber(Class<? extends FrameGrabber> frameGrabber) { si.setFrameGrabber(frameGrabber); }
public String getFormat() { return si.getFormat(); } public void setFormat(String format) { si.setFormat(format); }
public String getFormat() { return si.getFormat(); } public void setFormat(String format) { si.setFormat(format); }
public File getDeviceFile() { return si.getDeviceFile(); } public void setDeviceFile(File deviceFile) throws PropertyVetoException { si.setDeviceFile(deviceFile); }
public String getDeviceFilename() { return si.getDeviceFilename(); } public void setDeviceFilename(String deviceFilename) throws PropertyVetoException { si.setDeviceFilename(deviceFilename); }
public Class<? extends FrameGrabber> getFrameGrabber() { return si.getFrameGrabber(); } public void setFrameGrabber(Class<? extends FrameGrabber> frameGrabber) { si.setFrameGrabber(frameGrabber); }
public int getBitsPerPixel() { return si.getBitsPerPixel(); } public void setBitsPerPixel(int bitsPerPixel) { si.setBitsPerPixel(bitsPerPixel); }
public int getBitsPerPixel() { return si.getBitsPerPixel(); } public void setBitsPerPixel(int bitsPerPixel) { si.setBitsPerPixel(bitsPerPixel); }