org.formaria.swing
Class LanguageChooserDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.formaria.swing.layer.LayerManager
                      extended by org.formaria.swing.Page
                          extended by org.formaria.swing.Dialog
                              extended by org.formaria.swing.LanguageChooserDialog
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, ContentPane, DialogSupport, ExceptionHandler, ILayerManager, PageSupport, PageSupport.IDialog, PersistentState

public class LanguageChooserDialog
extends Dialog

A dialog for choosing languages. See the Localization chapter of the Aria User Guide for more detail.

Aria uses standard property files for localization. These localization files can be set for an individual page (by setting the 'resource' attribute of the Page element or for the component factory. The project's resource manager is used to identify the current locale and the name of the property file by default.

Copyright (c) Formaria Ltd., 2008, see license.txt for licesning information

$Revision: 1.2 $

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Nested classes/interfaces inherited from interface org.formaria.aria.PageSupport
PageSupport.IDialog
 
Field Summary
 
Fields inherited from class org.formaria.swing.Dialog
bIsModal, BUTTON_SIZE, CANCEL_CLICKED, CLOSE_CLICKED, closeButtonID, contentPanel, DEFAULT_PADDING, focusComponent, lastReturnValue, NO_CLICKED, NOTHING_CLICKED_YET, OK_CLICKED, padding, returnObject, returnValue, saveOnClose, trueField
 
Fields inherited from class org.formaria.swing.Page
adapter, componentFactory, pageHelper, pageMgr, project, rootModel
 
Fields inherited from class org.formaria.swing.layer.LayerManager
BACKGROUND
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface org.formaria.aria.PageSupport
ACTIVATED, ANNOTATEDIMAGE, ARIA_AWT_PACKAGE, ARIA_HTML_PACKAGE, ARIA_SWING_PACKAGE, ARIA_SWT_PACKAGE, BORDER_LAYOUT, BOX_LAYOUT, BUTTON, CARD_LAYOUT, CHECK, COLUMN_LAYOUT, COMBO, CREATED, DEACTIVATED, DISCARDED, DISPLAYED, EDIT, FLOW_LAYOUT, GRID_LAYOUT, GRIDBAG_LAYOUT, GROUP, GUIDE_LAYOUT, HOTSPOTIMAGE, IMAGE, IMAGEMAP, LABEL, LAYER_LAYOUT, LIST, LOADED, MENU, MENUBAR, MENUITEM, METACONTENT, NULL_LAYOUT, PANEL, PASSWORD, RADIO, SCALE_LAYOUT, SCROLLABLEMETACONTENT, SCROLLPANE, SPLITPANE, SPRING_LAYOUT, TABLE, TABPANEL, TEXTAREA, UNKNOWN, UNKNOWN_PAGE_STATE, WMF
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
LanguageChooserDialog(java.lang.String langCode)
          Create a new instance of the lanuage dialog
 
Method Summary
 void cancel()
          Dismiss the dialog
 java.lang.String getSelectedLanguage()
          Get the name of the selected language
 void ok()
          Dismiss the dialog and choose the selected language
 
Methods inherited from class org.formaria.swing.Dialog
add, cancelDlg, closeDlg, getContentPane, getFocusComponent, getLastReturnValue, getMinimumSize, getPreferredSize, getReturnObject, pack, pageCreated, setBackground, setCaption, setFont, setForeground, setHideFrame, setLayout, setLocation, setLocation, setModal, setResizable, setSaveOnClose, setSize, setUseNativeHeaders, showDialog, showDialog, showDialog, showModalWindow, wasMouseClicked
 
Methods inherited from class org.formaria.swing.Page
accumulateMessages, addBinding, addHandler, addHandler, addListener, addNestedPage, addNotify, addValidation, addValidation, addValidation, checkValidations, clearMouseClick, clearValidations, enterDataBindingContext, evaluateAttribute, evaluatePath, exitDataBindingContext, findComponent, findComponent, getAttribute, getAttribute, getAttributes, getBinding, getBinding, getBindings, getComponentFactory, getComponentName, getCurrentEvent, getDataBindingContext, getDataBindingContext, getEventAttribute, getEventHandler, getExtension, getGraphics, getOwner, getPageName, getPageSize, getProject, getStatus, getValidationHandler, handleEventHandlerException, handleException, isFocusChangeSuppressed, layout, pageActivated, pageAdded, pageDeactivated, paint, paintSuper, removeBinding, restoreState, saveBoundComponentValues, saveState, setAttribute, setClearPage, setComponentFactory, setEventHandler, setExceptionHandler, setExtension, setLayout, setPageName, setStatus, setValidationFactory, showComponents, showHandCursor, showMessage, showMessage, showPage, showPage, showPrevious, stripAttributeValues, translate, update, updateBinding, updateBindings, updateBoundComponentValues, updateChildLayouts, validationHandler, wasEnterPressed, wasMouseDoubleClicked, wasMouseRightClicked
 
Methods inherited from class org.formaria.swing.layer.LayerManager
add, add, add, add, addLayer, deleteLayer, getActiveLayer, getActiveLayerIndex, getComponent, getInputContext, getLayer, getLayer, getLayerNames, isEnabled, isFocusable, isLayerEnabled, isLayerEnabled, isLayerVisible, moveLayerDown, moveLayerUp, paintChildren, setActiveLayer, setBounds, setLayerEnabled, setLayerName, setLayerVisible, updateLayerSizes
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction
 
Methods inherited from class java.awt.Container
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setName, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.formaria.aria.PageSupport
accumulateMessages, addBinding, addHandler, addHandler, addListener, addNestedPage, addValidation, addValidation, addValidation, checkValidations, clearValidations, doLayout, enterDataBindingContext, evaluateAttribute, evaluatePath, exitDataBindingContext, findComponent, findComponent, getAttribute, getAttribute, getBinding, getBinding, getBindings, getComponentFactory, getComponentName, getCurrentEvent, getDataBindingContext, getDataBindingContext, getEventAttribute, getEventHandler, getExtension, getName, getOwner, getPageSize, getProject, getStatus, getValidationHandler, handleEventHandlerException, handleException, isFocusChangeSuppressed, pageActivated, pageAdded, pageDeactivated, removeBinding, saveBoundComponentValues, setAttribute, setClearPage, setComponentFactory, setEventHandler, setExceptionHandler, setExtension, setLayout, setName, setStatus, setValidationFactory, setVisible, showComponents, showHandCursor, showMessage, showMessage, stripAttributeValues, translate, updateBinding, updateBindings, updateBoundComponentValues, validate, validationHandler, wasMouseDoubleClicked, wasMouseRightClicked
 
Methods inherited from interface org.formaria.aria.PersistentState
restoreState, saveState
 

Constructor Detail

LanguageChooserDialog

public LanguageChooserDialog(java.lang.String langCode)
Create a new instance of the lanuage dialog

Parameters:
langCode - the ISO language code
Method Detail

cancel

public void cancel()
Dismiss the dialog


ok

public void ok()
Dismiss the dialog and choose the selected language


getSelectedLanguage

public java.lang.String getSelectedLanguage()
Get the name of the selected language

Returns:
the language name/code