Tabnine Logo
ActionMenuItem
Code IndexAdd Tabnine to your IDE (free)

How to use
ActionMenuItem
in
org.jfree.ui.action

Best Java code snippets using org.jfree.ui.action.ActionMenuItem (Showing top 12 results out of 315)

origin: jfree/jcommon

/**
 * Enables and disables this button and if an action is assigned to this
 * menuitem the propertychange is forwarded to the assigned action.
 *
 * @param b the new enable-state of this menuitem
 */
public void setEnabled(final boolean b)
{
 super.setEnabled(b);
 if (getAction() != null)
 {
  getAction().setEnabled(b);
 }
}
origin: jfree/jcommon

/**
 * Creates a new menu item based on the specified action.
 *
 * @param action the action.
 */
public ActionMenuItem(final Action action)
{
 setAction(action);
}
origin: jfree/jcommon

final Action oldAction = getAction();
if (oldAction != null)
 removeActionListener(oldAction);
 oldAction.removePropertyChangeListener(getPropertyChangeHandler());
 setAccelerator(null);
 addActionListener(newAction);
 newAction.addPropertyChangeListener(getPropertyChangeHandler());
 setText((String) (newAction.getValue(Action.NAME)));
 setToolTipText((String) (newAction.getValue(Action.SHORT_DESCRIPTION)));
 setIcon((Icon) newAction.getValue(Action.SMALL_ICON));
 setEnabled(this.action.isEnabled());
   setMnemonic(c.charValue());
   setMnemonic(c.intValue());
  setMnemonic(KeyEvent.VK_UNDEFINED);
 if (o instanceof KeyStroke)
  setAccelerator((KeyStroke) o);
origin: org.jfree/jcommon

 setEnabled(getAction().isEnabled());
 setIcon((Icon) getAction().getValue(Action.SMALL_ICON));
 setText((String) getAction().getValue(Action.NAME));
 ActionMenuItem.this.setToolTipText((String)
     getAction().getValue(Action.SHORT_DESCRIPTION));
final Action ac = getAction();
if (event.getPropertyName().equals(ActionDowngrade.ACCELERATOR_KEY))
 setAccelerator((KeyStroke) ac.getValue(ActionDowngrade.ACCELERATOR_KEY));
   setMnemonic(c.charValue());
   setMnemonic(c.intValue());
  setMnemonic(KeyEvent.VK_UNDEFINED);
origin: org.jfree/jcommon

final Action oldAction = getAction();
if (oldAction != null)
 removeActionListener(oldAction);
 oldAction.removePropertyChangeListener(getPropertyChangeHandler());
 setAccelerator(null);
 addActionListener(newAction);
 newAction.addPropertyChangeListener(getPropertyChangeHandler());
 setText((String) (newAction.getValue(Action.NAME)));
 setToolTipText((String) (newAction.getValue(Action.SHORT_DESCRIPTION)));
 setIcon((Icon) newAction.getValue(Action.SMALL_ICON));
 setEnabled(this.action.isEnabled());
   setMnemonic(c.charValue());
   setMnemonic(c.intValue());
  setMnemonic(KeyEvent.VK_UNDEFINED);
 if (o instanceof KeyStroke)
  setAccelerator((KeyStroke) o);
origin: org.jfree/com.springsource.org.jfree

 setEnabled(getAction().isEnabled());
 setIcon((Icon) getAction().getValue(Action.SMALL_ICON));
 setText((String) getAction().getValue(Action.NAME));
 ActionMenuItem.this.setToolTipText((String)
     getAction().getValue(Action.SHORT_DESCRIPTION));
final Action ac = getAction();
if (event.getPropertyName().equals(ActionDowngrade.ACCELERATOR_KEY))
 setAccelerator((KeyStroke) ac.getValue(ActionDowngrade.ACCELERATOR_KEY));
   setMnemonic(c.charValue());
   setMnemonic(c.intValue());
  setMnemonic(KeyEvent.VK_UNDEFINED);
origin: org.jfree/com.springsource.org.jfree

final Action oldAction = getAction();
if (oldAction != null)
 removeActionListener(oldAction);
 oldAction.removePropertyChangeListener(getPropertyChangeHandler());
 setAccelerator(null);
 addActionListener(newAction);
 newAction.addPropertyChangeListener(getPropertyChangeHandler());
 setText((String) (newAction.getValue(Action.NAME)));
 setToolTipText((String) (newAction.getValue(Action.SHORT_DESCRIPTION)));
 setIcon((Icon) newAction.getValue(Action.SMALL_ICON));
 setEnabled(this.action.isEnabled());
   setMnemonic(c.charValue());
   setMnemonic(c.intValue());
  setMnemonic(KeyEvent.VK_UNDEFINED);
 if (o instanceof KeyStroke)
  setAccelerator((KeyStroke) o);
origin: jfree/jcommon

 setEnabled(getAction().isEnabled());
 setIcon((Icon) getAction().getValue(Action.SMALL_ICON));
 setText((String) getAction().getValue(Action.NAME));
 ActionMenuItem.this.setToolTipText((String)
     getAction().getValue(Action.SHORT_DESCRIPTION));
final Action ac = getAction();
if (event.getPropertyName().equals(ActionDowngrade.ACCELERATOR_KEY))
 setAccelerator((KeyStroke) ac.getValue(ActionDowngrade.ACCELERATOR_KEY));
   setMnemonic(c.charValue());
   setMnemonic(c.intValue());
  setMnemonic(KeyEvent.VK_UNDEFINED);
origin: org.jfree/jcommon

/**
 * Creates a new menu item based on the specified action.
 *
 * @param action the action.
 */
public ActionMenuItem(final Action action)
{
 setAction(action);
}
origin: org.jfree/jcommon

/**
 * Enables and disables this button and if an action is assigned to this
 * menuitem the propertychange is forwarded to the assigned action.
 *
 * @param b the new enable-state of this menuitem
 */
public void setEnabled(final boolean b)
{
 super.setEnabled(b);
 if (getAction() != null)
 {
  getAction().setEnabled(b);
 }
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Creates a new menu item based on the specified action.
 *
 * @param action the action.
 */
public ActionMenuItem(final Action action)
{
 setAction(action);
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Enables and disables this button and if an action is assigned to this
 * menuitem the propertychange is forwarded to the assigned action.
 *
 * @param b the new enable-state of this menuitem
 */
public void setEnabled(final boolean b)
{
 super.setEnabled(b);
 if (getAction() != null)
 {
  getAction().setEnabled(b);
 }
}
org.jfree.ui.actionActionMenuItem

Javadoc

The ActionMenuItem is used to connect an Action and its properties to an MenuItem.

This functionality is already implemented in JDK 1.3 but needed for JDK 1.2.2 compatibility.

Most used methods

  • addActionListener
  • getAction
    Returns the assigned action or null if no action has been assigned.
  • getPropertyChangeHandler
    Returns and initializes the PropertyChangehandler for this ActionMenuItem. The PropertyChangeHandler
  • removeActionListener
  • setAccelerator
  • setAction
    Assigns the given action to this menuitem. The properties of the action will be assigned to the menu
  • setEnabled
    Enables and disables this button and if an action is assigned to this menuitem the propertychange is
  • setIcon
  • setMnemonic
  • setText
  • setToolTipText
  • setToolTipText

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now