Java JButton setWFActionMap(Vector actionButtons, String action, Map wfActionMap)

Here you can find the source of setWFActionMap(Vector actionButtons, String action, Map wfActionMap)

Description

set WF Action Map

License

Apache License

Declaration

public static void setWFActionMap(Vector<JButton> actionButtons, String action,
            Map<String, String> wfActionMap) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Map;
import java.util.Vector;

import javax.swing.JButton;

public class Main {
    public static void setWFActionMap(Vector<JButton> actionButtons, String action,
            Map<String, String> wfActionMap) {
        for (int i = 0; i < actionButtons.size(); i++) {
            JButton button = actionButtons.elementAt(i);
            String[] cmnd = button.getActionCommand().split("=");
            String stepAction = cmnd[1];
            wfActionMap.put(stepAction, action);
        }/*w  ww .j  a  v  a2s .  c  om*/
    }
}

Related

  1. setEnable(boolean b, JButton... bs)
  2. setImageIcon(JButton b, String fileName, String tip)
  3. setMacBevelButton(JButton button)
  4. setTransparent(JButton btn)
  5. setupAutoRepeat(final JButton button, final int intervalMs)
  6. showToolTip(final boolean show, final JWindow tip, final JButton boton, final JLabel tipText)
  7. showToolTip(final boolean show, final JWindow tip, final JButton boton, final JLabel tipText)
  8. toolBarSeparator(JButton button, Icon icon)
  9. wireComponentWithButton(JComponent component, final JButton button)