public class JUButtonBinding extends JUCtrlBoolBinding implements javax.swing.ButtonModel, java.awt.event.ActionListener, java.awt.event.ItemListener
Swing Classes like JCheckBox, JRadioButton, JButton can be bound using this class to display/update boolean values for an attribute. Applications can customize the boolean values to any two desired values that a particular attribute can accept like Y/N for checkbox states of True/False or Checked/Unchecked.
By default the binding sends a java.lang.Boolean.TRUE for checked or selected state of a button to the BC4J attribute.
DH_CONTROL_TYPE, DH_DISPLAY_HEIGHT, DH_DISPLAY_HINT, DH_DISPLAY_WIDTH, DH_FORMAT, DH_LABEL, DH_TOOLTIP, LIST_ADD_NULL_AT_END, LIST_ADD_NULL_AT_START, LIST_ADD_NULL_NOWHERE, LIST_ADD_NULL_UNINIT, LIST_OPER_MULTI_SELECT, LIST_OPER_NAVIGATE, LIST_OPER_SET_ATTRIBUTE, LIST_OPER_SET_DELIMITED_ATTRIBUTE, LISTITEM_DisplayValues, LISTITEM_Index, LISTITEM_Prompt, LISTITEM_Selected, LISTITEM_SelectedIndex, LISTITEM_SelectedIndices, LOV_SRC_ATTRNAMES, LOV_SRC_EL_EXPR, LOV_SRC_ROW, LOV_SRC_ROW_DATA, mFirstDisplayAttr, mListAttrNames, mListDisplayAttrNames, mListIterBinding, mNullValueFlag, mSingleAttrList, mStaticList, mValueList, ROWATTR_ATTRIBUTE, ATTR_ATTRIBUTE_DEF, ATTR_ATTRIBUTE_DEFS, ATTR_ATTRIBUTE_VALUE, ATTR_ATTRIBUTE_VALUES, ATTR_ATTRIBUTES, ATTR_AUTOSUBMIT, ATTR_CATEGORY, ATTR_DISPLAY_HEIGHT, ATTR_DISPLAY_HINT, ATTR_DISPLAY_WIDTH, ATTR_FIELD_ORDER, ATTR_FORMAT, ATTR_FORMATS, ATTR_HINTS, ATTR_INPUT_VALUE, ATTR_LABEL, ATTR_LABELS, ATTR_LABELSET, ATTR_MANDATORY, ATTR_PATH, ATTR_TOOLTIP, ATTR_UPDATEABLE, ATTR_VIEWABLE, DATACHANGE_EVENT_POLICY, EMPTY_STRING, GET_ALLOWS, mAttrs, mHasInputVal, mInputVal, SEP_LIST_DISPLAYATTR_CURRENTROW, ATTR_DEF, ATTR_ERROR, ATTR_ERRORS, ATTR_FULLNAME, ATTR_ITER, ATTR_NAME, DC_BINDING_ERROR, mAttributeListener, mInternalGet_KeyResolved, mPermission, mPermissionInfo, ROW_KEY_STRMAP_NULL_VALUE| Constructor and Description | 
|---|
| JUButtonBinding(javax.swing.AbstractButton control,
               JUIteratorBinding iterBinding,
               java.lang.String attrName) | 
| JUButtonBinding(javax.swing.AbstractButton control,
               JUIteratorBinding iterBinding,
               java.lang.String attrName,
               boolean boolVal,
               java.lang.String serverBindingName) | 
| JUButtonBinding(javax.swing.AbstractButton control,
               JUIteratorBinding iterBinding,
               java.lang.String attrName,
               java.lang.Object[] valueList,
               boolean boolVal) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | actionPerformed(java.awt.event.ActionEvent e)Binding subclasses can override this method to implement custom action 
 for actionPerformed event without having to add this binding as an 
 ActionListener in the Application. | 
| void | addActionListener(java.awt.event.ActionListener l) | 
| void | addChangeListener(javax.swing.event.ChangeListener l) | 
| void | addControlToPanel(java.lang.Object panel,
                 java.lang.Object layoutObject,
                 java.lang.Object layoutCons)*** For internal framework use only *** | 
| void | addItemListener(java.awt.event.ItemListener l) | 
| static javax.swing.ButtonModel | createActionBinding(JUPanelBinding formBinding,
                   java.awt.Component control,
                   java.lang.String voInstanceName,
                   java.lang.String voIterName,
                   java.lang.String voIterBindingName,
                   int action)Use this method to bind an AbstractButton to a BC4J ViewObject and assign one of the
 enumerated set of actions to this Button, so that when this button is pressed (on actionPerformed)
 the desired action(method) is invoked on the associated RowSet. | 
