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

nu.zoom.swing.text.StatusBarBeanBeanInfo Maven / Gradle / Ivy

Go to download

This project contains some utility classes that have been used in various projects throughout the years.

There is a newer version: 1.3.1
Show newest version
/*
 * Copyright (C) 2004 Johan Maasing johan at zoom.nu 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.
 */
package nu.zoom.swing.text;

import java.beans.*;

/**
 * Bean information about the status bar bean.
 * 
 * @author $Author: johan $
 * @version $Revision: 1.2 $
 */
public class StatusBarBeanBeanInfo extends SimpleBeanInfo
{
	Class beanClass = StatusBarBean.class;
	String iconColor16x16Filename = "ConsoleBean16x16.gif";
	String iconColor32x32Filename = "ConsoleBean32x32.gif";
	String iconMono16x16Filename = "ConsoleBeanBW16x16.gif";
	String iconMono32x32Filename = "ConsoleBeanBW32x32.gif";

	public StatusBarBeanBeanInfo() {}

	public PropertyDescriptor[] getPropertyDescriptors()
	{
		try {
			PropertyDescriptor _message = new PropertyDescriptor("message",
					beanClass, null, "setMessage");
			_message.setDisplayName("message");
			_message.setShortDescription("message");
			PropertyDescriptor[] pds = new PropertyDescriptor[] { _message };
			return pds;
		} catch (IntrospectionException ex) {
			ex.printStackTrace();
			return null;
		}
	}

	public java.awt.Image getIcon(int iconKind)
	{
		switch (iconKind) {
		case BeanInfo.ICON_COLOR_16x16:
			return iconColor16x16Filename != null ? loadImage(iconColor16x16Filename)
					: null;
		case BeanInfo.ICON_COLOR_32x32:
			return iconColor32x32Filename != null ? loadImage(iconColor32x32Filename)
					: null;
		case BeanInfo.ICON_MONO_16x16:
			return iconMono16x16Filename != null ? loadImage(iconMono16x16Filename)
					: null;
		case BeanInfo.ICON_MONO_32x32:
			return iconMono32x32Filename != null ? loadImage(iconMono32x32Filename)
					: null;
		}
		return null;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy