org.tentackle.ui
Class YesNoRadioButton

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.tentackle.ui.FormPanel
                      extended by org.tentackle.ui.FormComponentPanel
                          extended by org.tentackle.ui.YesNoRadioButton
All Implemented Interfaces:
ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, FormComponent, FormContainer

public class YesNoRadioButton
extends FormComponentPanel

Radiobuttons to get a definitive decision from the user. The user must click yes or no or the answer is undetermined.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
YesNoRadioButton()
          Creates a YesNoRadioButton.
 
Method Summary
 Boolean getFormValue()
          Retrieves the value from this component.
The method is used to update the data if the view has changed because the user edited it.
 String getNoText()
          Gets the text for the "no" button.
 Boolean getSelected()
          Gets the decision.
 String getYesText()
          Gets the text for the "yes" button.
 boolean isUndetermined()
          Checks if user has chosen a value.
 boolean isValueChanged()
          Checks whether the contents have been changed since the last savepoint.
 void saveValue()
          Sets a savepoint for the data of this component.
Allows to decide whether the user has changed the data associated with this component or not.
 void setChangeable(boolean changeable)
          Set the component to be changeable.
This is a unified abstraction and will be translated to setEditable or setEnabled, whatever is appropriate to this component.
 void setFormValue(Object object)
          Sets a value in this component.
The method is used to update the view if the data has changed.
 void setNoText(String text)
          Sets the text for the "no" button.
 void setSelected(Boolean selected)
          Sets the value.
 void setYesText(String text)
          Sets the text for the "yes" button.
 
Methods inherited from class org.tentackle.ui.FormComponentPanel
addValueListener, fireValueChanged, fireValueEntered, getFormComponent, getHelpURL, getParentWindow, hasFocus, invalidateParentInfo, isCellEditorUsage, isChangeable, isFireRunning, isFormTraversable, isHonourChangeable, prepareFocusLost, removeValueListener, requestFocusLater, setCellEditorUsage, setFireRunning, setFormComponent, setFormTraversable, setFormWrapWindow, setHelpURL, setHonourChangeable, showHelp, triggerValueChanged, wasFocusGainedFromTransfer, wasFocusGainedFromTransferBackward, wasTransferFocus, wasTransferFocusBackward, wasTransferFocusByEnter
 
Methods inherited from class org.tentackle.ui.FormPanel
addActionListener, areValuesChanged, componentAdded, componentRemoved, fireActionPerformed, getFormValues, getTitle, isAllChangeable, isHonourAllChangeable, removeActionListener, saveValues, setAllChangeable, setFormValues, setFormValuesKeepChanged, setHonourAllChangeable, setTitle, triggerValuesChanged
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, 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, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, 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, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, 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.tentackle.ui.FormComponent
transferFocus, transferFocusBackward
 

Constructor Detail

YesNoRadioButton

public YesNoRadioButton()
Creates a YesNoRadioButton.

Method Detail

isUndetermined

public boolean isUndetermined()
Checks if user has chosen a value.

Returns:
true if neither yes nor no selected, false otherwise

getSelected

public Boolean getSelected()
Gets the decision.

Returns:
Boolean.TRUE if yes, Boolean.FALSE if no, null if no decision by user

getFormValue

public Boolean getFormValue()
Description copied from interface: FormComponent
Retrieves the value from this component.
The method is used to update the data if the view has changed because the user edited it.

Specified by:
getFormValue in interface FormComponent
Overrides:
getFormValue in class FormComponentPanel
Returns:
the object from the form
See Also:
getSelected()

setSelected

public void setSelected(Boolean selected)
Sets the value.

Parameters:
selected - is Boolean.TRUE if yes, Boolean.FALSE if no, null if no decision by user

setFormValue

public void setFormValue(Object object)
Description copied from interface: FormComponent
Sets a value in this component.
The method is used to update the view if the data has changed.

Specified by:
setFormValue in interface FormComponent
Overrides:
setFormValue in class FormComponentPanel
Parameters:
object - is the object to set
See Also:
setSelected(Boolean)

setYesText

public void setYesText(String text)
Sets the text for the "yes" button.

Parameters:
text - the text for the "yes" button

getYesText

public String getYesText()
Gets the text for the "yes" button.

Returns:
the text for the "yes" button

setNoText

public void setNoText(String text)
Sets the text for the "no" button.

Parameters:
text - the text for the "no" button

getNoText

public String getNoText()
Gets the text for the "no" button.

Returns:
the text for the "no" button

setChangeable

public void setChangeable(boolean changeable)
Description copied from interface: FormComponent
Set the component to be changeable.
This is a unified abstraction and will be translated to setEditable or setEnabled, whatever is appropriate to this component.

Specified by:
setChangeable in interface FormComponent
Overrides:
setChangeable in class FormComponentPanel
Parameters:
changeable - true the user can edit the data, false if show only

saveValue

public void saveValue()
Description copied from interface: FormComponent
Sets a savepoint for the data of this component.
Allows to decide whether the user has changed the data associated with this component or not.

Specified by:
saveValue in interface FormComponent
Overrides:
saveValue in class FormComponentPanel
See Also:
FormComponent.isValueChanged()

isValueChanged

public boolean isValueChanged()
Description copied from interface: FormComponent
Checks whether the contents have been changed since the last savepoint.

Specified by:
isValueChanged in interface FormComponent
Overrides:
isValueChanged in class FormComponentPanel
Returns:
true if changed
See Also:
FormComponent.saveValue()


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de