Module org.jpo

Class CategoryAssignmentWindow

java.lang.Object
org.jpo.gui.swing.CategoryAssignmentWindow

public class CategoryAssignmentWindow extends Object
Brings up a window showing all the available Categories and allows the user to assign or remove categories for the nodes supplied in the CategoryAssignmentWindowRequest.

Since there can be many categories they are shown as checkboxes in multiple columns. (Layout works left to right but the categories should be shown alphabetically top to bottom in the columns which gave rise to the code bloat in the populateCheckBoxes function.)

The checkboxes show whether none, all or some of the supplied nodes have the category. The TristateCheckBox class has logic to allow selection or deselection on categories that have none or all. Where some nodes have a category, the TristateCheckBox cycles through select all, deselect all and leave unchanged. Elections where the node category assignments will be changed are shown in a different color.