2362N/A * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Component decorator that implements the view interface 0N/A * for <object> elements. 0N/A * This view will try to load the class specified by the 0N/A * <code>classid</code> attribute. If possible, the Classloader 0N/A * used to load the associated Document is used. 0N/A * This would typically be the same as the ClassLoader 0N/A * used to load the EditorKit. If the document's 0N/A * ClassLoader is null, <code>Class.forName</code> is used. 0N/A * If the class can successfully be loaded, an attempt will 0N/A * be made to create an instance of it by calling 0N/A * <code>Class.newInstance</code>. An attempt will be made 0N/A * to narrow the instance to type <code>java.awt.Component</code> 0N/A * to display the object. 0N/A * This view can also manage a set of parameters with limitations. 0N/A * The parameters to the <object> element are expected to 0N/A * be present on the associated elements attribute set as simple 0N/A * strings. Each bean property will be queried as a key on 0N/A * the AttributeSet, with the expectation that a non-null value 0N/A * (of type String) will be present if there was a parameter 0N/A * specification for the property. Reflection is used to 0N/A * set the parameter. Currently, this is limited to a very 0N/A * simple single parameter of type String. 0N/A * A simple example HTML invocation is: 0N/A * <object classid="javax.swing.JLabel"> 0N/A * <param name="text" value="sample text"> 0N/A * @author Timothy Prinzing 0N/A * Creates a new ObjectView object. 0N/A * @param elem the element to decorate 0N/A * Create the component. The classid is used 0N/A * as a specification of the classname, which 0N/A // couldn't create a component... fall through to the 0N/A // couldn't load representation. 0N/A * Fetch a component that can be used to represent the 0N/A * object if it can't be created. 0N/A // PENDING(prinz) get some artwork and return something 0N/A // interesting here. 0N/A * Get a Class object to use for loading the 0N/A * classid. If possible, the Classloader 0N/A * used to load the associated Document is used. 0N/A * This would typically be the same as the ClassLoader 0N/A * used to load the EditorKit. If the documents 0N/A * ClassLoader is null, 0N/A * <code>Class.forName</code> is used. 0N/A * Initialize this component according the KEY/VALUEs passed in 0N/A * via the <param> elements in the corresponding 0N/A * <object> element. 0N/A return;
// quit for now 0N/A // System.err.println("checking on props[i]: "+props[i].getName()); 0N/A // found a property parameter 0N/A // read-only property. ignore 0N/A // zero or more than one argument, ignore