| static javax.swing.ButtonModel | createBooleanBinding(JUFormBinding formBinding,
                    javax.swing.AbstractButton control,
                    java.lang.String voInstanceName,
                    java.lang.String voIterName,
                    java.lang.String voIterBindingName,
                    java.lang.String attrName,
                    java.lang.Object[] valueList,
                    boolean boolVal)Use this method to bind an AbstractButton to a BC4J Attribute when the Application usage
 determines the attribute values for true and false states to be used to set the attribute values. | 
| java.lang.String | getActionCommand() | 
| static javax.swing.ButtonModel | getAttributeBinding(JUFormBinding formBinding,
                   javax.swing.AbstractButton control,
                   java.lang.String voInstanceName,
                   java.lang.String voIterName,
                   java.lang.String voIterBindingName,
                   java.lang.String attrName)Use this method to bind an AbstractButton to a BC4J Attribute when the default settings
 for true and false states are to be used to set the attribute values. | 
| java.lang.Object | getControlModel(java.lang.Object control)Gets the associated View's model object. | 
| static javax.swing.ButtonModel | getInstance(JUFormBinding formBinding,
           javax.swing.AbstractButton control,
           java.lang.String voInstanceName,
           java.lang.String voIterName,
           java.lang.String voIterBindingName,
           java.lang.String attrName)Deprecated. 
 since 9.0.2 use createAttributeBinding or createBooleanBinding methods instead. | 
| static javax.swing.ButtonModel | getInstance(JUFormBinding formBinding,
           javax.swing.AbstractButton control,
           java.lang.String voInstanceName,
           java.lang.String voIterName,
           java.lang.String voIterBindingName,
           java.lang.String attrName,
           java.lang.Object[] valueList,
           boolean boolVal)Deprecated. 
 since 9.0.2 use createAttributeBinding or createBooleanBinding methods instead. | 
| static javax.swing.ButtonModel | getInstance(JUPanelBinding formBinding,
           java.awt.Component control,
           java.lang.String voInstanceName,
           java.lang.String voIterName,
           java.lang.String voIterBindingName,
           int action)Deprecated. 
 since 9.0.2 use createActionBinding method instead. | 
| int | getMnemonic() | 
| protected javax.swing.ButtonModel | getModelImpl(javax.swing.AbstractButton control)Returns the button model that to which the binding is bound. | 
| java.lang.Object[] | getSelectedObjects() | 
| java.lang.Object | getValueAt(int attrIndex)Returns the current boolean value that the associated button represents. | 
| boolean | isArmed() | 
| protected boolean | isControlQueriable()Returns true, so that JTextComponents can participate in a query in the Find Mode of the
 containing panel. | 
| boolean | isEnabled() | 
| boolean | isPressed() | 
| boolean | isRollover() | 
| boolean | isSelected() | 
| void | itemStateChanged(java.awt.event.ItemEvent e)Updates the BC4J attribute based on the current setting of the 
 button. | 
| void | removeActionListener(java.awt.event.ActionListener l) | 
| void | removeChangeListener(javax.swing.event.ChangeListener l) | 
| void | removeItemListener(java.awt.event.ItemListener l) | 
| void | setActionCommand(java.lang.String s) | 
| void | setArmed(boolean b) | 
| void | setDataValueAt(java.lang.Object value,
              int attrIndex)This method is overridden to be a no-op for Button Binding. | 
| void | setEnabled(boolean b) | 
| void | setGroup(javax.swing.ButtonGroup group) | 
| void | setMnemonic(int key) | 
| void | setPressed(boolean b) | 
| void | setRollover(boolean b) | 
| void | setSelected(boolean b) | 
| void | setValueAt(java.lang.Object value,
          int attrIndex)Matches the given value with one of the values given in the constructor
 or to Boolean.TRUE or Boolean.FALSE and then sets the associated button to
 matching boolean state. | 
