JLabel assetClusterLabel = new JLabel("Asset Cluster :");
JLabel assetClusterLabel = new JLabel("Asset Agent :");
  private void planObjectTypeActionPerformed(ActionEvent e) {    JComboBox cb = (JComboBox)e.getSource();    String s = (String)cb.getSelectedItem();    if (s.equals(ALL)){      if (!loadedPanels.isEmpty()) {        for (int i=0; i<loadedPanels.size(); i++)           box.remove((JPanel)loadedPanels.elementAt(i));        pack();      }      return; // do nothing    }    if (s.equals(PropertyNames.TASK_OBJECT)) {    // handle TASK_OBJECT      if (!loadedPanels.isEmpty()) {        for (int i=0; i<loadedPanels.size(); i++) {          box.remove((JPanel)loadedPanels.elementAt(i));          pack();        }      }      taskPanel = new JPanel();      taskPanel.setLayout(new GridBagLayout());      TitledBorder taskTitledBorder = new TitledBorder("Task");      taskPanel.setBorder(taskTitledBorder);      verbCB = new JComboBox();      verbCB.addItem(ALL);      Vector verbs = graph.getValuesOfAttribute(PropertyNames.TASK_VERB);      for (int i = 0; i < verbs.size(); i++)         verbCB.addItem(verbs.elementAt(i));      JLabel verbLabel = new JLabel ("Verb :");      verbCB.addActionListener(disableFindNext);      JLabel directObjUIDLabel = new JLabel ("Direct Object UID :");      directObjUIDCB = new JComboBox();      directObjUIDCB.addItem(ALL);      Vector dirObjs = graph.getValuesOfAttribute(PropertyNames.TASK_DIRECT_OBJECT_UID);      for (int i = 0; i < dirObjs.size(); i++ )        directObjUIDCB.addItem(dirObjs.elementAt(i));      directObjUIDCB.addActionListener(disableFindNext);      JLabel prepPhraseLabel = new JLabel ("Prep Phrase :");      prepPhraseCB = new JComboBox();      prepPhraseCB.addItem(ALL);      Vector prepPhrases = graph.getValuesOfAttribute(PropertyNames.TASK_PREP_PHRASE);      for (int i=0; i<prepPhrases.size(); i++)        prepPhraseCB.addItem(prepPhrases.elementAt(i));      prepPhraseCB.addActionListener(disableFindNext);      int x = 0;      int y = 0;      taskPanel.add(verbLabel,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      taskPanel.add(verbCB,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      y = 1;      x = 0;      taskPanel.add(directObjUIDLabel,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      taskPanel.add(directObjUIDCB,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      y = 2;      x = 0;      taskPanel.add(prepPhraseLabel,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      taskPanel.add(prepPhraseCB,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      box.add(taskPanel);      // task end time panel      taskRangePanel = new JPanel();      taskRangePanel.setLayout(new GridBagLayout());      taskStartLabel = new JLabel("Task Start :");      taskStartLabel.setEnabled(false);      taskStartField = new JTextField(10);      taskStartField.setEnabled(false);      taskEndLabel = new JLabel("Task End :");      taskEndLabel.setEnabled(false);      taskEndField = new JTextField(10);      taskEndField.setEnabled(false);      JRadioButton allTaskButton = new JRadioButton("All");      allTaskFilter = true;      allTaskButton.setFocusPainted(false);      allTaskButton.setSelected(true);      allTaskButton.addActionListener(disableFindNext);      allTaskButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allTaskFilter = true;          taskStartLabel.setEnabled(false);          taskStartField.setEnabled(false);          taskEndLabel.setEnabled(false);          taskEndField.setEnabled(false);        }      });      JRadioButton specificTaskButton = new JRadioButton();      specificTaskButton.setFocusPainted(false);      specificTaskButton.addActionListener(disableFindNext);      specificTaskButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allTaskFilter = false;          taskStartLabel.setEnabled(true);          taskStartField.setEnabled(true);          taskEndLabel.setEnabled(true);          taskEndField.setEnabled(true);        }      });      ButtonGroup taskButtonGroup = new ButtonGroup();      taskButtonGroup.add(allTaskButton);      taskButtonGroup.add(specificTaskButton);      x=0;      y=0;      taskRangePanel.add(allTaskButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      taskRangePanel.add(specificTaskButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      taskRangePanel.add(taskStartLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      taskRangePanel.add(taskStartField,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      taskRangePanel.add(taskEndLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      taskRangePanel.add(taskEndField,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      box.add(taskRangePanel);      pack();      if (!loadedPanels.isEmpty())        loadedPanels.clear();      loadedPanels.addElement(taskPanel);      loadedPanels.addElement(taskRangePanel);    }else if (s.equals(PropertyNames.ASSET_OBJECT))  {      // handle ASSET_OBJECT      if (!loadedPanels.isEmpty()) {        for (int i=0; i<loadedPanels.size(); i++) {          box.remove((JPanel)loadedPanels.elementAt(i));          pack();        }      }      assetPanel = new JPanel();      assetPanel.setLayout(new GridBagLayout());      TitledBorder assetTitledBorder = new TitledBorder("Asset");      assetPanel.setBorder(assetTitledBorder);      JLabel assetClusterLabel = new JLabel("Asset Cluster :");      assetClusterCB = new JComboBox();      assetClusterCB.addItem(ALL);      Vector assetClusters = graph.getValuesOfAttribute(PropertyNames.ASSET_CLUSTER);      for (int i=0; i<assetClusters.size(); i++)         assetClusterCB.addItem(assetClusters.elementAt(i));      assetClusterCB.addActionListener(disableFindNext);      JLabel assetGroupNameLabel = new JLabel("Asset Group Name :");      assetGroupNameCB = new JComboBox();      assetGroupNameCB.addItem(ALL);      Vector assetGroupNames = graph.getValuesOfAttribute(PropertyNames.ASSET_GROUP_NAME);      for (int i=0; i<assetGroupNames.size(); i++)         assetGroupNameCB.addItem(assetGroupNames.elementAt(i));      assetGroupNameCB.addActionListener(disableFindNext);      JLabel assetNameLabel = new JLabel("Name :");      assetNameCB = new JComboBox();      assetNameCB.addItem(ALL);      Vector assetNames = graph.getValuesOfAttribute(PropertyNames.ASSET_NAME);      for (int i=0; i<assetNames.size(); i++)         assetNameCB.addItem(assetNames.elementAt(i));      assetNameCB.addActionListener(disableFindNext);      int x = 0;      int y = 0;      assetPanel.add(assetClusterLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      assetPanel.add(assetClusterCB,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      y = 1;      x = 0;      assetPanel.add(assetGroupNameLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      assetPanel.add(assetGroupNameCB,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      y = 2;      x = 0;      assetPanel.add(assetNameLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      assetPanel.add(assetNameCB,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      box.add(assetPanel);      pack();      if (!loadedPanels.isEmpty())        loadedPanels.clear();      loadedPanels.addElement(assetPanel);    }else if (s.equals(PropertyNames.EVENT_HAPPINESS_CHANGE))  {      if (!loadedPanels.isEmpty()) {        for (int i=0; i<loadedPanels.size(); i++) {          box.remove((JPanel)loadedPanels.elementAt(i));          pack();        }      }      happinessPanel = new JPanel();      happinessPanel.setLayout(new GridBagLayout());      TitledBorder happinessTitledBorder = new TitledBorder("Happiness");      happinessPanel.setBorder(happinessTitledBorder);      JLabel regardingLabel = new JLabel("Event Regarding :");      Vector regards = graph.getValuesOfAttribute(PropertyNames.EVENT_REGARDING);      regardingCB = new JComboBox();      regardingCB.addItem(ALL);      for (int i=0; i<regards.size(); i++) {        regardingCB.addItem(regards.elementAt(i));      }      regardingCB.addActionListener(disableFindNext);      JLabel publisherLabel = new JLabel("Publisher :");      Vector publishers = graph.getValuesOfAttribute(PropertyNames.EVENT_PUBLISHER);      publisherCB = new JComboBox();      publisherCB.addItem(ALL);      for (int i=0; i<publishers.size(); i++) {        publisherCB.addItem(publishers.elementAt(i));      }      publisherCB.addActionListener(disableFindNext);      JLabel sourceLabel = new JLabel("Source :");      Vector sources = graph.getValuesOfAttribute(PropertyNames.EVENT_SOURCE);      sourceCB = new JComboBox();      sourceCB.addItem(ALL);      for (int i=0; i<sources.size(); i++) {        sourceCB.addItem(sources.elementAt(i));      }      sourceCB.addActionListener(disableFindNext);      JLabel descriptionLabel = new JLabel("Description :");      descriptionCB = new JComboBox();      descriptionCB.addItem(ALL);      Vector descriptions = graph.getValuesOfAttribute(PropertyNames.EVENT_DESCRIPTION);      for (int i=0; i<descriptions.size(); i++)        descriptionCB.addItem(descriptions.elementAt(i));      descriptionCB.addActionListener(disableFindNext);      int x = 0;      int y = 0;      y++;      happinessPanel.add(regardingLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessPanel.add(regardingCB,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      y++;      x = 0;      happinessPanel.add(publisherLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessPanel.add(publisherCB,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      y++;      x = 0;      happinessPanel.add(sourceLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessPanel.add(sourceCB,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      y++;      x = 0;      happinessPanel.add(descriptionLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessPanel.add(descriptionCB,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      // Happiness range panel      happinessRangePanel = new JPanel();      happinessRangePanel.setLayout(new GridBagLayout());      JRadioButton allRatingButton = new JRadioButton("All");      allRatingFilter = true;      allRatingButton.setFocusPainted(false);      allRatingButton.setSelected(true);      allRatingButton.addActionListener(disableFindNext);      allRatingButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allRatingFilter = true;          ratingStartLabel.setEnabled(false);          ratingStartField.setEnabled(false);          ratingEndLabel.setEnabled(false);          ratingEndField.setEnabled(false);        }      });      JRadioButton specificRangeButton = new JRadioButton();      specificRangeButton.setFocusPainted(false);      specificRangeButton.addActionListener(disableFindNext);      specificRangeButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allRatingFilter = false;          ratingStartLabel.setEnabled(true);          ratingStartField.setEnabled(true);          ratingEndLabel.setEnabled(true);          ratingEndField.setEnabled(true);        }      });      ButtonGroup rangeButtonGroup = new ButtonGroup();      rangeButtonGroup.add(allRatingButton);      rangeButtonGroup.add(specificRangeButton);      ratingStartLabel = new JLabel("Rating Start :");      ratingStartLabel.setEnabled(false);      ratingStartField = new JTextField(10);      ratingStartField.setEnabled(false);      ratingEndLabel = new JLabel("Rating End :");      ratingEndLabel.setEnabled(false);      ratingEndField = new JTextField(10);      ratingEndField.setEnabled(false);      JRadioButton allDeltaButton = new JRadioButton("All");      allDeltaFilter = true;      allDeltaButton.setFocusPainted(false);      allDeltaButton.setSelected(true);      allDeltaButton.addActionListener(disableFindNext);      allDeltaButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allDeltaFilter = true;          deltaStartLabel.setEnabled(false);          deltaStartField.setEnabled(false);          deltaEndLabel.setEnabled(false);          deltaEndField.setEnabled(false);        }      });      JRadioButton specificDeltaButton = new JRadioButton();      specificDeltaButton.setFocusPainted(false);      specificDeltaButton.addActionListener(disableFindNext);      specificDeltaButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allDeltaFilter = false;          deltaStartLabel.setEnabled(true);          deltaStartField.setEnabled(true);          deltaEndLabel.setEnabled(true);          deltaEndField.setEnabled(true);        }      });      ButtonGroup deltaButtonGroup = new ButtonGroup();      deltaButtonGroup.add(allDeltaButton);      deltaButtonGroup.add(specificDeltaButton);      deltaStartLabel = new JLabel("Delta Start :");      deltaStartLabel.setEnabled(false);      deltaStartField = new JTextField(10);      deltaStartField.setEnabled(false);      deltaEndLabel = new JLabel("Delta End :");      deltaEndLabel.setEnabled(false);      deltaEndField = new JTextField(10);      deltaEndField.setEnabled(false);      eventCumulStartLabel = new JLabel("Event Cumulative Start :");      eventCumulStartLabel.setEnabled(false);      eventCumulStartField = new JTextField(10);      eventCumulEndLabel = new JLabel("Event Cumulative End :");      eventCumulEndLabel.setEnabled(false);      eventCumulEndField = new JTextField(10);      JRadioButton allCumulButton = new JRadioButton("All");      allCumulFilter = true;      allCumulButton.setFocusPainted(false);      allCumulButton.setSelected(true);      allCumulButton.addActionListener(disableFindNext);      allCumulButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allCumulFilter = true;          eventCumulStartLabel.setEnabled(false);          eventCumulStartField.setEnabled(false);          eventCumulEndLabel.setEnabled(false);          eventCumulEndField.setEnabled(false);        }      });      JRadioButton specificCumulButton = new JRadioButton();      specificCumulButton.setFocusPainted(false);      specificCumulButton.addActionListener(disableFindNext);      specificCumulButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allCumulFilter = false;          eventCumulStartLabel.setEnabled(true);          eventCumulStartField.setEnabled(true);          eventCumulEndLabel.setEnabled(true);          eventCumulEndField.setEnabled(true);        }      });      ButtonGroup cumulButtonGroup = new ButtonGroup();      cumulButtonGroup.add(allCumulButton);      cumulButtonGroup.add(specificCumulButton);      timeComplStartLabel = new JLabel("Time Completed Start :");      timeComplStartField = new JTextField(10);      timeComplStartLabel.setEnabled(false);      timeComplStartField.setEnabled(false);      timeComplEndLabel = new JLabel("Time Completed End :");      timeComplEndField = new JTextField(10);      timeComplEndLabel.setEnabled(false);      timeComplEndField.setEnabled(false);      JRadioButton allComplButton = new JRadioButton("All");      allComplFilter = true;      allComplButton.setFocusPainted(false);      allComplButton.setSelected(true);      allComplButton.addActionListener(disableFindNext);      allComplButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allComplFilter = true;          timeComplStartLabel.setEnabled(false);          timeComplStartField.setEnabled(false);          timeComplEndLabel.setEnabled(false);          timeComplEndField.setEnabled(false);        }      });      JRadioButton specificComplButton = new JRadioButton();      specificComplButton.setFocusPainted(false);      specificComplButton.addActionListener(disableFindNext);      specificComplButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allComplFilter = false;          timeComplStartLabel.setEnabled(true);          timeComplStartField.setEnabled(true);          timeComplEndLabel.setEnabled(true);          timeComplEndField.setEnabled(true);        }      });      ButtonGroup complButtonGroup = new ButtonGroup();      complButtonGroup.add(allComplButton);      complButtonGroup.add(specificComplButton);      x=0;      y=0;      happinessRangePanel.add(allRatingButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(specificRangeButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(ratingStartLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(ratingStartField,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(ratingEndLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(ratingEndField,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      x = 0;      y++;      happinessRangePanel.add(allDeltaButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(specificDeltaButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(deltaStartLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(deltaStartField,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(deltaEndLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(deltaEndField,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      x = 0;      y++;      happinessRangePanel.add(allCumulButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(specificCumulButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(eventCumulStartLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(eventCumulStartField,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(eventCumulEndLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(eventCumulEndField,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      x = 0;      y++;      happinessRangePanel.add(allComplButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(specificComplButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(timeComplStartLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(timeComplStartField,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(timeComplEndLabel,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      happinessRangePanel.add(timeComplEndField,                     new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                            GridBagConstraints.WEST,                                            GridBagConstraints.HORIZONTAL,                                            new Insets(0, 0, 0, 0), 0, 0));      box.add(happinessPanel);      box.add(happinessRangePanel);      pack();      if (!loadedPanels.isEmpty())        loadedPanels.clear();      loadedPanels.addElement(happinessPanel);      loadedPanels.addElement(happinessRangePanel);    }else if (planElements.contains(s)) {      // handle plan elements      if (!loadedPanels.isEmpty()) {        for (int i=0; i<loadedPanels.size(); i++) {          box.remove((JPanel)loadedPanels.elementAt(i));          pack();        }      }      // Status panel - all plan elements      statusPanel = new JPanel();      statusPanel.setLayout(new GridBagLayout());      TitledBorder statusTitledBorder = new TitledBorder("Status");      statusPanel.setBorder(statusTitledBorder);      estimatedButton = new JRadioButton("Estimated");      // default to estimated for time ranges      estimatedButton.setSelected(true);      estimatedButton.addActionListener(disableFindNext);      reportedButton = new JRadioButton("Reported");      reportedButton.addActionListener(disableFindNext);      observedButton = new JRadioButton("Observed");      observedButton.addActionListener(disableFindNext);      statusButtonGroup = new ButtonGroup();      statusButtonGroup.add(estimatedButton);      statusButtonGroup.add(reportedButton);      statusButtonGroup.add(observedButton);      int x = 0;      int y = 0;      statusPanel.add(estimatedButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      statusPanel.add(reportedButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      statusPanel.add(observedButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      box.add(statusPanel);      loadedPanels.addElement(statusPanel);      // Time panel - all plan elements      timePanel = new JPanel();      timePanel.setLayout(new GridBagLayout());      TitledBorder timeTitledBorder = new TitledBorder("Time");      timePanel.setBorder(timeTitledBorder);      JRadioButton allTimeButton = new JRadioButton("All");      allTimeFilter = true;      allTimeButton.setFocusPainted(false);      allTimeButton.setSelected(true);      fromLabel = new JLabel("From: ");      toLabel = new JLabel("To: ");      allTimeButton.addActionListener(disableFindNext);      allTimeButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allTimeFilter = true;          fromLabel.setEnabled(false);          startTimeField.setEnabled(false);          toLabel.setEnabled(false);          endTimeField.setEnabled(false);          estimatedButton.setSelected(false);          System.out.println("in all action listener");          reportedButton.setSelected(false);          observedButton.setSelected(false);        }      });      JRadioButton specificTimesButton = new JRadioButton();      specificTimesButton.setFocusPainted(false);      specificTimesButton.addActionListener(disableFindNext);      specificTimesButton.addActionListener(new ActionListener() {        public void actionPerformed(ActionEvent evt) {          allTimeFilter = false;          fromLabel.setEnabled(true);          startTimeField.setEnabled(true);          toLabel.setEnabled(true);          endTimeField.setEnabled(true);        }      });      ButtonGroup timeButtonGroup = new ButtonGroup();      timeButtonGroup.add(allTimeButton);      timeButtonGroup.add(specificTimesButton);      fromLabel.setEnabled(false); // initially set to "all time"      startTimeField = new JTextField(10);      startTimeField.setText("0");      startTimeField.setEnabled(false);      toLabel.setEnabled(false);      endTimeField = new JTextField(10);      endTimeField.setText("0");      endTimeField.setEnabled(false);      x = 0;      y = 0;      timePanel.add(allTimeButton,                    new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      timePanel.add(specificTimesButton,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      timePanel.add(fromLabel,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      timePanel.add(startTimeField,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      timePanel.add(toLabel,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      timePanel.add(endTimeField,                    new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                           GridBagConstraints.WEST,                                           GridBagConstraints.HORIZONTAL,                                           new Insets(0, 0, 0, 0), 0, 0));      box.add(timePanel);      loadedPanels.addElement(timePanel);      // Success Panel - disposition only      if (s.equals(PropertyNames.PLAN_ELEMENT_DISPOSITION)) {        successPanel = new JPanel();        successPanel.setLayout(new GridBagLayout());        TitledBorder successTitledBorder = new TitledBorder("Success");        successPanel.setBorder(successTitledBorder);        successCBox = new JCheckBox("Success");        successCBox.addActionListener(disableFindNext);        x = 0;        y = 0;        successPanel.add(successCBox,                      new GridBagConstraints(x, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        box.add(successPanel);        loadedPanels.addElement(successPanel);        pack();      }      // AllocationPanel - allocation only      if (s.equals(PropertyNames.PLAN_ELEMENT_ALLOCATION)) {        allocationPanel = new JPanel();        allocationPanel.setLayout(new GridBagLayout());        TitledBorder allocTitledBorder = new TitledBorder("Allocation");        allocationPanel.setBorder(allocTitledBorder);        JLabel allocToClusterLabel = new JLabel("To Cluster :");        allocToClusterCB = new JComboBox();        allocToClusterCB.addItem(ALL);        Vector allocToClusters = graph.getValuesOfAttribute(PropertyNames.ALLOCATION_TO_CLUSTER);        for (int i=0; i<allocToClusters.size(); i++)           allocToClusterCB.addItem(allocToClusters.elementAt(i));        allocToClusterCB.addActionListener(disableFindNext);        JLabel allocTaskUIDLabel = new JLabel("Task UID :");        allocTaskUIDCB = new JComboBox();        allocTaskUIDCB.addItem(ALL);        Vector allocTaskUIDs = graph.getValuesOfAttribute(PropertyNames.ALLOCATION_TASK_UID);        for (int i=0; i<allocTaskUIDs.size(); i++)           allocTaskUIDCB.addItem(allocTaskUIDs.elementAt(i));        allocTaskUIDCB.addActionListener(disableFindNext);        JLabel allocAssetUIDLabel = new JLabel("Asset UID :");        allocAssetUIDCB = new JComboBox();        allocAssetUIDCB.addItem(ALL);        Vector allocAssetUIDs = graph.getValuesOfAttribute(PropertyNames.ALLOCATION_ASSET_UID);        for (int i=0; i<allocAssetUIDs.size(); i++)           allocAssetUIDCB.addItem(allocAssetUIDs.elementAt(i));        allocAssetUIDCB.addActionListener(disableFindNext);        JLabel allocRemoteClusterUIDLabel = new JLabel("Remote Cluster UID :");        allocRemoteClusterUIDCB = new JComboBox();        allocRemoteClusterUIDCB.addItem(ALL);        Vector allocRemoteClusterUIDs = graph.getValuesOfAttribute(PropertyNames.ALLOCATION_REMOTE_CLUSTER_UID);        for (int i=0; i<allocRemoteClusterUIDs.size(); i++)           allocRemoteClusterUIDCB.addItem(allocRemoteClusterUIDs.elementAt(i));        allocRemoteClusterUIDCB.addActionListener(disableFindNext);        JLabel allocLocalOrgUIDLabel = new JLabel("Local Org UID :");        allocLocalOrgUIDCB = new JComboBox();        allocLocalOrgUIDCB.addItem(ALL);        Vector allocLocalOrgUIDs = graph.getValuesOfAttribute(PropertyNames.ALLOCATION_LOCAL_ORG_UID);        for (int i=0; i<allocLocalOrgUIDs.size(); i++)           allocLocalOrgUIDCB.addItem(allocLocalOrgUIDs.elementAt(i));        allocLocalOrgUIDCB.addActionListener(disableFindNext);        x = 0;        y = 0;        allocationPanel.add(allocToClusterLabel,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        allocationPanel.add(allocToClusterCB,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        y++;        x = 0;        allocationPanel.add(allocTaskUIDLabel,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        allocationPanel.add(allocTaskUIDCB,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        y++;        x = 0;        allocationPanel.add(allocAssetUIDLabel,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        allocationPanel.add(allocAssetUIDCB,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        y++;        x = 0;        allocationPanel.add(allocRemoteClusterUIDLabel,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        allocationPanel.add(allocRemoteClusterUIDCB,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        y++;        x = 0;        allocationPanel.add(allocLocalOrgUIDLabel,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        allocationPanel.add(allocLocalOrgUIDCB,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        y++;        x = 0;        box.add(allocationPanel);        loadedPanels.addElement(allocationPanel);        pack();      }      if (s.equals(PropertyNames.PLAN_ELEMENT_ASSET_TRANSFER)) {        // asset transfer panel - asset transfer only        assetTransferPanel = new JPanel();        assetTransferPanel.setLayout(new GridBagLayout());        TitledBorder assetTransferTitledBorder = new TitledBorder("Asset Transfer");        assetTransferPanel.setBorder(assetTransferTitledBorder);        JLabel assetTransAssetUIDLabel = new JLabel("Asset UID :");        assetTransUIDCB = new JComboBox();        assetTransUIDCB.addItem(ALL);        Vector assetTransUIDs = graph.getValuesOfAttribute(PropertyNames.ASSET_TRANSFER_ASSET_UID);        for (int i=0; i<assetTransUIDs.size(); i++)           assetTransUIDCB.addItem(assetTransUIDs.elementAt(i));        assetTransUIDCB.addActionListener(disableFindNext);        JLabel assignUIDLabel = new JLabel("Assignee UID :");        assignUIDCB = new JComboBox();        assignUIDCB.addItem(ALL);        Vector assignUIDs = graph.getValuesOfAttribute(PropertyNames.ASSET_TRANSFER_ASSIGNEE_UID);        for (int i=0; i<assignUIDs.size(); i++)           assignUIDCB.addItem(assignUIDs.elementAt(i));        assignUIDCB.addActionListener(disableFindNext);        JLabel assignorLabel = new JLabel("Assignor :");        assignorCB = new JComboBox();        assignorCB.addItem(ALL);        Vector assignors = graph.getValuesOfAttribute(PropertyNames.ASSET_TRANSFER_ASSIGNOR);        for (int i=0; i<assignors.size(); i++)           assignorCB.addItem(assignors.elementAt(i));        assignorCB.addActionListener(disableFindNext);        x = 0;        y = 0;        assetTransferPanel.add(assetTransAssetUIDLabel,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        assetTransferPanel.add(assetTransUIDCB,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        y++;        x = 0;        assetTransferPanel.add(assignUIDLabel,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        assetTransferPanel.add(assignUIDCB,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        y++;        x = 0;        assetTransferPanel.add(assignorLabel,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        assetTransferPanel.add(assignorCB,                      new GridBagConstraints(x++, y, 1, 1, 1.0, 0.0,                                             GridBagConstraints.WEST,                                             GridBagConstraints.HORIZONTAL,                                             new Insets(0, 0, 0, 0), 0, 0));        box.add(assetTransferPanel);        loadedPanels.addElement(assetTransferPanel);        pack();      }    } else {      if (!loadedPanels.isEmpty()) {        for (int i=0; i<loadedPanels.size(); i++) {          box.remove((JPanel)loadedPanels.elementAt(i));          pack();        }      }      pack();    }  }