wt.clients.beans
Class DataFormatChoice

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Choice
          extended bywt.clients.beans.DataFormatChoice
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable

public class DataFormatChoice
extends Choice

This class allows the selection of the allowable values for the DataFormat class in a choice list.

Supported API: false Extendable: false

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Choice
Choice.AccessibleAWTChoice
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  boolean allChoiceAllowed
           
private  boolean blankChoiceAllowed
           
private  boolean displayNonSelectable
           
protected static ResourceBundle resource
           
protected static String RESOURCE
           
private static String UNSPECIFIED
           
protected  DataFormat[] valueSet
           
 
Fields inherited from class java.awt.Choice
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DataFormatChoice()
          Creates a new DataFormatChoice menu.
 
Method Summary
static WTContext getContext()
           
protected  DataFormat[] getDataFormats()
           
static ResourceBundle getLabelsRB()
           
static String getLocalizedMessage(String key, Object[] params)
           
static String getLocalizedValue(String key)
           
 DataFormat getSelectedDataFormat()
          Gets a representation of the current choice as a DataFormatChoice.
private  DataFormat[] getSortedNames(String[] nameList, DataFormat[] dataFormats)
           
protected static void initResources()
           
 boolean isAllChoiceAllowed()
          Determines if an "All" choice has been added to the list.
 boolean isBlankChoiceAllowed()
          Determines if an blank choice has been added to the list.
static void main(String[] args)
          A main method that demonstrates how to use this class and allows testing.
protected  void redrawList()
          Internal method to redraw the choice list.
 void setAllChoiceAllowed(boolean choice)
          Sets if an "All" choice should be added to the list.
 void setBlankChoiceAllowed(boolean choice)
          Sets if a blank choice should be added to the list.
 void setDataFormatModel(DataFormat[] data_formats)
           
 void setSelectedDataFormat(DataFormat data_format)
          Sets the selected item in this Choice to be the item with the specified EnumeratedType value.
 
Methods inherited from class java.awt.Choice
add, addItem, addItemListener, addNotify, countItems, getAccessibleContext, getItem, getItemCount, getItemListeners, getListeners, getSelectedIndex, getSelectedItem, getSelectedObjects, insert, paramString, processEvent, processItemEvent, remove, remove, removeAll, removeItemListener, select, select
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNSPECIFIED

private static final String UNSPECIFIED
See Also:
Constant Field Values

valueSet

protected DataFormat[] valueSet

allChoiceAllowed

private boolean allChoiceAllowed

blankChoiceAllowed

private boolean blankChoiceAllowed

displayNonSelectable

private boolean displayNonSelectable

RESOURCE

protected static String RESOURCE

resource

protected static ResourceBundle resource
Constructor Detail

DataFormatChoice

public DataFormatChoice()
Creates a new DataFormatChoice menu. The menu is populated with the DataFormats persisted in the system.

See Also:
Choice
Method Detail

setDataFormatModel

public void setDataFormatModel(DataFormat[] data_formats)

getDataFormats

protected DataFormat[] getDataFormats()
                               throws WTException
Throws:
WTException

getSortedNames

private DataFormat[] getSortedNames(String[] nameList,
                                    DataFormat[] dataFormats)

isAllChoiceAllowed

public boolean isAllChoiceAllowed()
Determines if an "All" choice has been added to the list.

Returns:
true if the all choice is allowed; false otherwise.
See Also:
setAllChoiceAllowed(boolean)

setAllChoiceAllowed

public void setAllChoiceAllowed(boolean choice)
Sets if an "All" choice should be added to the list.

See Also:
isAllChoiceAllowed()

redrawList

protected void redrawList()
Internal method to redraw the choice list. Called whenever a relevant property is set for the bean.


isBlankChoiceAllowed

public boolean isBlankChoiceAllowed()
Determines if an blank choice has been added to the list.

Returns:
true if the blank choice is allowed; false otherwise.
See Also:
setBlankChoiceAllowed(boolean)

setBlankChoiceAllowed

public void setBlankChoiceAllowed(boolean choice)
Sets if a blank choice should be added to the list.

See Also:
isBlankChoiceAllowed()

setSelectedDataFormat

public void setSelectedDataFormat(DataFormat data_format)
Sets the selected item in this Choice to be the item with the specified EnumeratedType value.

See Also:
#getSelectedEnumeratedType

getSelectedDataFormat

public DataFormat getSelectedDataFormat()
Gets a representation of the current choice as a DataFormatChoice.

See Also:
#setSelectedEnumeratedType

initResources

protected static void initResources()

getContext

public static WTContext getContext()

getLocalizedMessage

public static String getLocalizedMessage(String key,
                                         Object[] params)

getLabelsRB

public static ResourceBundle getLabelsRB()

getLocalizedValue

public static String getLocalizedValue(String key)

main

public static void main(String[] args)
A main method that demonstrates how to use this class and allows testing.