public void reset() { final ActionMacro[] allMacros = ActionMacroManager.getInstance().getAllMacros(); for (ActionMacro macro : allMacros) { myMacrosModel.addElement(macro.clone()); } myMacrosList.setModel(myMacrosModel); ListScrollingUtil.ensureSelectionExists(myMacrosList); }
private void initActionList(ActionMacro macro) { DefaultListModel actionModel = new DefaultListModel(); final ActionMacro.ActionDescriptor[] actions = macro.getActions(); for (ActionMacro.ActionDescriptor action : actions) { actionModel.addElement(action); } myMacroActionsList.setModel(actionModel); ListScrollingUtil.ensureSelectionExists(myMacroActionsList); }