findValue, getInputValueInRow, getInputValueOnError, getValueFromBoolean, processNewInputValue, setInputValueInRowaddBindingChangeListener, addNullAndSetValueList, addRowToMRU, addSelectionToMRU, bindRowSetIterator, clearMRU, clearSelectedIndices, convertValueList, createListIterBinding, createRowSetIterator, filterList, findAndUpdateSelectedIndex, findListIndex, findListIndex, findMatchingListValue, findOrCreateLOVDialogIteratorBinding, findShuttleAvailableRows, findShuttleSelectedRows, getAttributeDefs, getComboDisplayAttributeCount, getDelimiter, getDerivedAttrNames, getDisplayAttributeDefs, getDisplayCriteriaName, getDisplayData, getDisplayHints, getDisplayListIterator, getDisplayWidth, getFilteredRowSetIterator, getFilteredRowSetIteratorWithCaseCheck, getFirstDisplayAttrDef, getIterBindingDefOptions, getListAttrNames, getListBindingName, getListDisplayAttrNames, getListIterBinding, getListOperMode, getListRowSetIterator, getLovRowAttributeValue, getLovSourceOption, getMatchingRows, getMatchingRowsWithBaseRow, getMRUSize, getMRUString, getNullValueFlag, getNullValueIndex, getPreferredListIterBinding, getPreferredListMode, getPreferredListRowSetIterator, getSelectedIndex, getSelectedIndexValue, getSelectedIndices, getSelectedValue, getSelectedValues, getSelectionAttributeName, getSelectionIndices, getServerBindingName, getTargetRowData, getValueFromList, getValueList, handleFilteredList, hasMRU, hasNullValue, initFromServerBinding, initResources, internalGet, internalGetDisplayWidth, internalPut, isAutoSubmit, isMandatory, isSingleAttrList, isUpdateable, isViewInitialized, iteratorClosed, iteratorReset, matchTargetWithLov, moveDown, moveToBottom, moveToTop, moveUp, navigated, put, rangeRefreshed, rangeScrolled, refreshFromServerListBinding, release, releaseLOVDialogIteratorBinding, removeBindingChangeListener, resetAttributeDefs, resetShuttle, rowDeleted, rowInserted, rowUpdated, setAllowBlindMatchInFilter, setAttributeFromValueList, setDef, setFetchDataOnSetup, setListIterBinding, setListOperMode, setListValueAsSelected, setNullValueProperties, setPreferredListMode, setSelectedIndex, setSelectedIndexValue, setSelectedIndices, setSelectionIndices, setServerBindingName, setStaticList, setTargetAttrsFromLovRow, setTargetAttrsFromLovRowAndUpdateMRU, setupListItems, setValueList, shuttle, toString, updateNavigated, updateTargetFromSelectedValue, updateValuesFromRow, usesServerBindingcreateAttributeBinding, refreshControl, setControlEnabled, updateValuesFromRowsaddBindingContainerChangeListenerForCtxEvent, addDataChangeListener, clearAttrDefs, clearEventsCache, compareAndSetAttribute, createAndNotifyDCE, createEventProducer, displayInShortForm, ensureVariableManager, eventForMyRow, fetchAttrDefs, findAttributeDef, generateDCE, getAttribute, getAttribute, getAttribute, getAttributeCount, getAttributeDef, getAttributeDef, getAttributeDefsForRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeIndexOf, getAttributeNames, getAttributes, getAttributes, getAttributeUIHelper, getAttributeValidators, getAttributeValidators, getAttributeValue, getAttributeValue, getAttributeValueFromRow, getAttributeValues, getAttributeValues, getAttrViewExpressions, getBindingHint, getCachedEvents, getCategory, getChangeEventPolicy, getColumnNameForQuery, getControlType, getDataChangeEventPolicy, getDataChangeListener, getDisplayHeight, getDisplayHint, getError, getErrors, getEventProducer, getFieldOrder, getFormat, getFormats, getFormattedAttributeValue, getHint, getHint, getHints, getInputErrorsForRowKey, getInputValue, getInputValue, getInputValueHandler, getIteratorBindingForDCE, getIteratorRenderHint, getLabel, getLabel, getLabels, getLabelSet, getLastEventId, getLocaleContext, getMasterKeyPathForDCE, getMergedAttributeValues, getNullValueString, getPath, getPermissionDef, getPermissionHolder, getPermissionInfo, getSelectionDef, getState, getTooltip, getTooltip, hasEventProducer, hasFormatInformation, hasServerBindingChanged, hasVariables, internalGetDataControlReference, internalGetRow, internalHasPermission, internalHasPermission, isArrayIteratorType, isAttributeMandatory, isAttributeUpdateable, isAttributeUpdateable, isAttributeUpdateable, isAttributeUpdateable, isEventsCachingEnabled, isNewInputValue, isNullInsertKeyPathForDCE, isPushDataChangeEvents, isPushOrPollDataChangeEvents, isViewable, lookupAttributeDef, notifyDataChangeEvent, notifyDataExceptionEvent, notifyDCE, pinDataControl, processInputException, removeAttrName, removeDataChangeListener, removeFromDCExceptions, resetInputState, resolvePath, restoreFromState, setArrayIteratorType, setAttribute, setAttribute, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeNames, setAttributes, setAttributeValue, setAttributeValuesInRow, setAttrViewExpressions, setError, setEventProducer, setEventsCaching, setInputValue, setInputValue, setInputValueHandler, setIteratorBinding, setListener, setNullValueString, startEvents, stopEditing, stopEvents, updateRangeScrolled, updateRow, updateRowDeleted, updateRowInserted, useRowSpecificHints, validateInputValuegetCurrentRow, getFormBinding, getIteratorBinding, reportException, setFormBindingaddToDCExceptions, evaluateBooleanExpression, executeQuery, executeQueryIfNeeded, get, getAllRowsInRange, getApplicationModule, getAttributeListener, getBindingContainer, getControl, getDCIteratorBinding, getDef, getDefFullName, getDefName, getFullName, getLayoutObject, getName, getPermission, getPermissionTargetName, getRowAtRangeIndex, getRowIterator, getTransaction, getViewableExpr, getViewObject, hasAttributeListener, hashCode, internalGetDataControl, internalSetName, isAssociatedWithDataControl, isControlViewable, isReleased, needsEstimatedRowCount, release, reportException, resetAttributeExceptionInRow, setBindingContainer, setControl, setDataControlPinned, setListener, setName, setViewableExprentrySet, equals, setThrowIfPropertyNotFoundOnGetclear, clone, containsKey, containsValue, isEmpty, keySet, putAll, remove, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitgetErrors, getInputValue, getLabel, setInputValue, validateInputValuesetListenergetName, getPath, release, resolvePath, setListenergetDefFullName, getDefName, getFullName, getNamepublic JUButtonBinding(javax.swing.AbstractButton control,
               JUIteratorBinding iterBinding,
               java.lang.String attrName)
public JUButtonBinding(javax.swing.AbstractButton control,
               JUIteratorBinding iterBinding,
               java.lang.String attrName,
               java.lang.Object[] valueList,
               boolean boolVal)
public JUButtonBinding(javax.swing.AbstractButton control,
               JUIteratorBinding iterBinding,
               java.lang.String attrName,
               boolean boolVal,
               java.lang.String serverBindingName)
public java.lang.Object getControlModel(java.lang.Object control)
getControlModel in class DCControlBindingpublic static javax.swing.ButtonModel getAttributeBinding(JUFormBinding formBinding, javax.swing.AbstractButton control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName)
formBinding - The containing JUPanelBinding in which the given iterator binding
 would be found/created.control - The control instance to bind to a ViewObject's attribute.voInstanceName - Name of the instance of the ViewObject in a BC4J ApplicationModule.voIterName - Runtime instance name of the iterator in the ViewObject (optional).voIterBindingName - Instance name of the iterator binding that uniquely identifies an
 iterator binding object used to read/write data in this given JUPanelBinding instance.attrName - The name of the attribute of this ViewObject rows that contains data
 to display/edit in the associated button.public static javax.swing.ButtonModel getInstance(JUFormBinding formBinding, javax.swing.AbstractButton control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName)
public static javax.swing.ButtonModel createBooleanBinding(JUFormBinding formBinding, javax.swing.AbstractButton control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName, java.lang.Object[] valueList, boolean boolVal)
formBinding - The containing JUPanelBinding in which the given iterator binding
 would be found/created.control - The control instance to bind to a ViewObject's attribute.voInstanceName - Name of the instance of the ViewObject in a BC4J ApplicationModule.voIterName - Runtime instance name of the iterator in the ViewObject (optional).voIterBindingName - Instance name of the iterator binding that uniquely identifies an
 iterator binding object used to read/write data in this given JUPanelBinding instance.attrName - The name of the attribute of this ViewObject rows that contains data
 to display/edit in the associated button.valueList - A list of two values that are used by this binding to set into
 the BC4J attribute when this button updates an attribute.boolVal - When true, the first value in the above list valueList means 'true'.public static javax.swing.ButtonModel getInstance(JUFormBinding formBinding, javax.swing.AbstractButton control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName, java.lang.Object[] valueList, boolean boolVal)
public static javax.swing.ButtonModel createActionBinding(JUPanelBinding formBinding, java.awt.Component control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, int action)
formBinding - The containing JUPanelBinding in which the given iterator binding
 would be found/created.control - The control instance to bind to a ViewObject's attribute.voInstanceName - Name of the instance of the ViewObject in a BC4J ApplicationModule.voIterName - Runtime instance name of the iterator in the ViewObject (optional).voIterBindingName - Instance name of the iterator binding that uniquely identifies an
 iterator binding object used to read/write data in this given JUPanelBinding instance.action - An enumerated action-id which determines which method to invoke
 on the associated RowSet when this button is pressed.public static javax.swing.ButtonModel getInstance(JUPanelBinding formBinding, java.awt.Component control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, int action)
protected javax.swing.ButtonModel getModelImpl(javax.swing.AbstractButton control)
public void addControlToPanel(java.lang.Object panel,
                     java.lang.Object layoutObject,
                     java.lang.Object layoutCons)
addControlToPanel in class JUCtrlListBindingprotected boolean isControlQueriable()
An application could create a subclass of this binding object and return false from this method to prevent the associated control from participating in find mode. Additionally, a BC4J attribute itself can control whether that attribute can participate in Query or not. That property takes precedence over this method's return, if this method returns true. In other words, if this binding is bound to a CLOB attribute type and the attribute definition for that attribute indicates that it is not queriable, then the default behavior of JUPanelBinding in Find mode will be to disable this binding's control, even though this method returns true.
isControlQueriable in class JUCtrlListBindingpublic java.lang.Object getValueAt(int attrIndex)
getValueAt in class JUCtrlListBindingattrIndex - This argument is ignored for this binding.public void setValueAt(java.lang.Object value,
              int attrIndex)
setValueAt in class JUCtrlListBindingvalue - Should either be Boolean.TRUE or Boolean.FALSE or
 one of the two values provided in the constructor or create binding
 method. If the values do not match, then this method sets the button
 state to false.attrIndex - This argument is ignored for this binding.public void setDataValueAt(java.lang.Object value,
                  int attrIndex)
setDataValueAt in class JUCtrlListBindingpublic boolean isArmed()
isArmed in interface javax.swing.ButtonModelpublic boolean isSelected()
isSelected in interface javax.swing.ButtonModelpublic boolean isEnabled()
isEnabled in interface javax.swing.ButtonModelpublic boolean isPressed()
isPressed in interface javax.swing.ButtonModelpublic boolean isRollover()
isRollover in interface javax.swing.ButtonModelpublic void setArmed(boolean b)
setArmed in interface javax.swing.ButtonModelpublic void setSelected(boolean b)
setSelected in interface javax.swing.ButtonModelpublic void setEnabled(boolean b)
setEnabled in interface javax.swing.ButtonModelpublic void setPressed(boolean b)
setPressed in interface javax.swing.ButtonModelpublic void setRollover(boolean b)
setRollover in interface javax.swing.ButtonModelpublic void setMnemonic(int key)
setMnemonic in interface javax.swing.ButtonModelpublic int getMnemonic()
getMnemonic in interface javax.swing.ButtonModelpublic void setActionCommand(java.lang.String s)
setActionCommand in interface javax.swing.ButtonModelpublic java.lang.String getActionCommand()
getActionCommand in interface javax.swing.ButtonModelpublic void setGroup(javax.swing.ButtonGroup group)
setGroup in interface javax.swing.ButtonModelpublic void addActionListener(java.awt.event.ActionListener l)
addActionListener in interface javax.swing.ButtonModelpublic void removeActionListener(java.awt.event.ActionListener l)
removeActionListener in interface javax.swing.ButtonModelpublic void addItemListener(java.awt.event.ItemListener l)
addItemListener in interface java.awt.ItemSelectableaddItemListener in interface javax.swing.ButtonModelpublic void removeItemListener(java.awt.event.ItemListener l)
removeItemListener in interface java.awt.ItemSelectableremoveItemListener in interface javax.swing.ButtonModelpublic void addChangeListener(javax.swing.event.ChangeListener l)
addChangeListener in interface javax.swing.ButtonModelpublic void removeChangeListener(javax.swing.event.ChangeListener l)
removeChangeListener in interface javax.swing.ButtonModelpublic java.lang.Object[] getSelectedObjects()
getSelectedObjects in interface java.awt.ItemSelectablepublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListener