001/* ---------------------------------------------------------------------------- 002 The Kiwi Toolkit - A Java Class Library 003 Copyright (C) 1998-2004 Mark A. Lindner 004 005 This library 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 library is distributed in the hope that it will be useful, 011 but 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 library; if not, write to the Free Software 017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 018 02111-1307, USA. 019 020 The author may be contacted at: mark_a_lindner@yahoo.com 021 ---------------------------------------------------------------------------- 022 $Log: WorkspaceEditorFactory.java,v $ 023 Revision 1.6 2004/05/12 19:16:38 markl 024 comment block updates 025 026 Revision 1.5 2004/01/23 00:05:04 markl 027 javadoc corrections 028 029 Revision 1.4 2003/01/19 09:50:54 markl 030 Javadoc & comment header updates. 031 032 Revision 1.3 2001/03/12 09:28:02 markl 033 Source code and Javadoc cleanup. 034 035 Revision 1.2 1999/01/10 03:05:32 markl 036 added GPL header & RCS tag 037 ---------------------------------------------------------------------------- 038*/ 039 040package kiwi.ui; 041 042/** This interface represents a factory that creates appropriate 043 * <code>WorkspaceEditor</code>s for specified objects and classes. 044 * 045 * @author Mark Lindner 046 */ 047 048public interface WorkspaceEditorFactory 049 { 050 051 /** General-purpose factory method for <code>WorkspaceEditor</code>s. Returns 052 * a <code>WorkspaceEditor</code> instance that is appropriate for editing 053 * the specified object. 054 * 055 * @param obj The object to edit. 056 * @exception NoAppropriateEditorException If a suitable editor could not be 057 * found for the object. 058 * @see #getEditorForType 059 */ 060 061 public WorkspaceEditor getEditorForObject(Object obj) 062 throws NoAppropriateEditorException; 063 064 /** General-purpose factory method for <code>WorkspaceEditor</code>s. Returns 065 * a <code>WorkspaceEditor</code> instance that is appropriate for editing 066 * an object of the specified type. 067 * 068 * @param clazz The type of object to edit. 069 * @exception NoAppropriateEditorException If a suitable editor could not be 070 * found for the class. 071 * @see #getEditorForObject 072 */ 073 074 public WorkspaceEditor getEditorForType(Class clazz) 075 throws NoAppropriateEditorException; 076 } 077 078/* end of source file */