View Javadoc
1 /* 2 * Angkor Web Framework 3 * 4 * Distributable under LGPL license. 5 * See terms of license at gnu.org. 6 */ 7 8 package com.tirsen.angkor.event; 9 10 import java.io.Serializable; 11 import java.util.HashMap; 12 import java.util.Map; 13 14 /*** 15 * Provides default implementations for the {@link Action} interface. 16 * 17 * <!-- $Id: AbstractAction.java,v 1.3 2002/10/09 21:37:37 tirsen Exp $ --> 18 * 19 * @author $Author: tirsen $ 20 * @version $Revision: 1.3 $ 21 * @see Action 22 */ 23 public abstract class AbstractAction implements Action, Serializable 24 { 25 private boolean enabled = true; 26 private Map map = new HashMap(); 27 28 public AbstractAction(String name) 29 { 30 putValue(NAME, name); 31 } 32 33 public AbstractAction() 34 { 35 } 36 37 public Object getValue(String property) 38 { 39 return map.get(property); 40 } 41 42 public void putValue(String property, Object o) 43 { 44 map.put(property, o); 45 } 46 47 public boolean isEnabled() 48 { 49 return enabled; 50 } 51 52 public void setEnabled(boolean enabled) 53 { 54 this.enabled = enabled; 55 } 56 57 public String toString() 58 { 59 return "Action[" + getValue(NAME) + "]"; 60 } 61 }

This page was automatically generated by Maven