vipratech.beans.standardbeans
Class LanguageChoice

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Choice
              |
              +--vipratech.beans.standardbeans.LanguageChoice

public class LanguageChoice
extends java.awt.Choice
implements java.awt.event.ItemListener, InterfaceProperties

The LanguageChoice class is a graphical user interface component that allows the user to select a language for GUI components.

GUI components that have a java.beans.propertyChange(PropertyChangeEvent event) method can be wired to the LanguageChoice bean at design time. The LanguageChoice bean has a firePropertyChange method that uses the property name of "locale" to label the property change event which sends the selected locale as the new value to registered listeners. vipratech.beans.MainButton is an example of a bean that can receive property change events from this component.

Version:
1.05, March 08 2001
Author:
Warwick Bailey   warwick-bailey@bigfoot.com
See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
LanguageChoice()
          Constructor.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Allows property change listeners to be registered at design time.
 void fireLocaleEvent(java.util.Locale locale)
          Fires a property change event with the property name of "locale".
 java.util.Locale[] getDefaultLocales()
          An indexed array of locales that are supported.
 java.util.Locale getLocale()
          Returns the locale for this component.
 void itemStateChanged(java.awt.event.ItemEvent event)
          Item changes in the drop down menu of this component.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Allows property change listeners to be de-registered at design time.
 void setLocale(java.util.Locale locale)
          Sets the locale for this component.
 
Methods inherited from class java.awt.Choice
add, addItem, addItemListener, addNotify, countItems, getItem, getItemCount, getSelectedIndex, getSelectedItem, getSelectedObjects, insert, remove, remove, removeAll, removeItemListener, select, select
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LanguageChoice

public LanguageChoice()
Constructor.
Method Detail

getDefaultLocales

public java.util.Locale[] getDefaultLocales()
An indexed array of locales that are supported.

itemStateChanged

public final void itemStateChanged(java.awt.event.ItemEvent event)
Item changes in the drop down menu of this component.
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

fireLocaleEvent

public void fireLocaleEvent(java.util.Locale locale)
Fires a property change event with the property name of "locale". The property change event object is sent with the selectedLocale as the newValue object.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Allows property change listeners to be registered at design time.
Overrides:
addPropertyChangeListener in class java.awt.Component

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Allows property change listeners to be de-registered at design time.
Overrides:
removePropertyChangeListener in class java.awt.Component

setLocale

public final void setLocale(java.util.Locale locale)
Sets the locale for this component.
Overrides:
setLocale in class java.awt.Component

getLocale

public final java.util.Locale getLocale()
Returns the locale for this component.
Overrides:
getLocale in class java.awt.Component

dathe@chemie.uni-leipzig.de"

http://leipzig.vernetztes-studium.de