Modified: struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/AbstractEditableValueHolderBeanInfo.java URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/AbstractEditableValueHolderBeanInfo.java?rev=381930&r1=381929&r2=381930&view=diff ============================================================================== --- struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/AbstractEditableValueHolderBeanInfo.java (original) +++ struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/AbstractEditableValueHolderBeanInfo.java Tue Feb 28 22:41:06 2006 @@ -1,195 +1,195 @@ -/* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * $Id$ - */ - -package org.apache.shale.design; - -import com.sun.rave.designtime.Constants; -import com.sun.rave.designtime.Constants.EventDescriptor; -import com.sun.rave.designtime.markup.AttributeDescriptor; -import java.beans.EventSetDescriptor; -import java.beans.IntrospectionException; -import java.beans.PropertyDescriptor; -import java.lang.reflect.Method; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.event.ValueChangeEvent; -import javax.faces.event.ValueChangeListener; -import javax.faces.validator.Validator; - -/** - * <p>Convenience base class for <code>BeanInfo</code> implementations for - * JavaServer Faces components that implement <code>EditableValueHolder</code>.</p> - */ -public class AbstractEditableValueHolderBeanInfo extends AbstractValueHolderBeanInfo { - - - // ------------------------------------------------------------ Constructors - - - /** - * <p>Create a new <code>BeanInfo</code> instance for the specified - * bean class. Default the icon filenames based on the simple class - * name of the bean class.</p> - * - * @param clazz Bean class for which to create a <code>BeanInfo</code> - */ - public AbstractEditableValueHolderBeanInfo(Class clazz) { - super(clazz); - } - - - // ------------------------------------------------------- Protected Methods - - - /** - * <p>Add the additional event sets defined by <code>EditableValueHolder</code>.</p> - */ - protected void initEventSetDescriptors() throws Exception { - - super.initEventSetDescriptors(); - - EventSetDescriptor event = null; - Method method = null; - - method = ValueChangeListener.class.getMethod - ("processValueChange", - new Class[] { ValueChangeEvent.class }); - event = new EventSetDescriptor - ("valueChange", - ValueChangeListener.class, - new Method[] { method }, - null, - null); - event.setValue(Constants.EventSetDescriptor.BINDING_PROPERTY, - propertyDescriptor("valueChangeListener")); - eventDescriptorsList.add(event); - - method = Validator.class.getMethod - ("validate", - new Class[] { FacesContext.class, - UIComponent.class, - Object.class }); - event = new EventSetDescriptor - ("validator", - Validator.class, - new Method[] { method }, - null, - null); - event.setValue(Constants.EventSetDescriptor.BINDING_PROPERTY, - propertyDescriptor("validator")); - event.setValue(Constants.EventDescriptor.DEFAULT_EVENT_BODY, - bundle.getString("EditableValueHolder.validatorHandler")); - event.setValue(Constants.EventDescriptor.PARAMETER_NAMES, - new String[] { "context", - "component", - "value" }); - event.setValue(Constants.EventDescriptor.REQUIRED_IMPORTS, - new String[] { "javax.faces.application.FacesMessage", - "javax.faces.validator.ValidatorException" }); - eventDescriptorsList.add(event); - - } - - - /** - * <p>Add the additional properties defined by <code>EditableValueHolder</code>.</p> - */ - protected void initPropertyDescriptors() throws Exception { - - super.initPropertyDescriptors(); - - AttributeDescriptor ad = null; - PropertyDescriptor pd = null; - - pd = new PropertyDescriptor("immediate", beanClass); - pd.setDisplayName(bundle.getString("EditableValueHolder.immediate.displayName")); - pd.setShortDescription(bundle.getString("EditableValueHolder.immediate.shortDescription")); - pd.setExpert(false); - pd.setHidden(false); - pd.setPreferred(false); - ad = new AttributeDescriptor("immediate", false, null, true); - pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); - pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.ADVANCED); - propDescriptorsList.add(pd); - - pd = new PropertyDescriptor("localValueSet", beanClass); - pd.setDisplayName(bundle.getString("EditableValueHolder.localValueSet.displayName")); - pd.setShortDescription(bundle.getString("EditableValueHolder.localValueSet.shortDescription")); - pd.setExpert(true); - pd.setHidden(true); - pd.setPreferred(false); - pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.INTERNAL); - propDescriptorsList.add(pd); - - pd = new PropertyDescriptor("required", beanClass); - pd.setDisplayName(bundle.getString("EditableValueHolder.required.displayName")); - pd.setShortDescription(bundle.getString("EditableValueHolder.required.shortDescription")); - pd.setExpert(true); - pd.setHidden(true); - pd.setPreferred(false); - ad = new AttributeDescriptor("required", false, null, true); - pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); - pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.DATA); - propDescriptorsList.add(pd); - - pd = new PropertyDescriptor("submittedValue", beanClass); - pd.setDisplayName(bundle.getString("EditableValueHolder.submittedValue.displayName")); - pd.setShortDescription(bundle.getString("EditableValueHolder.submittedValue.shortDescription")); - pd.setExpert(true); - pd.setHidden(true); - pd.setPreferred(false); - pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.INTERNAL); - propDescriptorsList.add(pd); - - pd = new PropertyDescriptor("valid", beanClass); - pd.setDisplayName(bundle.getString("EditableValueHolder.valid.displayName")); - pd.setShortDescription(bundle.getString("EditableValueHolder.valid.shortDescription")); - pd.setExpert(true); - pd.setHidden(true); - pd.setPreferred(false); - pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.INTERNAL); - propDescriptorsList.add(pd); - - pd = new PropertyDescriptor("validator", beanClass); - pd.setDisplayName(bundle.getString("EditableValueHolder.validator.displayName")); - pd.setShortDescription(bundle.getString("EditableValueHolder.validator.shortDescription")); - pd.setExpert(false); - pd.setHidden(false); - pd.setPreferred(false); - pd.setPropertyEditorClass(loadClass("com.sun.jsfcl.std.ValidatorRefPropertyEditor")); - ad = new AttributeDescriptor("validator", false, null, true); - pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); - pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.DATA); - propDescriptorsList.add(pd); - - pd = new PropertyDescriptor("valueChangeListener", beanClass); - pd.setDisplayName(bundle.getString("EditableValueHolder.valueChangeListener.displayName")); - pd.setShortDescription(bundle.getString("EditableValueHolder.valueChangeListener.shortDescription")); - pd.setExpert(false); - pd.setHidden(false); - pd.setPreferred(false); - pd.setPropertyEditorClass(loadClass("com.sun.jsfcl.std.MethodBindingPropertyEditor")); - ad = new AttributeDescriptor("valueChangeListener", false, null, true); - pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); - pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.ADVANCED); - propDescriptorsList.add(pd); - - } - - -} +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * $Id$ + */ + +package org.apache.shale.design; + +import com.sun.rave.designtime.Constants; +import com.sun.rave.designtime.Constants.EventDescriptor; +import com.sun.rave.designtime.markup.AttributeDescriptor; +import java.beans.EventSetDescriptor; +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.lang.reflect.Method; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.event.ValueChangeEvent; +import javax.faces.event.ValueChangeListener; +import javax.faces.validator.Validator; + +/** + * <p>Convenience base class for <code>BeanInfo</code> implementations for + * JavaServer Faces components that implement <code>EditableValueHolder</code>.</p> + */ +public class AbstractEditableValueHolderBeanInfo extends AbstractValueHolderBeanInfo { + + + // ------------------------------------------------------------ Constructors + + + /** + * <p>Create a new <code>BeanInfo</code> instance for the specified + * bean class. Default the icon filenames based on the simple class + * name of the bean class.</p> + * + * @param clazz Bean class for which to create a <code>BeanInfo</code> + */ + public AbstractEditableValueHolderBeanInfo(Class clazz) { + super(clazz); + } + + + // ------------------------------------------------------- Protected Methods + + + /** + * <p>Add the additional event sets defined by <code>EditableValueHolder</code>.</p> + */ + protected void initEventSetDescriptors() throws Exception { + + super.initEventSetDescriptors(); + + EventSetDescriptor event = null; + Method method = null; + + method = ValueChangeListener.class.getMethod + ("processValueChange", + new Class[] { ValueChangeEvent.class }); + event = new EventSetDescriptor + ("valueChange", + ValueChangeListener.class, + new Method[] { method }, + null, + null); + event.setValue(Constants.EventSetDescriptor.BINDING_PROPERTY, + propertyDescriptor("valueChangeListener")); + eventDescriptorsList.add(event); + + method = Validator.class.getMethod + ("validate", + new Class[] { FacesContext.class, + UIComponent.class, + Object.class }); + event = new EventSetDescriptor + ("validator", + Validator.class, + new Method[] { method }, + null, + null); + event.setValue(Constants.EventSetDescriptor.BINDING_PROPERTY, + propertyDescriptor("validator")); + event.setValue(Constants.EventDescriptor.DEFAULT_EVENT_BODY, + bundle.getString("EditableValueHolder.validatorHandler")); + event.setValue(Constants.EventDescriptor.PARAMETER_NAMES, + new String[] { "context", + "component", + "value" }); + event.setValue(Constants.EventDescriptor.REQUIRED_IMPORTS, + new String[] { "javax.faces.application.FacesMessage", + "javax.faces.validator.ValidatorException" }); + eventDescriptorsList.add(event); + + } + + + /** + * <p>Add the additional properties defined by <code>EditableValueHolder</code>.</p> + */ + protected void initPropertyDescriptors() throws Exception { + + super.initPropertyDescriptors(); + + AttributeDescriptor ad = null; + PropertyDescriptor pd = null; + + pd = new PropertyDescriptor("immediate", beanClass); + pd.setDisplayName(bundle.getString("EditableValueHolder.immediate.displayName")); + pd.setShortDescription(bundle.getString("EditableValueHolder.immediate.shortDescription")); + pd.setExpert(false); + pd.setHidden(false); + pd.setPreferred(false); + ad = new AttributeDescriptor("immediate", false, null, true); + pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); + pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.ADVANCED); + propDescriptorsList.add(pd); + + pd = new PropertyDescriptor("localValueSet", beanClass); + pd.setDisplayName(bundle.getString("EditableValueHolder.localValueSet.displayName")); + pd.setShortDescription(bundle.getString("EditableValueHolder.localValueSet.shortDescription")); + pd.setExpert(true); + pd.setHidden(true); + pd.setPreferred(false); + pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.INTERNAL); + propDescriptorsList.add(pd); + + pd = new PropertyDescriptor("required", beanClass); + pd.setDisplayName(bundle.getString("EditableValueHolder.required.displayName")); + pd.setShortDescription(bundle.getString("EditableValueHolder.required.shortDescription")); + pd.setExpert(true); + pd.setHidden(true); + pd.setPreferred(false); + ad = new AttributeDescriptor("required", false, null, true); + pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); + pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.DATA); + propDescriptorsList.add(pd); + + pd = new PropertyDescriptor("submittedValue", beanClass); + pd.setDisplayName(bundle.getString("EditableValueHolder.submittedValue.displayName")); + pd.setShortDescription(bundle.getString("EditableValueHolder.submittedValue.shortDescription")); + pd.setExpert(true); + pd.setHidden(true); + pd.setPreferred(false); + pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.INTERNAL); + propDescriptorsList.add(pd); + + pd = new PropertyDescriptor("valid", beanClass); + pd.setDisplayName(bundle.getString("EditableValueHolder.valid.displayName")); + pd.setShortDescription(bundle.getString("EditableValueHolder.valid.shortDescription")); + pd.setExpert(true); + pd.setHidden(true); + pd.setPreferred(false); + pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.INTERNAL); + propDescriptorsList.add(pd); + + pd = new PropertyDescriptor("validator", beanClass); + pd.setDisplayName(bundle.getString("EditableValueHolder.validator.displayName")); + pd.setShortDescription(bundle.getString("EditableValueHolder.validator.shortDescription")); + pd.setExpert(false); + pd.setHidden(false); + pd.setPreferred(false); + pd.setPropertyEditorClass(loadClass("com.sun.jsfcl.std.ValidatorRefPropertyEditor")); + ad = new AttributeDescriptor("validator", false, null, true); + pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); + pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.DATA); + propDescriptorsList.add(pd); + + pd = new PropertyDescriptor("valueChangeListener", beanClass); + pd.setDisplayName(bundle.getString("EditableValueHolder.valueChangeListener.displayName")); + pd.setShortDescription(bundle.getString("EditableValueHolder.valueChangeListener.shortDescription")); + pd.setExpert(false); + pd.setHidden(false); + pd.setPreferred(false); + pd.setPropertyEditorClass(loadClass("com.sun.jsfcl.std.MethodBindingPropertyEditor")); + ad = new AttributeDescriptor("valueChangeListener", false, null, true); + pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); + pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.ADVANCED); + propDescriptorsList.add(pd); + + } + + +}
Modified: struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/AbstractValueHolderBeanInfo.java URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/AbstractValueHolderBeanInfo.java?rev=381930&r1=381929&r2=381930&view=diff ============================================================================== --- struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/AbstractValueHolderBeanInfo.java (original) +++ struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/AbstractValueHolderBeanInfo.java Tue Feb 28 22:41:06 2006 @@ -1,97 +1,97 @@ -/* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * $Id$ - */ - -package org.apache.shale.design; - -import com.sun.rave.designtime.Constants; -import com.sun.rave.designtime.markup.AttributeDescriptor; -import java.beans.IntrospectionException; -import java.beans.PropertyDescriptor; - -/** - * <p>Convenience base class for <code>BeanInfo</code> implementations for - * JavaServer Faces components that implement <code>ValueHolder</code>.</p> - */ -public class AbstractValueHolderBeanInfo extends AbstractBeanInfo { - - - // ------------------------------------------------------------ Constructors - - - /** - * <p>Create a new <code>BeanInfo</code> instance for the specified - * bean class. Default the icon filenames based on the simple class - * name of the bean class.</p> - * - * @param clazz Bean class for which to create a <code>BeanInfo</code> - */ - public AbstractValueHolderBeanInfo(Class clazz) { - super(clazz); - } - - - // ------------------------------------------------------- Protected Methods - - - /** - * <p>Add the additional properties defined by <code>ValueHolder</code>.</p> - */ - protected void initPropertyDescriptors() throws Exception { - - super.initPropertyDescriptors(); - - AttributeDescriptor ad = null; - PropertyDescriptor pd = null; - - pd = new PropertyDescriptor("converter", beanClass); - pd.setDisplayName(bundle.getString("ValueHolder.converter.displayName")); - pd.setShortDescription(bundle.getString("ValueHolder.converter.shortDescription")); - pd.setExpert(false); - pd.setHidden(false); - pd.setPreferred(false); - pd.setPropertyEditorClass(loadClass("com.sun.jsfcl.std.ConverterPropertyEditor")); - ad = new AttributeDescriptor("converter", false, null, true); - pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); - pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.DATA); - propDescriptorsList.add(pd); - - pd = new PropertyDescriptor("localValue", beanClass, "getLocalValue", null); - pd.setDisplayName(bundle.getString("ValueHolder.localValue.displayName")); - pd.setShortDescription(bundle.getString("ValueHolder.localValue.shortDescription")); - pd.setExpert(true); - pd.setHidden(true); - pd.setPreferred(false); - pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.INTERNAL); - propDescriptorsList.add(pd); - - pd = new PropertyDescriptor("value", beanClass); - pd.setDisplayName(bundle.getString("ValueHolder.value.displayName")); - pd.setShortDescription(bundle.getString("ValueHolder.value.shortDescription")); - pd.setExpert(false); - pd.setHidden(false); - pd.setPreferred(false); - pd.setPropertyEditorClass(loadClass("com.sun.jsfcl.std.ValueBindingPropertyEditor")); - ad = new AttributeDescriptor("value", false, null, true); - pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); - pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.DATA); - propDescriptorsList.add(pd); - - } - - -} +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * $Id$ + */ + +package org.apache.shale.design; + +import com.sun.rave.designtime.Constants; +import com.sun.rave.designtime.markup.AttributeDescriptor; +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; + +/** + * <p>Convenience base class for <code>BeanInfo</code> implementations for + * JavaServer Faces components that implement <code>ValueHolder</code>.</p> + */ +public class AbstractValueHolderBeanInfo extends AbstractBeanInfo { + + + // ------------------------------------------------------------ Constructors + + + /** + * <p>Create a new <code>BeanInfo</code> instance for the specified + * bean class. Default the icon filenames based on the simple class + * name of the bean class.</p> + * + * @param clazz Bean class for which to create a <code>BeanInfo</code> + */ + public AbstractValueHolderBeanInfo(Class clazz) { + super(clazz); + } + + + // ------------------------------------------------------- Protected Methods + + + /** + * <p>Add the additional properties defined by <code>ValueHolder</code>.</p> + */ + protected void initPropertyDescriptors() throws Exception { + + super.initPropertyDescriptors(); + + AttributeDescriptor ad = null; + PropertyDescriptor pd = null; + + pd = new PropertyDescriptor("converter", beanClass); + pd.setDisplayName(bundle.getString("ValueHolder.converter.displayName")); + pd.setShortDescription(bundle.getString("ValueHolder.converter.shortDescription")); + pd.setExpert(false); + pd.setHidden(false); + pd.setPreferred(false); + pd.setPropertyEditorClass(loadClass("com.sun.jsfcl.std.ConverterPropertyEditor")); + ad = new AttributeDescriptor("converter", false, null, true); + pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); + pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.DATA); + propDescriptorsList.add(pd); + + pd = new PropertyDescriptor("localValue", beanClass, "getLocalValue", null); + pd.setDisplayName(bundle.getString("ValueHolder.localValue.displayName")); + pd.setShortDescription(bundle.getString("ValueHolder.localValue.shortDescription")); + pd.setExpert(true); + pd.setHidden(true); + pd.setPreferred(false); + pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.INTERNAL); + propDescriptorsList.add(pd); + + pd = new PropertyDescriptor("value", beanClass); + pd.setDisplayName(bundle.getString("ValueHolder.value.displayName")); + pd.setShortDescription(bundle.getString("ValueHolder.value.shortDescription")); + pd.setExpert(false); + pd.setHidden(false); + pd.setPreferred(false); + pd.setPropertyEditorClass(loadClass("com.sun.jsfcl.std.ValueBindingPropertyEditor")); + ad = new AttributeDescriptor("value", false, null, true); + pd.setValue(Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, ad); + pd.setValue(Constants.PropertyDescriptor.CATEGORY, Categories.DATA); + propDescriptorsList.add(pd); + + } + + +} Modified: struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/Categories.java URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/Categories.java?rev=381930&r1=381929&r2=381930&view=diff ============================================================================== --- struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/Categories.java (original) +++ struts/shale/trunk/core-library/src/designtime/org/apache/shale/design/Categories.java Tue Feb 28 22:41:06 2006 @@ -1,100 +1,100 @@ -/* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * $Id$ - */ - -package org.apache.shale.design; - -import com.sun.rave.designtime.CategoryDescriptor; -import java.util.Locale; -import java.util.ResourceBundle; - -/** - * <p>Category descriptors for bean properties.</p> - */ -public class Categories { - - - // ------------------------------------------------------------ Constructors - - - /** - * <p>Private constructor to avoid instantiation.</p> - */ - private Categories() { - } - - // -------------------------------------------------------- Static Variables - - - /** - * <p><code>ResourceBundle</code> containing localized messages for - * this component library's design time code.</p> - */ - private static ResourceBundle bundle = - ResourceBundle.getBundle("org.apache.shale.design.Bundle", - Locale.getDefault(), - Categories.class.getClassLoader()); - - - /** - * <p>Categoy descriptors for component property categories.</p> - */ - - public static final CategoryDescriptor GENERAL = - new CategoryDescriptor(bundle.getString("Category.GENERAL.name"), - bundle.getString("Category.GENERAL.description"), - true); - - public static final CategoryDescriptor APPEARANCE = - new CategoryDescriptor(bundle.getString("Category.APPEARANCE.name"), - bundle.getString("Category.APPEARANCE.description"), - true); - - public static final CategoryDescriptor DATA = - new CategoryDescriptor(bundle.getString("Category.DATA.name"), - bundle.getString("Category.DATA.description"), - true); - - public static final CategoryDescriptor EVENTS = - new CategoryDescriptor(bundle.getString("Category.EVENTS.name"), - bundle.getString("Category.EVENTS.description"), - true); - - public static final CategoryDescriptor JAVASCRIPT = - new CategoryDescriptor(bundle.getString("Category.JAVASCRIPT.name"), - bundle.getString("Category.JAVASCRIPT.description"), - true); - - public static final CategoryDescriptor ADVANCED = - new CategoryDescriptor(bundle.getString("Category.ADVANCED.name"), - bundle.getString("Category.ADVANCED.description"), - true); - - public static final CategoryDescriptor INTERNAL = - new CategoryDescriptor(bundle.getString("Category.INTERNAL.name"), - bundle.getString("Category.INTERNAL.description"), - true); - - /** - * <p>Array of property categories, in the order they should be displayed - * on the property sheet.</p> - */ - public static final CategoryDescriptor CATEGORIES[] = - { GENERAL, APPEARANCE, DATA, EVENTS, JAVASCRIPT, ADVANCED, INTERNAL }; - - -} +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * $Id$ + */ + +package org.apache.shale.design; + +import com.sun.rave.designtime.CategoryDescriptor; +import java.util.Locale; +import java.util.ResourceBundle; + +/** + * <p>Category descriptors for bean properties.</p> + */ +public class Categories { + + + // ------------------------------------------------------------ Constructors + + + /** + * <p>Private constructor to avoid instantiation.</p> + */ + private Categories() { + } + + // -------------------------------------------------------- Static Variables + + + /** + * <p><code>ResourceBundle</code> containing localized messages for + * this component library's design time code.</p> + */ + private static ResourceBundle bundle = + ResourceBundle.getBundle("org.apache.shale.design.Bundle", + Locale.getDefault(), + Categories.class.getClassLoader()); + + + /** + * <p>Categoy descriptors for component property categories.</p> + */ + + public static final CategoryDescriptor GENERAL = + new CategoryDescriptor(bundle.getString("Category.GENERAL.name"), + bundle.getString("Category.GENERAL.description"), + true); + + public static final CategoryDescriptor APPEARANCE = + new CategoryDescriptor(bundle.getString("Category.APPEARANCE.name"), + bundle.getString("Category.APPEARANCE.description"), + true); + + public static final CategoryDescriptor DATA = + new CategoryDescriptor(bundle.getString("Category.DATA.name"), + bundle.getString("Category.DATA.description"), + true); + + public static final CategoryDescriptor EVENTS = + new CategoryDescriptor(bundle.getString("Category.EVENTS.name"), + bundle.getString("Category.EVENTS.description"), + true); + + public static final CategoryDescriptor JAVASCRIPT = + new CategoryDescriptor(bundle.getString("Category.JAVASCRIPT.name"), + bundle.getString("Category.JAVASCRIPT.description"), + true); + + public static final CategoryDescriptor ADVANCED = + new CategoryDescriptor(bundle.getString("Category.ADVANCED.name"), + bundle.getString("Category.ADVANCED.description"), + true); + + public static final CategoryDescriptor INTERNAL = + new CategoryDescriptor(bundle.getString("Category.INTERNAL.name"), + bundle.getString("Category.INTERNAL.description"), + true); + + /** + * <p>Array of property categories, in the order they should be displayed + * on the property sheet.</p> + */ + public static final CategoryDescriptor CATEGORIES[] = + { GENERAL, APPEARANCE, DATA, EVENTS, JAVASCRIPT, ADVANCED, INTERNAL }; + + +} --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
