use of pcgen.gui2.tabs.bio.NoteInfoPane in project pcgen by PCGen.
the class DescriptionInfoTab method createModels.
@Override
public ModelMap createModels(CharacterFacade character) {
ModelMap models = new ModelMap();
DefaultListModel listModel = new DefaultListModel();
List<NoteInfoPane> notePaneList = new ArrayList<>();
//$NON-NLS-1$
PageItem firstPage = new PageItem(character, LanguageBundle.getString("in_descBiography"), bioPane);
listModel.addElement(firstPage);
//$NON-NLS-1$
listModel.addElement(new PageItem(character, LanguageBundle.getString("in_portrait"), portraitPane));
//$NON-NLS-1$
listModel.addElement(new PageItem(character, LanguageBundle.getString("in_descCampHist"), histPane));
models.put(ListModel.class, listModel);
models.put(List.class, notePaneList);
models.put(NoteListHandler.class, new NoteListHandler(character, listModel, notePaneList));
ListSelectionModel model = new DefaultListSelectionModel();
model.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
model.setSelectionInterval(0, 0);
models.put(ListSelectionModel.class, model);
models.put(PageHandler.class, new PageHandler(model, firstPage));
models.put(AddAction.class, new AddAction(character));
return models;
}
Aggregations