Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.swing

Interface Action

    • Field Detail

      • NAME

        static final String NAME
        The key used for storing the String name for the action, used for a menu or button.
        See Also:
        Constant Field Values
      • SHORT_DESCRIPTION

        static final String SHORT_DESCRIPTION
        The key used for storing a short String description for the action, used for tooltip text.
        See Also:
        Constant Field Values
      • LONG_DESCRIPTION

        static final String LONG_DESCRIPTION
        The key used for storing a longer String description for the action, could be used for context-sensitive help.
        See Also:
        Constant Field Values
      • SMALL_ICON

        static final String SMALL_ICON
        The key used for storing a small Icon, such as ImageIcon. This is typically used with menus such as JMenuItem.

        If the same Action is used with menus and buttons you'll typically specify both a SMALL_ICON and a LARGE_ICON_KEY. The menu will use the SMALL_ICON and the button will use the LARGE_ICON_KEY.

        See Also:
        Constant Field Values
      • ACTION_COMMAND_KEY

        static final String ACTION_COMMAND_KEY
        The key used to determine the command String for the ActionEvent that will be created when an Action is going to be notified as the result of residing in a Keymap associated with a JComponent.
        See Also:
        Constant Field Values
      • ACCELERATOR_KEY

        static final String ACCELERATOR_KEY
        The key used for storing a KeyStroke to be used as the accelerator for the action.
        Since:
        1.3
        See Also:
        Constant Field Values
      • MNEMONIC_KEY

        static final String MNEMONIC_KEY
        The key used for storing an Integer that corresponds to one of the KeyEvent key codes. The value is commonly used to specify a mnemonic. For example: myAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_A) sets the mnemonic of myAction to 'a', while myAction.putValue(Action.MNEMONIC_KEY, KeyEvent.getExtendedKeyCodeForChar('?')) sets the mnemonic of myAction to Cyrillic letter "Ef".
        Since:
        1.3
        See Also:
        Constant Field Values
      • SELECTED_KEY

        static final String SELECTED_KEY
        The key used for storing a Boolean that corresponds to the selected state. This is typically used only for components that have a meaningful selection state. For example, JRadioButton and JCheckBox make use of this but instances of JMenu don't.

        This property differs from the others in that it is both read by the component and set by the component. For example, if an Action is attached to a JCheckBox the selected state of the JCheckBox will be set from that of the Action. If the user clicks on the JCheckBox the selected state of the JCheckBox and the Action will both be updated.

        Note: the value of this field is prefixed with 'Swing' to avoid possible collisions with existing Actions.

        Since:
        1.6
        See Also:
        Constant Field Values
      • DISPLAYED_MNEMONIC_INDEX_KEY

        static final String DISPLAYED_MNEMONIC_INDEX_KEY
        The key used for storing an Integer that corresponds to the index in the text (identified by the NAME property) that the decoration for a mnemonic should be rendered at. If the value of this property is greater than or equal to the length of the text, it will treated as -1.

        Note: the value of this field is prefixed with 'Swing' to avoid possible collisions with existing Actions.

        Since:
        1.6
        See Also:
        AbstractButton.setDisplayedMnemonicIndex(int), Constant Field Values
      • LARGE_ICON_KEY

        static final String LARGE_ICON_KEY
        The key used for storing an Icon. This is typically used by buttons, such as JButton and JToggleButton.

        If the same Action is used with menus and buttons you'll typically specify both a SMALL_ICON and a LARGE_ICON_KEY. The menu will use the SMALL_ICON and the button the LARGE_ICON_KEY.

        Note: the value of this field is prefixed with 'Swing' to avoid possible collisions with existing Actions.

        Since:
        1.6
        See Also:
        Constant Field Values
    • Method Detail

      • putValue

        void putValue(String key,
                    Object value)
        Sets one of this object's properties using the associated key. If the value has changed, a PropertyChangeEvent is sent to listeners.
        Parameters:
        key - a String containing the key
        value - an Object value
      • setEnabled

        void setEnabled(boolean b)
        Sets the enabled state of the Action. When enabled, any component associated with this object is active and able to fire this object's actionPerformed method. If the value has changed, a PropertyChangeEvent is sent to listeners.
        Parameters:
        b - true to enable this Action, false to disable it
      • isEnabled

        boolean isEnabled()
        Returns the enabled state of the Action. When enabled, any component associated with this object is active and able to fire this object's actionPerformed method.
        Returns:
        true if this Action is enabled
      • addPropertyChangeListener

        void addPropertyChangeListener(PropertyChangeListener listener)
        Adds a PropertyChange listener. Containers and attached components use these methods to register interest in this Action object. When its enabled state or other property changes, the registered listeners are informed of the change.
        Parameters:
        listener - a PropertyChangeListener object

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/swing/action.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut