public FlexWidgets() { LuraWaveService service; try { ServiceFactory factory = new ServiceFactory(); service = factory.getInstance(LuraWaveService.class); } catch (DependencyException e) { throw new RuntimeException(e); } // get license code from ImageJ preferences String prefCode = Prefs.get(LuraWaveServiceImpl.LICENSE_PROPERTY, null); String propCode = service.getLicenseCode(); String code = ""; if (prefCode != null) code = prefCode; else if (propCode != null) code = null; // hidden code String licenseLabel = "LuraWave license code"; licenseBox = ConfigWindow.makeTextField(); licenseBox.setText(code == null ? "(Licensed)" : code); licenseBox.setEditable(code != null); licenseBox.getDocument().addDocumentListener(this); labels = new String[] {licenseLabel}; widgets = new Component[] {licenseBox}; }
public FlexWidgets() { LuraWaveService service; try { ServiceFactory factory = new ServiceFactory(); service = factory.getInstance(LuraWaveService.class); } catch (DependencyException e) { throw new RuntimeException(e); } // get license code from ImageJ preferences String prefCode = Prefs.get(LuraWaveServiceImpl.LICENSE_PROPERTY, null); String propCode = service.getLicenseCode(); String code = ""; if (prefCode != null) code = prefCode; else if (propCode != null) code = null; // hidden code String licenseLabel = "LuraWave license code"; licenseBox = ConfigWindow.makeTextField(); licenseBox.setText(code == null ? "(Licensed)" : code); licenseBox.setEditable(code != null); licenseBox.getDocument().addDocumentListener(this); labels = new String[] {licenseLabel}; widgets = new Component[] {licenseBox}; }