use of jmri.jmrit.decoderdefn.DecoderFile in project JMRI by JMRI.
the class NewLocoSelPane method openButton.
/**
* Handle pushing the open programmer button by finding names, then calling
* a template method
*/
protected void openButton() {
// find the decoderFile object
DecoderFile decoderFile = DecoderIndexFile.instance().fileFromTitle((String) decoderBox.getSelectedItem());
if (log.isDebugEnabled()) {
log.debug("decoder file: " + decoderFile.getFilename());
}
// create a dummy RosterEntry with the decoder info
RosterEntry re = new RosterEntry();
re.setDecoderFamily(decoderFile.getFamily());
re.setDecoderModel(decoderFile.getModel());
re.setId(Bundle.getMessage("LabelNewDecoder"));
// note we're leaving the filename information as null
// add the new roster entry to the in-memory roster
Roster.getDefault().addEntry(re);
startProgrammer(decoderFile, re);
}
Aggregations