home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
WrappingTextViewerBeanInfo.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
3KB
|
83 lines
/*
* Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
*
* This SOURCE CODE FILE, which has been provided by Borland as part
* of a Borland product for use ONLY by licensed users of the product,
* includes CONFIDENTIAL and PROPRIETARY information of Borland.
*
* USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS
* OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
* THE PRODUCT.
*
* IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
* COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
* OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
* OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
* OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
* OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
* CODE FILE.
*/
package borland.samples.intl.beans;
import java.awt.*;
import java.beans.*;
import java.util.*;
public class WrappingTextViewerBeanInfo extends SimpleBeanInfo {
ResourceBundle resourceBundle = java.util.ResourceBundle.getBundle("borland.samples.intl.beans.resources.WrappingTextViewerRes");
public PropertyDescriptor[] getPropertyDescriptors() {
try {
PropertyDescriptor text = new PropertyDescriptor("text",
WrappingTextViewer.class);
text.setPropertyEditorClass(borland.jbcl.editors.MultilineTextEditor.class);
text.setShortDescription(resourceBundle.getString("text"));
PropertyDescriptor columnName = new PropertyDescriptor("columnName",
WrappingTextViewer.class);
columnName.setShortDescription(resourceBundle.getString("columnName"));
PropertyDescriptor dataSet = new PropertyDescriptor("dataSet",
WrappingTextViewer.class);
dataSet.setShortDescription(resourceBundle.getString("dataSet"));
PropertyDescriptor locale = new PropertyDescriptor("locale",
InternationalClock.class);
PropertyDescriptor background = new PropertyDescriptor("background",
InternationalClock.class);
PropertyDescriptor foreground = new PropertyDescriptor("foreground",
InternationalClock.class);
PropertyDescriptor font = new PropertyDescriptor("font",
InternationalClock.class);
PropertyDescriptor propertyDescriptor[] = { text, columnName, dataSet, locale,
background, foreground, font };
return propertyDescriptor;
} catch (Exception ex) {
System.err.println("unexpected exeption: " + ex);
return null;
}
}
public EventSetDescriptor[] getEventSetDescriptors() {
EventSetDescriptor[] eventDescriptor = new EventSetDescriptor[0];
return eventDescriptor;
}
public BeanDescriptor getBeanDescriptor() {
return new BeanDescriptor(WrappingTextViewer.class);
}
public Image getIcon(int iconKind) {
if (iconKind == BeanInfo.ICON_COLOR_32x32) {
return loadImage("resources/WrappingTextViewerIconColor32.gif");
}
return null;
}
}