protected XMLWriterNodeDialog() { super(); addDialogComponent( new DialogComponentColumnNameSelection( new SettingsModelString(XMLWriterNodeModel.CFGKEY_XML_COL, "XML Data"), "XML Column", 0, true, false, new ColumnFilter() { @Override public boolean includeColumn(DataColumnSpec colSpec) { if (colSpec != null && colSpec.getType().equals(XMLCell.TYPE)) { return true; } return false; } @Override public String allFilteredMsg() { return "No XML columns available for selection!"; } })); createNewGroup("Filename conventions"); final SettingsModelBoolean sb_use_rowid = new SettingsModelBoolean(XMLWriterNodeModel.CFGKEY_USE_ROWID, true); final SettingsModelString sb_basename = new SettingsModelString(XMLWriterNodeModel.CFGKEY_BASENAME, "document"); sb_basename.setEnabled(!sb_use_rowid.getBooleanValue()); addDialogComponent( new DialogComponentString( new SettingsModelString(XMLWriterNodeModel.CFGKEY_EXTN, ".xml"), "Filename extension")); addDialogComponent(new DialogComponentBoolean(sb_use_rowid, "Use Row ID?")); addDialogComponent(new DialogComponentString(sb_basename, "Basename")); sb_use_rowid.addChangeListener( new ChangeListener() { @Override public void stateChanged(ChangeEvent arg0) { sb_basename.setEnabled(!sb_use_rowid.getBooleanValue()); } }); createNewGroup("Save XML files to folder..."); addDialogComponent( new DialogComponentString( new SettingsModelString(XMLWriterNodeModel.CFGKEY_FOLDER, "c:/temp"), "Folder to save to...")); }
private void addLabelingOptions() { setHorizontalPlacement(true); m_useCustomTrackPrefixModel.addChangeListener( e -> m_customTrackPrefixModel.setEnabled(m_useCustomTrackPrefixModel.getBooleanValue())); addDialogComponent( new DialogComponentBoolean( m_useCustomTrackPrefixModel, "Tracks are labeled with a custom prefix")); m_customTrackPrefixModel.setEnabled(false); addDialogComponent(new DialogComponentString(m_customTrackPrefixModel, "Prefix:")); setHorizontalPlacement(false); }