Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
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

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/swing/Action.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut