|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JToggleButton
javax.swing.JCheckBox
org.openswing.swing.client.CheckBoxControl
Title: OpenSwing Framework
Description: check-box whose text is translated according to internalization settings.
As default behavior, check-box supports two states: Boolean.TRUE (selected) and Boolean.FALSE (deselected).
Optionally (when "allowNullValue" property has been set to true
), check-box supports three states: Boolean.TRUE (selected) and Boolean.FALSE (deselected) and null (not selected and gray).
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it
Nested Class Summary |
Nested classes inherited from class javax.swing.JToggleButton |
javax.swing.JToggleButton.ToggleButtonModel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
Fields inherited from class javax.swing.JCheckBox |
BORDER_PAINTED_FLAT_CHANGED_PROPERTY |
Fields inherited from class javax.swing.AbstractButton |
BORDER_PAINTED_CHANGED_PROPERTY, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, 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 javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
CheckBoxControl()
|
Method Summary | |
void |
addValueChangedListener(ValueChangeListener listener)
Add a value changed listener to this input control. |
java.lang.String |
getAttributeName()
Link the input control to the form which contains it and with the specified the attribute. |
java.awt.Font |
getFont()
|
LabelControl |
getLinkLabel()
Link the input control to the form which contains it and with the specified the attribute. |
java.lang.String |
getToolTipText()
|
java.lang.Object |
getValue()
|
ValueChangeListener[] |
getValueChangeListeners()
|
boolean |
isAllowNullValue()
|
boolean |
isCanCopy()
|
boolean |
isChanged()
|
boolean |
isEnabledOnEdit()
|
boolean |
isEnabledOnInsert()
|
boolean |
isRequired()
|
void |
removeValueChangedListener(ValueChangeListener listener)
Remove a value changed listener from this input control. |
void |
setAllowNullValue(boolean allowNullValue)
Define if null value is alloed (i.e. distinct from Boolean.FALSE value) |
void |
setAttributeName(java.lang.String attributeName)
Link the input control to the form which contains it and with the specified the attribute. |
void |
setCanCopy(boolean canCopy)
Define if the input control value is duplicated when user has clicked on COPY button. |
void |
setChanged(boolean changed)
Define if the input control value is changed. |
void |
setEnabled(boolean enabled)
Set abilitation setting. |
void |
setEnabledOnEdit(boolean enabled)
Define if the input control is enabled on EDIT mode, false otherwise |
void |
setEnabledOnInsert(boolean enabled)
Define if the input control is enabled on INSERT mode. |
void |
setFont(java.awt.Font font)
Set the specified font. |
void |
setLinkLabel(LabelControl label)
Link the input control label to the specified label. |
void |
setSelected(boolean selected)
|
void |
setText(java.lang.String text)
Set check box label. |
void |
setToolTipText(java.lang.String toolTipText)
Set a tooltip text. |
void |
setValue(java.lang.Object value)
Set value to the input control. |
Methods inherited from class javax.swing.JCheckBox |
getAccessibleContext, getUIClassID, isBorderPaintedFlat, setBorderPaintedFlat, updateUI |
Methods inherited from class javax.swing.AbstractButton |
addActionListener, addChangeListener, addItemListener, doClick, doClick, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelectedIcon, setUI, setVerticalAlignment, setVerticalTextPosition |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.openswing.swing.client.InputControl |
addFocusListener, isEnabled, removeFocusListener |
Constructor Detail |
public CheckBoxControl()
Method Detail |
public final java.awt.Font getFont()
getFont
in interface java.awt.MenuContainer
public final void setFont(java.awt.Font font)
font
- Font to setpublic final void setToolTipText(java.lang.String toolTipText)
toolTipText
- tool tip text entry in the dictionarypublic final java.lang.String getToolTipText()
public final void addValueChangedListener(ValueChangeListener listener)
addValueChangedListener
in interface InputControl
listener
- value changed listener to addpublic final void removeValueChangedListener(ValueChangeListener listener)
removeValueChangedListener
in interface InputControl
listener
- value changed listener to removepublic final void setAttributeName(java.lang.String attributeName)
setAttributeName
in interface InputControl
attributeName
- attribute name to which link the input controlpublic final java.lang.String getAttributeName()
getAttributeName
in interface InputControl
public final boolean isRequired()
isRequired
in interface InputControl
public final void setLinkLabel(LabelControl label)
setLinkLabel
in interface InputControl
label
- label used when showing error messages related to the input controlpublic final LabelControl getLinkLabel()
getLinkLabel
in interface InputControl
public final boolean isEnabledOnInsert()
isEnabledOnInsert
in interface InputControl
true
if the input control is enabled on INSERT mode, false
otherwisepublic final void setEnabledOnInsert(boolean enabled)
setEnabledOnInsert
in interface InputControl
enabled
- true
if the input control is enabled on INSERT mode, false
otherwisepublic final boolean isEnabledOnEdit()
isEnabledOnEdit
in interface InputControl
true
if the input control is enabled on EDIT mode, false
otherwisepublic final void setEnabledOnEdit(boolean enabled)
false
otherwise
setEnabledOnEdit
in interface InputControl
enabled
- mandatory property of the input controlpublic final boolean isCanCopy()
isCanCopy
in interface InputControl
public final void setCanCopy(boolean canCopy)
setCanCopy
in interface InputControl
canCopy
- define if the input control value is duplicated when user has clicked on COPY buttonpublic final java.lang.Object getValue()
getValue
in interface InputControl
public final void setValue(java.lang.Object value)
setValue
in interface InputControl
value
- value to set into the input controlpublic final boolean isChanged()
isChanged
in interface InputControl
true
if the input control value is changed, false
otherwisepublic final void setChanged(boolean changed)
setChanged
in interface InputControl
changed
- true
if the input control value is changed, false
otherwisepublic final void setEnabled(boolean enabled)
setEnabled
in interface InputControl
enabled
- flag used to set abilitation of controlpublic final void setText(java.lang.String text)
text
- check box labelpublic final boolean isAllowNullValue()
public final void setAllowNullValue(boolean allowNullValue)
allowNullValue
- define if null value is alloed (i.e. distinct from Boolean.FALSE value)public final void setSelected(boolean selected)
public final ValueChangeListener[] getValueChangeListeners()
getValueChangeListeners
in interface InputControl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |