com.levigo.jadice.demo
Class AnnotationVisibilityMenuContributor
java.lang.Object
com.levigo.util.swing.menu.AbstractSubmenuContributor
com.levigo.jadice.demo.AnnotationVisibilityMenuContributor
- All Implemented Interfaces:
- MenuContributor
public class AnnotationVisibilityMenuContributor
- extends AbstractSubmenuContributor
The intention of this class is to provide several annotation visibility
functions as a separate sub menu. As a MenuContributor
it can be
easily attached to a PopupMenuTool
which is able to display context
menus on a ViewComponent
.
This class uses I18n resources which are part of this demo resources. For
using this class verfügbardevelopers have to ensure the availability of this
resources.
Field Summary |
protected static ResourceBundle |
BUNDLE
This bundle provides the I18n resources located at the
com.levigo.jadice.demo.resources package. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BUNDLE
protected static final ResourceBundle BUNDLE
- This bundle provides the I18n resources located at the
com.levigo.jadice.demo.resources package.
AnnotationVisibilityMenuContributor
public AnnotationVisibilityMenuContributor()
doContribute
protected void doContribute(ContributionContext context,
MenuBuilder menuBuilder)
- Specified by:
doContribute
in class AbstractSubmenuContributor
getAnnotationProfile
protected AnnotationProfile getAnnotationProfile(EventObject event)
- Provides a suitable annotation profile for the given event.
The lookup strategy for the profile is the following:
- return the annotation profile of the page the given event pertains to
- if the page has no annotation profile, the annotation profile of the
document is returned
- if the document has no annotation profile, the
AnnotationProfile.getDefaultProfile()
is returned.
- Parameters:
event
-
- Returns:
- the detected profile
Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.