Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.jdeveloper.controller
Class MenuAwareLabelUpdater

java.lang.Object
  extended by oracle.jdeveloper.controller.MenuAwareLabelUpdater

All Implemented Interfaces:
LabelUpdater

public abstract class MenuAwareLabelUpdater
extends java.lang.Object
implements LabelUpdater

A LabelUpdater that allows an action's label to be updated based on the menu where the action resides.


Field Summary

 

Fields inherited from interface oracle.ide.controller.LabelUpdater
LABEL_UPDATER_MACROS

 

Constructor Summary
MenuAwareLabelUpdater(java.lang.String menuId)
          Creates a new MenuAwareLabelUpdater instance.

 

Method Summary
protected abstract  java.lang.String disabledMenuSpecificLabel(IdeAction action, java.lang.String originalLabel)
          Gets the label to use for the action when it appears on the menu supplied in the constructor.
protected abstract  java.lang.String enabledMenuSpecificLabel(IdeAction action, java.lang.String originalLabel)
          Get the label to use for the disabled action when it appears on the menu supplied in the constructor.
 java.lang.String labelWhenDisabled(Context context, IdeAction action, java.lang.String originalLabel)
          Returns the action's label when it is disabled.
If null then the action will be left unchanged.
 java.lang.String labelWhenEnabled(Context context, IdeAction action, java.lang.String originalLabel)
          Returns the action's label when it is enabled.
If null then the action will be left unchanged.
protected  boolean matchMenu(java.util.EventObject event)
           
 void setDisabledFormat(java.lang.String format)
          Not implemented.
 void setEnabledFormat(java.lang.String format)
          Not implemented.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

MenuAwareLabelUpdater

public MenuAwareLabelUpdater(java.lang.String menuId)
Creates a new MenuAwareLabelUpdater instance. The supplied menuId is used identify the custom menu.
Parameters:
menuId - the menu ID

Method Detail

labelWhenDisabled

public final java.lang.String labelWhenDisabled(Context context,
                                                IdeAction action,
                                                java.lang.String originalLabel)
Description copied from interface: LabelUpdater
Returns the action's label when it is disabled.
If null then the action will be left unchanged.
Specified by:
labelWhenDisabled in interface LabelUpdater
Parameters:
context - the current context
action - the action to be updated
originalLabel - the action's first label

labelWhenEnabled

public final java.lang.String labelWhenEnabled(Context context,
                                               IdeAction action,
                                               java.lang.String originalLabel)
Description copied from interface: LabelUpdater
Returns the action's label when it is enabled.
If null then the action will be left unchanged.
Specified by:
labelWhenEnabled in interface LabelUpdater
Parameters:
context - the current context
action - the action to be updated
originalLabel - the action's first label

disabledMenuSpecificLabel

protected abstract java.lang.String disabledMenuSpecificLabel(IdeAction action,
                                                              java.lang.String originalLabel)
Gets the label to use for the action when it appears on the menu supplied in the constructor.
Parameters:
action - an action
Returns:
the action label - should not be null

enabledMenuSpecificLabel

protected abstract java.lang.String enabledMenuSpecificLabel(IdeAction action,
                                                             java.lang.String originalLabel)
Get the label to use for the disabled action when it appears on the menu supplied in the constructor.
Parameters:
action - an action
Returns:
the action label - should not be null

setDisabledFormat

public final void setDisabledFormat(java.lang.String format)
Not implemented.
Specified by:
setDisabledFormat in interface LabelUpdater
Parameters:
format - the value for disabled format

setEnabledFormat

public final void setEnabledFormat(java.lang.String format)
Not implemented.
Specified by:
setEnabledFormat in interface LabelUpdater
Parameters:
format - the value for enabled format

matchMenu

protected boolean matchMenu(java.util.EventObject event)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


Copyright © 1997, 2012, Oracle. All rights reserved.