001 /* 002 * LAPIS lightweight structured text processing system 003 * 004 * Copyright (C) 1998-2002 Carnegie Mellon University, 005 * Copyright (C) 2003 Massachusetts Institute of Technology. 006 * All rights reserved. 007 * 008 * This library is free software; you can redistribute it 009 * and/or modify it under the terms of the GNU General 010 * Public License as published by the Free Software 011 * Foundation, version 2. 012 * 013 * LAPIS homepage: http://graphics.lcs.mit.edu/lapis/ 014 */ 015 016 package lapisx.swing; 017 018 import java.awt.event.*; 019 import java.beans.*; 020 import javax.swing.*; 021 022 public class ExtendedAction implements Action { 023 Action delegate; 024 025 public ExtendedAction (Action delegate) { 026 this.delegate = delegate; 027 } 028 029 public void addPropertyChangeListener(PropertyChangeListener listener) { 030 delegate.addPropertyChangeListener (listener); 031 } 032 033 public Object getValue (String name) { 034 return delegate.getValue (name); 035 } 036 037 public boolean isEnabled() { 038 return delegate.isEnabled (); 039 } 040 041 public void putValue(String name, Object value) { 042 delegate.putValue (name, value); 043 } 044 045 public void removePropertyChangeListener(PropertyChangeListener listener) { 046 delegate.removePropertyChangeListener (listener); 047 } 048 049 public void setEnabled(boolean f) { 050 delegate.setEnabled (f); 051 } 052 053 public void actionPerformed (ActionEvent e) { 054 delegate.actionPerformed (e); 055 } 056 } 057