@Override
    public Component getListCellRendererComponent(
        JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
      if (value instanceof StoryComponentPanel) {
        final StoryComponentPanel valuePanel;
        final StoryComponent valueComponent;
        final Boolean isVisible;

        valuePanel = (StoryComponentPanel) value;

        valueComponent = valuePanel.getStoryComponent();
        isVisible = valueComponent.isVisible();

        valuePanel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY));

        if (isVisible
            && valueComponent.getLibrary().isReadOnly()
            && !isSelected
            && SEModelManager.getInstance().getActiveModel() instanceof LibraryModel
            && !ScriptEase.DEBUG_MODE) valuePanel.setBackground(ScriptEaseUI.TERTIARY_UI);
        else if (isSelected && isVisible) valuePanel.setBackground(list.getSelectionBackground());
        else if (isSelected && !isVisible) valuePanel.setBackground(ScriptEaseUI.SELECTED_COLOUR);
        else if (!isSelected && !isVisible) valuePanel.setBackground(Color.DARK_GRAY);
        else if (!isSelected && isVisible) valuePanel.setBackground(list.getBackground());

        if (valueComponent instanceof CauseIt || valueComponent instanceof ActivityIt) {
          valuePanel.setShowChildren(false);
          valuePanel.getExpansionButton().setCollapsed(true);
        }

        return valuePanel;
      } else if (value instanceof JPanel) {
        return (JPanel) value;
      } else return new JLabel("Error: Not a story component: " + value.toString());
    }
    private void addTypeData(Collection<String> types) {
      final SEModel model;

      model = SEModelManager.getInstance().getActiveModel();

      for (final String typeName : types) {
        final GameType type = model.getType(typeName);

        this.searchData.add(type.getName());
        this.searchData.add(type.getCodeSymbol());
        this.searchData.add(type.getWidgetName());

        final Map<String, String> enums = type.getEnumMap();

        this.searchData.addAll(enums.values());
        this.searchData.addAll(enums.keySet());
      }
    }