@Override public void restoreModels(ModelMap models) { companionsTable.setTreeTableModel(models.get(CompanionsModel.class)); companionsTable.setDefaultEditor(Object.class, models.get(ButtonCellEditor.class)); models.get(TreeExpansionHandler.class).install(); models.get(LoadButtonAndSheetHandler.class).install(); }
@Override public ModelMap createModels(CharacterFacade character) { ModelMap models = new ModelMap(); models.put(CompanionsModel.class, new CompanionsModel(character)); models.put(ButtonCellEditor.class, new ButtonCellEditor(character)); models.put(LoadButtonAndSheetHandler.class, new LoadButtonAndSheetHandler()); models.put(TreeExpansionHandler.class, new TreeExpansionHandler()); return models; }
@Override public void storeModels(ModelMap models) { models.get(TreeExpansionHandler.class).uninstall(); models.get(LoadButtonAndSheetHandler.class).uninstall(); }