home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
LocaleChooserLocaleSelector.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
2KB
|
70 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.beans.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import borland.jbcl.model.*;
public abstract class LocaleChooserLocaleSelector extends PropertyEditorSupport implements GraphSelectionListener {
protected LocaleChooser localeChooser = null;
protected ResourceBundle resourceBundle = java.util.ResourceBundle.getBundle("borland.samples.intl.beans.resources.LocaleChooserRes");
public LocaleChooserLocaleSelector() {
localeChooser = new LocaleChooser();
localeChooser.setAcceptLeafNodesOnly(false);
localeChooser.setDisplayStyle(LocaleChooser.TARGET_LOCALE);
localeChooser.addSelectionListener(this);
localeChooser.setTitle(resourceBundle.getString("Select_a_locale"));
}
public abstract String getJavaInitializationString();
public abstract void setValue(Object o);
public abstract Object getValue();
public abstract String getAsText();
public void setAsText(String text) throws IllegalArgumentException {
throw new IllegalArgumentException(text);
}
public boolean supportsCustomEditor() {
return true;
}
public Component getCustomEditor() {
return localeChooser;
}
public void selectionItemChanged(GraphSelectionEvent e) {
firePropertyChange();
}
public void selectionChanged(GraphSelectionEvent e) {
firePropertyChange();
}
}