Class SS_ContextActionSupport
java.lang.Object
org.jjazz.ss_editor.api.SS_ContextActionSupport
A helper class to write SS_Editor context aware actions.
Listen to changes in the lookup context:
- RhyhmPart or SongPartParameter presence changes are notified to the registered SS_ContextActionListeners.
SS_ContextActionSupport instances are cached per lookup context. Only weak listeners are used: declaratively registered actions might be transient actions (e.g. ContextAwareAction instances).
-
Method Summary
Modifier and TypeMethodDescriptionvoidfinal org.openide.util.Lookupstatic SS_ContextActionSupportgetInstance(org.openide.util.Lookup context) Get the instance associated to the specified context.final SS_SelectionvoidremoveWeakListener(SS_ContextActionListener listener)
-
Method Details
-
getInstance
Get the instance associated to the specified context.- Parameters:
context-- Returns:
-
getContext
public final org.openide.util.Lookup getContext()- Returns:
- the Lookup context
-
getSelection
- Returns:
- The latest selection.
-
addWeakSelectionListener
-
removeWeakListener
-