Java examples for Swing:Action
decorate Swing Action
//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; } }