Class ShowAnnotationsMenu

java.lang.Object
org.eclipse.jface.action.ContributionItem
org.apache.uima.caseditor.editor.contextmenu.ShowAnnotationsMenu
All Implemented Interfaces:
org.eclipse.jface.action.IContributionItem

public class ShowAnnotationsMenu extends org.eclipse.jface.action.ContributionItem
Creates the show annotations context sub menu.
  • Constructor Details

    • ShowAnnotationsMenu

      public ShowAnnotationsMenu(TypeSystem typeSystem, Collection<Type> shownTypes)
      Initializes a new instance.
      Parameters:
      typeSystem - the type system
      shownTypes - the shown types
  • Method Details

    • addListener

      public void addListener(IShowAnnotationsListener listener)
      Adds the listener.
      Parameters:
      listener - the listener
    • removeListener

      public void removeListener(IShowAnnotationsListener listener)
      Removes the listener.
      Parameters:
      listener - the listener
    • insertAction

      protected void insertAction(Type type, org.eclipse.swt.widgets.Menu parentMenu)
      Implementing classes must implement this method to insert actions into the type menu.
      Parameters:
      type - the type
      parentMenu - the parent menu
    • getSelectedTypes

      public Collection<Type> getSelectedTypes()
      Gets the selected types.
      Returns:
      the selected types
    • setSelectedType

      public void setSelectedType(Type type, boolean isShown)
      Sets the selected type.
      Parameters:
      type - the type
      isShown - the is shown
    • setSelectedTypes

      public void setSelectedTypes(Collection<Type> types)
      Sets the selected types.
      Parameters:
      types - the new selected types
    • setEditorAnnotationMode

      public void setEditorAnnotationMode(Type newMode)
      Sets the editor annotation mode.
      Parameters:
      newMode - the new editor annotation mode
    • fill

      public void fill(org.eclipse.swt.widgets.Menu menu, int index)
      Fills the menu with type entries.
      Specified by:
      fill in interface org.eclipse.jface.action.IContributionItem
      Overrides:
      fill in class org.eclipse.jface.action.ContributionItem
      Parameters:
      menu - the menu
      index - the index