All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nqadmin.swingset.formatting.SSImageFieldBeanInfo Maven / Gradle / Ivy

There is a newer version: 4.0.12
Show newest version
/*******************************************************************************
 * Copyright (C) 2003-2021, Prasanth R. Pasala, Brian E. Pangburn, & The Pangburn Group
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * 
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 * 
 * 3. Neither the name of the copyright holder nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 * 
 * Contributors:
 *   Prasanth R. Pasala
 *   Brian E. Pangburn
 *   Diego Gil
 *   Man "Bee" Vo
 *   Ernie R. Rael
 ******************************************************************************/
package com.nqadmin.swingset.formatting;

import java.beans.BeanDescriptor;
import java.beans.EventSetDescriptor;
import java.beans.IntrospectionException;
import java.beans.MethodDescriptor;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;

/**
 * SSImageFieldBeanInfo.java
 * 

* SwingSet - Open Toolkit For Making Swing Controls Database-Aware *

* Contains and controls various bean properties for SSImageField. *

* SSImageField is deprecated starting in SwingSet 4.0.0 so this class * is being deprecated as well. */ @Deprecated public class SSImageFieldBeanInfo extends SimpleBeanInfo { private static final int defaultEventIndex = -1;//GEN-END:Idx private static final int defaultPropertyIndex = -1;//GEN-BEGIN:Idx // Event set information will be obtained from introspection.//GEN-FIRST:Events private static EventSetDescriptor[] eventSets = null; // Method information will be obtained from introspection.//GEN-FIRST:Methods private static MethodDescriptor[] methods = null; // Property identifiers//GEN-FIRST:Properties private static final int PROPERTY_background = 0; private static final int PROPERTY_border = 1; private static final int PROPERTY_columnName = 2; private static final int PROPERTY_enabled = 3; private static final int PROPERTY_focusable = 4; private static final int PROPERTY_insets = 5; private static final int PROPERTY_preferredSize = 6; private static final int PROPERTY_SSDataNavigator = 7; private static final int PROPERTY_RowSet = 8; private static final int PROPERTY_toolTipText = 9; private static final int PROPERTY_visible = 10; // Bean descriptor//GEN-FIRST:BeanDescriptor /*lazy BeanDescriptor*/ private static BeanDescriptor getBdescriptor(){ final BeanDescriptor beanDescriptor = new BeanDescriptor ( com.nqadmin.swingset.formatting.SSImageField.class , null ); beanDescriptor.setDisplayName ( "SSImageField" ); beanDescriptor.setShortDescription ( "Field used to handle bytea image fields" );//GEN-HEADEREND:BeanDescriptor // Here you can add code for customizing the BeanDescriptor. return beanDescriptor; }//GEN-LAST:BeanDescriptor private static EventSetDescriptor[] getEdescriptor(){//GEN-HEADEREND:Events // Here you can add code for customizing the event sets array. return eventSets; }//GEN-LAST:Events private static MethodDescriptor[] getMdescriptor(){//GEN-HEADEREND:Methods // Here you can add code for customizing the methods array. return methods; }//GEN-LAST:Methods // Property array /*lazy PropertyDescriptor*/ private static PropertyDescriptor[] getPdescriptor(){ final PropertyDescriptor[] properties = new PropertyDescriptor[11]; try { properties[PROPERTY_background] = new PropertyDescriptor ( "background", com.nqadmin.swingset.formatting.SSImageField.class, "getBackground", "setBackground" ); properties[PROPERTY_border] = new PropertyDescriptor ( "border", com.nqadmin.swingset.formatting.SSImageField.class, "getBorder", "setBorder" ); properties[PROPERTY_columnName] = new PropertyDescriptor ( "columnName", com.nqadmin.swingset.formatting.SSImageField.class, "getColumnName", "setColumnName" ); properties[PROPERTY_columnName].setPreferred ( true ); properties[PROPERTY_columnName].setDisplayName ( "Column Name" ); properties[PROPERTY_enabled] = new PropertyDescriptor ( "enabled", com.nqadmin.swingset.formatting.SSImageField.class, "isEnabled", "setEnabled" ); properties[PROPERTY_focusable] = new PropertyDescriptor ( "focusable", com.nqadmin.swingset.formatting.SSImageField.class, "isFocusable", "setFocusable" ); properties[PROPERTY_insets] = new PropertyDescriptor ( "insets", com.nqadmin.swingset.formatting.SSImageField.class, "getInsets", null ); properties[PROPERTY_preferredSize] = new PropertyDescriptor ( "preferredSize", com.nqadmin.swingset.formatting.SSImageField.class, "getPreferredSize", "setPreferredSize" ); properties[PROPERTY_SSDataNavigator] = new PropertyDescriptor ( "SSDataNavigator", com.nqadmin.swingset.formatting.SSImageField.class, "getSSDataNavigator", "setSSDataNavigator" ); properties[PROPERTY_SSDataNavigator].setPreferred ( true ); properties[PROPERTY_SSDataNavigator].setDisplayName ( "SSDataNavigator" ); properties[PROPERTY_RowSet] = new PropertyDescriptor ( "RowSet", com.nqadmin.swingset.formatting.SSImageField.class, "getRowSet", "setRowSet" ); properties[PROPERTY_RowSet].setPreferred ( true ); properties[PROPERTY_RowSet].setDisplayName ( "RowSet" ); properties[PROPERTY_toolTipText] = new PropertyDescriptor ( "toolTipText", com.nqadmin.swingset.formatting.SSImageField.class, "getToolTipText", "setToolTipText" ); properties[PROPERTY_toolTipText].setPreferred ( true ); properties[PROPERTY_visible] = new PropertyDescriptor ( "visible", com.nqadmin.swingset.formatting.SSImageField.class, "isVisible", "setVisible" ); } catch( final IntrospectionException e) { // do nothing }//GEN-HEADEREND:Properties // Here you can add code for customizing the properties array. return properties; }//GEN-LAST:Properties //GEN-FIRST:Superclass // Here you can add code for customizing the Superclass BeanInfo. //GEN-LAST:Superclass /** * Gets the bean's BeanDescriptors. * * @return BeanDescriptor describing the editable * properties of this bean. May return null if the * information should be obtained by automatic analysis. */ @Override public BeanDescriptor getBeanDescriptor() { return getBdescriptor(); } /** * A bean may have a "default" event that is the event that will * mostly commonly be used by human's when using the bean. * @return Index of default event in the EventSetDescriptor array * returned by getEventSetDescriptors. *

Returns -1 if there is no default event. */ @Override public int getDefaultEventIndex() { return defaultEventIndex; } /** * A bean may have a "default" property that is the property that will * mostly commonly be initially chosen for update by human's who are * customizing the bean. * @return Index of default property in the PropertyDescriptor array * returned by getPropertyDescriptors. *

Returns -1 if there is no default property. */ @Override public int getDefaultPropertyIndex() { return defaultPropertyIndex; } /** * Gets the bean's EventSetDescriptors. * * @return An array of EventSetDescriptors describing the kinds of * events fired by this bean. May return null if the information * should be obtained by automatic analysis. */ @Override public EventSetDescriptor[] getEventSetDescriptors() { return getEdescriptor(); } /** * Gets the bean's MethodDescriptors. * * @return An array of MethodDescriptors describing the methods * implemented by this bean. May return null if the information * should be obtained by automatic analysis. */ @Override public MethodDescriptor[] getMethodDescriptors() { return getMdescriptor(); } /** * Gets the bean's PropertyDescriptors. * * @return An array of PropertyDescriptors describing the editable * properties supported by this bean. May return null if the * information should be obtained by automatic analysis. *

* If a property is indexed, then its entry in the result array will * belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor. * A client of getPropertyDescriptors can use "instanceof" to check * if a given PropertyDescriptor is an IndexedPropertyDescriptor. */ @Override public PropertyDescriptor[] getPropertyDescriptors() { return getPdescriptor(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy