Search in sources :

Example 1 with NoteInfoPane

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;
}
Also used : ArrayList(java.util.ArrayList) DefaultListModel(javax.swing.DefaultListModel) ListSelectionModel(javax.swing.ListSelectionModel) DefaultListSelectionModel(javax.swing.DefaultListSelectionModel) DefaultListSelectionModel(javax.swing.DefaultListSelectionModel) NoteInfoPane(pcgen.gui2.tabs.bio.NoteInfoPane)

Aggregations

ArrayList (java.util.ArrayList)1 DefaultListModel (javax.swing.DefaultListModel)1 DefaultListSelectionModel (javax.swing.DefaultListSelectionModel)1 ListSelectionModel (javax.swing.ListSelectionModel)1 NoteInfoPane (pcgen.gui2.tabs.bio.NoteInfoPane)1