decorate Swing Action - Java Swing

Java examples for Swing:Action

Description

decorate Swing Action

Demo Code


//package com.java2s;

import java.util.Iterator;
import java.util.Map;

import javax.swing.Action;

public class Main {
    public static Action decorateAction(Action action, Map decorations) {
        for (Iterator i = decorations.keySet().iterator(); i.hasNext();) {
            String key = i.next().toString();
            action.putValue(key, decorations.get(key));
        }// w w w.jav a  2s . com
        return action;
    }
}

Related Tutorials