/** * transfers the Capabilities object to the JList. * * @see #m_Capabilities * @see #m_List */ protected void updateList() { CheckBoxListModel model; model = (CheckBoxListModel) m_List.getModel(); for (Capability cap : Capability.values()) { model.setChecked(model.indexOf(cap), m_Capabilities.handles(cap)); } }
/** * sets the checked state of the element at the given index * * @param index the index of the element to set the checked state for * @param checked the new checked state */ public void setChecked(int index, boolean checked) { ((CheckBoxListModel) getModel()).setChecked(index, checked); }
/** * transfers the Capabilities object to the JList. * * @see #m_Capabilities * @see #m_List */ protected void updateList() { CheckBoxListModel model; model = (CheckBoxListModel) m_List.getModel(); for (Capability cap : Capability.values()) { model.setChecked(model.indexOf(cap), m_Capabilities.handles(cap)); } }
/** * sets the checked state of the element at the given index * * @param index the index of the element to set the checked state for * @param checked the new checked state */ public void setChecked(int index, boolean checked) { ((CheckBoxListModel) getModel()).setChecked(index, checked); }