001 /* JAPI - (Yet another (hopefully) useful) Java API 002 * 003 * Copyright (C) 2004-2006 Christian Hujer 004 * 005 * This program is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU General Public License as 007 * published by the Free Software Foundation; either version 2 of the 008 * License, or (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, but 011 * WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * General Public License for more details. 014 * 015 * You should have received a copy of the GNU General Public License 016 * along with this program; if not, write to the Free Software 017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 018 * 02111-1307, USA. 019 */ 020 021 package net.sf.japi.swing; 022 023 import javax.swing.ActionMap; 024 025 /** An ActionMap subclass which provides a (possibly localized) name. 026 * @author <a href="mailto:chris@riedquat.de">Christian Hujer</a> 027 */ 028 public class NamedActionMap extends ActionMap { 029 030 /** The name. */ 031 private final String name; 032 033 /** Create a NamedActionMap without providing a name. 034 * The default name is the empty String. 035 */ 036 public NamedActionMap() { 037 this(""); 038 } 039 040 /** Create a NamedActionMap. 041 * @param name Name 042 */ 043 public NamedActionMap(final String name) { 044 this.name = name; 045 } 046 047 /** Returns the name. 048 * @return the name. 049 */ 050 public String getName() { 051 return name; 052 } 053 054 } // class NamedActionMap