Class CyColumnComboBox

All Implemented Interfaces:
ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, ListDataListener

public class CyColumnComboBox extends JComboBox<CyColumn>
An implementation of JComboBox that displays a list of CyColumns with their namespace icons.
See Also:

Module: swing-application-api

To use this in your app, include the following dependency in your POM:

<dependency>
    <groupId>org.cytoscape</groupId>
    <artifactId>swing-application-api</artifactId>
</dependency>
  • Constructor Details

    • CyColumnComboBox

      public CyColumnComboBox(CyColumnPresentationManager columnPresentationManager, Collection<CyColumn> columns, Predicate<CyColumn> enabledPredicate)
      Creates a CyColumnComboBox.
      Parameters:
      columnPresentationManager - CyColumnPresentationManager OSGi service.
      columns - Collection of CyColumn objects to display. If this collection contains null it will be displayed as "-- None --".
      enabledPredicate - A predicate used to determine which CyColumn items should be enabled or disabled.
      Throws:
      NullPointerException - If any parameter is null.
    • CyColumnComboBox

      public CyColumnComboBox(CyColumnPresentationManager columnPresentationManager, Collection<CyColumn> columns)
      Creates a CyColumnComboBox with all entries enabled.
      Parameters:
      columnPresentationManager - CyColumnPresentationManager OSGi service.
      columns - Collection of CyColumn objects to display. If this collection contains null it will be displayed as "-- None --".
      Throws:
      NullPointerException - If any parameter is null.
  • Method Details

    • getSelectedItem

      public CyColumn getSelectedItem()
      Override getSelectedItem() and use covariant return type to change return type to CyColumn.
      Overrides:
      getSelectedItem in class JComboBox<CyColumn>