Oracle Data-aware Controls Reference

oracle.dacf.control.swing.find
Class ViewCriteriaFindPanelUI

java.lang.Object
  extended byoracle.dacf.control.swing.find.ViewCriteriaFindPanelUI
All Implemented Interfaces:
java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.util.EventListener, FindPanelUI

public class ViewCriteriaFindPanelUI
extends java.lang.Object
implements FindPanelUI, java.awt.event.ActionListener, javax.swing.event.ChangeListener

The ViewCriteriaFindPanelUI implements the UI for the FindPanel. It lets the end user create multiple criteria's.

Version:
INTERNAL
See Also:
FindPanel, FindPanelUI, DacFindPanelUI

Field Summary
protected  javax.swing.JPanel _bottomPanel
          bottom panel contains the statusbar label and the button panels
protected  java.util.Vector _buttonListeners
          button click listeners
protected  javax.swing.JPanel _buttonPanel
          All our buttons go here.
protected  javax.swing.JButton[] _buttons
           
protected  boolean[] _buttonState
           
protected  javax.swing.JButton _buttonWidthCalculateHelper
           
protected  javax.swing.JButton _closeButton
          Close button on the button panel
protected  java.util.Hashtable _commands
          command to implement each property
protected  javax.swing.JPanel _contentPanel
          outer panel which in turn houses _icon and _data panels.
protected  javax.swing.JPanel _dataPanel
          labels and text fields displayed in this panel
protected  java.lang.String _defaultLabelFontName
          font for label
protected  java.lang.String _defaultTextFontName
          font for text field
protected  oracle.dacf.control.swing.find.EditItemInvoker[] _editInvokers
           
protected  FindItemEditor[] _editors
           
protected  boolean _enabled
          FindPanel enabled/disabled
protected  javax.swing.JButton _findButton
          find button on the button panel
protected  javax.swing.Icon _findIcon
          find icon
protected  javax.swing.JButton _helpButton
          help button on the button panel
protected  javax.swing.JPanel _iconPanel
          display icon here
protected  int _itemDirection
          direction in which the text fields are laid out
protected  java.awt.Color _labelBackColor
          background color for the label
protected  java.awt.Font _labelFont
          font for label
protected  java.awt.Color _labelForeColor
          foreground color for the label
protected  javax.swing.JLabel _labelIcon
          display find icon using this label
protected  int _labelPosition
          property values
protected  javax.swing.JLabel _labelStatusBar
          status bar control
protected  int _lastViewCriteriaNum
          last view criteria num
protected  ViewCriteriaModifier _modifier
           
protected  javax.swing.JButton _orButton
          OR button on the button panel
protected  javax.swing.JPanel _panel
          top level container
protected  FindPanel _parent
          A handle to the parent so that we can delegate some of the functionality like Find.
protected  java.awt.Dimension _preferredButtonSize
          button size
protected  java.util.Hashtable _properties
          List of properties DacFindPanelUI implements
protected  javax.swing.JButton _removeAllButton
          Remove button on the button panel
protected  javax.swing.JButton _removeButton
          Remove button on the button panel
protected  javax.swing.JButton _resetButton
          reset button on the button panel
protected  javax.swing.JTabbedPane _tabbedPane
           
protected  java.awt.Color _textBackColor
          background color for the textfield
protected  int _textColumnWidth
          default column width for the text field
protected  java.awt.Font _textFont
          font for text field
protected  java.awt.Color _textForeColor
          foreground color for the textfield
protected  java.lang.String _tooltipText
          tooltip text
 
Fields inherited from interface oracle.dacf.control.swing.find.FindPanelUI
ENABLED, FIND_ICON, INNER_PANEL, INNER_PANEL_LYT_MGR, ITEM_DIRECTION, ITEM_EDITORS, LABEL_BACK_CLR, LABEL_FONT, LABEL_FORE_CLR, LABEL_POSITION, PARENT_CONTAINER, SHOW_CLOSE_BUTTON, SHOW_FIND_BUTTON, SHOW_FIND_ICON, SHOW_HELP_BUTTON, SHOW_OR_BUTTON, SHOW_REMOVE_ALL_BUTTON, SHOW_REMOVE_BUTTON, SHOW_RESET_BUTTON, SHOW_STATUS_BAR, TEXT_BACK_CLR, TEXT_COLUMN_WIDTH, TEXT_FONT, TEXT_FORE_CLR
 
Constructor Summary
ViewCriteriaFindPanelUI()
          Constructor
 
Method Summary
protected  DataPanel _addViewCriteriaRowPanel(int asRow)
           
protected  void _applyProperties()
          Helper method which set the properties
protected  void _changeFocusToFindButton()
           
protected  javax.swing.JPanel _createBottomPanel()
           
protected  javax.swing.JPanel _createButtonPanel()
          Creates the button panel.
protected  javax.swing.JPanel _createContentPanel()
          create a panel which contains the icon panel and the data panel
protected  void _deleteAllViewCriteriaRow()
           
protected  void _deleteViewCriteriaRow()
           
protected  void _destroyEditInvokers()
           
protected  java.awt.Dimension _determineMinButtonSize(javax.swing.JButton b, java.awt.Dimension desiredSize)
          make sure the entire button text can be displayed instead of ....
protected  void _displayMessageDialog(java.lang.String message, int style)
          Helper method to display a message
protected  void _doButtonClose()
          Close button clicked
protected  void _doButtonFind()
          Find button clicked
protected  void _doButtonHelp()
          Help button clicked
protected  void _doButtonOr()
           
protected  void _doButtonRemove()
           
protected  void _doButtonRemoveAll()
           
protected  void _doButtonReset()
          Reset button clicked
protected  void _enableControls(boolean flag)
           
protected  void _ensureMinimalRequiredRows()
           
protected  int _getButtonPosition(int order)
           
protected  java.lang.String _getColumnDisplayLabel(int column)
          get colum display label for specified column
protected  java.lang.String _getColumnValue(int column)
          get column value for specified column
protected  int _getRefreshedRowIndex(DataPanel dataPanel)
          Query criteria changes your row index if there were any deletion/addition
protected  int _getSQLType(int i)
           
protected  java.lang.String _getTooltipText(int column)
          Get tool tip text for a column
protected  java.lang.Object _getUserData(int colIndex)
           
protected  int _getViewCriteriaRowCount()
           
protected  void _initEditInvokers(FindItemEditor[] editors)
           
protected  boolean _isDataPublished()
           
protected  boolean _isDisableAutomaticWildCardInSearch()
           
protected  javax.swing.Icon _loadDefaultIcon()
          Initialize the Find Icon
protected  java.lang.String _modifyQueryCriteriaValue(int sqlType, java.lang.Object value, boolean useSpecialChars, java.lang.Object param)
           
protected  void _newViewCriteriaRow()
           
 void _notifyButtonClick(int whichButton)
          notification that the button click happened.
protected  void _notifyPropertyChange(int whichProperty, java.lang.Object newValue)
           
protected  void _rebuildUI()
          rebuild the UI
protected  void _refreshDataPanel(DataPanel d, boolean queryNewValues)
           
protected  void _removeAllViewCriteriaRowPanel()
           
protected  void _removeViewCriteriaRowPanel(int curRow)
           
protected  void _setColumnValue(int column, java.lang.Object val)
          set column value for specified column
protected  void _setCustomEditors(java.lang.Object value)
           
protected  void _setEditorsOnDataPanel()
           
protected  void _setFindIcon(java.lang.Object value)
          set the icon for the Find panel
protected  void _setShowCloseButton(java.lang.Object value)
          should the Close button be displayed in the FindPanel
protected  void _setShowFindButton(java.lang.Object value)
          should the Find button be displayed in the FindPanel
protected  void _setShowFindIcon(java.lang.Object value)
          should the find icon be displayed ?
protected  void _setShowHelpButton(java.lang.Object value)
          should the Help button be displayed in the FindPanel
protected  void _setShowORButton(java.lang.Object value)
          should the OR button be displayed in the FindPanel
protected  void _setShowRemoveAllButton(java.lang.Object value)
          should the Remove All button be displayed in the FindPanel
protected  void _setShowRemoveButton(java.lang.Object value)
          should the REMOVE button be displayed in the FindPanel
protected  void _setShowResetButton(java.lang.Object value)
          should the Reset button be displayed in the FindPanel
protected  void _setShowStatusBar(java.lang.Object value)
          should the Status bar displayed in the FindPanel
protected  void _setUserData(int colIndex, java.lang.Object value)
           
protected  void _showButtonHelper(int order, java.lang.Object val)
          A helper method to show/hide button
protected  void _updateButtonState()
           
 void actionPerformed(java.awt.event.ActionEvent e)
          Button click occured
 void addButtonClickListener(DacFindPanelUIListener listener)
          Adds a button click listener to this control.
 java.awt.Component buildPanel()
          return a Panel reflectiong the panel to be displayed.
protected  java.awt.Component createPanel()
           
protected  int getColumnCount()
           
protected  DataPanel getCurrentDataPanel()
           
protected  int getCurrentViewCriteriaRow()
           
protected  FindItemEditor getFindItemEditor(int col)
           
protected  FindItemModel getFindItemModel(int row, int col)
           
 java.lang.Object getProperty(int property)
          get property value
protected  boolean isCaseSensitiveSearch()
           
 void itemChanged()
          A notification from the parent that one or more data item names changed.
 void itemValueChanged(int column)
          A notification from the paraent that the column value changed.
 void removeButtonClickListener(DacFindPanelUIListener listener)
          Removes a button listener
protected  void setCurrentViewCriteriaRow(int row)
           
 void setParent(FindPanel parent)
          set the parent which will use the customized UI panel.
 void setProperty(int property, java.lang.Object value)
          specify a property value to customize the UI
 void stateChanged(javax.swing.event.ChangeEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_parent

protected FindPanel _parent
A handle to the parent so that we can delegate some of the functionality like Find.


_panel

protected javax.swing.JPanel _panel
top level container


_iconPanel

protected javax.swing.JPanel _iconPanel
display icon here


_dataPanel

protected javax.swing.JPanel _dataPanel
labels and text fields displayed in this panel


_contentPanel

protected javax.swing.JPanel _contentPanel
outer panel which in turn houses _icon and _data panels.


_buttonPanel

protected javax.swing.JPanel _buttonPanel
All our buttons go here.


_bottomPanel

protected javax.swing.JPanel _bottomPanel
bottom panel contains the statusbar label and the button panels


_findButton

protected javax.swing.JButton _findButton
find button on the button panel


_resetButton

protected javax.swing.JButton _resetButton
reset button on the button panel


_closeButton

protected javax.swing.JButton _closeButton
Close button on the button panel


_helpButton

protected javax.swing.JButton _helpButton
help button on the button panel


_orButton

protected javax.swing.JButton _orButton
OR button on the button panel


_removeButton

protected javax.swing.JButton _removeButton
Remove button on the button panel


_removeAllButton

protected javax.swing.JButton _removeAllButton
Remove button on the button panel


_labelStatusBar

protected javax.swing.JLabel _labelStatusBar
status bar control


_properties

protected java.util.Hashtable _properties
List of properties DacFindPanelUI implements


_commands

protected java.util.Hashtable _commands
command to implement each property


_buttonListeners

protected java.util.Vector _buttonListeners
button click listeners


_defaultLabelFontName

protected java.lang.String _defaultLabelFontName
font for label


_defaultTextFontName

protected java.lang.String _defaultTextFontName
font for text field


_preferredButtonSize

protected java.awt.Dimension _preferredButtonSize
button size


_labelIcon

protected javax.swing.JLabel _labelIcon
display find icon using this label


_tooltipText

protected java.lang.String _tooltipText
tooltip text


_labelPosition

protected int _labelPosition
property values


_itemDirection

protected int _itemDirection
direction in which the text fields are laid out


_findIcon

protected javax.swing.Icon _findIcon
find icon


_enabled

protected boolean _enabled
FindPanel enabled/disabled


_buttons

protected javax.swing.JButton[] _buttons

_buttonState

protected boolean[] _buttonState

_tabbedPane

protected javax.swing.JTabbedPane _tabbedPane

_labelFont

protected java.awt.Font _labelFont
font for label


_textFont

protected java.awt.Font _textFont
font for text field


_labelForeColor

protected java.awt.Color _labelForeColor
foreground color for the label


_labelBackColor

protected java.awt.Color _labelBackColor
background color for the label


_textForeColor

protected java.awt.Color _textForeColor
foreground color for the textfield


_textBackColor

protected java.awt.Color _textBackColor
background color for the textfield


_textColumnWidth

protected int _textColumnWidth
default column width for the text field


_lastViewCriteriaNum

protected int _lastViewCriteriaNum
last view criteria num


_modifier

protected ViewCriteriaModifier _modifier

_buttonWidthCalculateHelper

protected javax.swing.JButton _buttonWidthCalculateHelper

_editInvokers

protected oracle.dacf.control.swing.find.EditItemInvoker[] _editInvokers

_editors

protected FindItemEditor[] _editors
Constructor Detail

ViewCriteriaFindPanelUI

public ViewCriteriaFindPanelUI()
Constructor

Method Detail

setParent

public void setParent(FindPanel parent)
set the parent which will use the customized UI panel. Implementors of this interface will make use of the 'parent' argument to retrive values to display and to execute query

Specified by:
setParent in interface FindPanelUI
Parameters:
parent -

itemChanged

public void itemChanged()
A notification from the parent that one or more data item names changed. Implementation should rebuild the UI

Specified by:
itemChanged in interface FindPanelUI

itemValueChanged

public void itemValueChanged(int column)
A notification from the paraent that the column value changed. Implementation should refresh the values for this column like the column display label

Specified by:
itemValueChanged in interface FindPanelUI
Parameters:
column - whose value (some attribute) has changed

buildPanel

public java.awt.Component buildPanel()
return a Panel reflectiong the panel to be displayed.

Specified by:
buildPanel in interface FindPanelUI
Returns:
Component built

createPanel

protected java.awt.Component createPanel()

setProperty

public void setProperty(int property,
                        java.lang.Object value)
specify a property value to customize the UI

Specified by:
setProperty in interface FindPanelUI
Parameters:
property - id for the property we are trying to set
value - for the property

getProperty

public java.lang.Object getProperty(int property)
get property value

Specified by:
getProperty in interface FindPanelUI
Parameters:
property - id for the property we are interested in
Returns:
property value

addButtonClickListener

public final void addButtonClickListener(DacFindPanelUIListener listener)
Adds a button click listener to this control.

The listener will be notified when one of the button is clicked by the user

Parameters:
listener - The listener to add.
See Also:
Control#addNavigatedListener

removeButtonClickListener

public final void removeButtonClickListener(DacFindPanelUIListener listener)
Removes a button listener

Parameters:
listener - The listener to remove.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Button click occured

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - ActionEvent object with event details

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

_getColumnValue

protected java.lang.String _getColumnValue(int column)
get column value for specified column


_setColumnValue

protected void _setColumnValue(int column,
                               java.lang.Object val)
set column value for specified column


_getColumnDisplayLabel

protected java.lang.String _getColumnDisplayLabel(int column)
get colum display label for specified column

Parameters:
column - index
Returns:
column display label

_getViewCriteriaRowCount

protected int _getViewCriteriaRowCount()

_newViewCriteriaRow

protected void _newViewCriteriaRow()

_deleteViewCriteriaRow

protected void _deleteViewCriteriaRow()

_deleteAllViewCriteriaRow

protected void _deleteAllViewCriteriaRow()

setCurrentViewCriteriaRow

protected void setCurrentViewCriteriaRow(int row)

getCurrentViewCriteriaRow

protected int getCurrentViewCriteriaRow()

getColumnCount

protected int getColumnCount()

_getSQLType

protected int _getSQLType(int i)

isCaseSensitiveSearch

protected boolean isCaseSensitiveSearch()

_rebuildUI

protected void _rebuildUI()
rebuild the UI


_addViewCriteriaRowPanel

protected DataPanel _addViewCriteriaRowPanel(int asRow)

_refreshDataPanel

protected void _refreshDataPanel(DataPanel d,
                                 boolean queryNewValues)

_removeViewCriteriaRowPanel

protected void _removeViewCriteriaRowPanel(int curRow)

_removeAllViewCriteriaRowPanel

protected void _removeAllViewCriteriaRowPanel()

_ensureMinimalRequiredRows

protected void _ensureMinimalRequiredRows()

_changeFocusToFindButton

protected void _changeFocusToFindButton()

_createButtonPanel

protected javax.swing.JPanel _createButtonPanel()
Creates the button panel. The button panel contains Find, Help and Reset buttons


_createContentPanel

protected javax.swing.JPanel _createContentPanel()
create a panel which contains the icon panel and the data panel


_createBottomPanel

protected javax.swing.JPanel _createBottomPanel()

_doButtonFind

protected void _doButtonFind()
Find button clicked


_doButtonReset

protected void _doButtonReset()
Reset button clicked


_doButtonClose

protected void _doButtonClose()
Close button clicked


_doButtonHelp

protected void _doButtonHelp()
Help button clicked


_doButtonOr

protected void _doButtonOr()

_doButtonRemove

protected void _doButtonRemove()

_doButtonRemoveAll

protected void _doButtonRemoveAll()

_updateButtonState

protected void _updateButtonState()

_displayMessageDialog

protected void _displayMessageDialog(java.lang.String message,
                                     int style)
Helper method to display a message

Parameters:
message - to be displayed
style - for the dialog

_loadDefaultIcon

protected javax.swing.Icon _loadDefaultIcon()
Initialize the Find Icon

Returns:
Icon for the find dialog

_applyProperties

protected void _applyProperties()
Helper method which set the properties


_getTooltipText

protected java.lang.String _getTooltipText(int column)
Get tool tip text for a column

Parameters:
column - index for which the tooltip should be obtained
Returns:
the tooltip text for the column

_setFindIcon

protected void _setFindIcon(java.lang.Object value)
set the icon for the Find panel

Parameters:
value - icon for the find panel

_setShowFindIcon

protected void _setShowFindIcon(java.lang.Object value)
should the find icon be displayed ?

Parameters:
value - boolean value to indicate if the Find icon should be displayed

_setShowFindButton

protected void _setShowFindButton(java.lang.Object value)
should the Find button be displayed in the FindPanel

Parameters:
value - a boolean value to indicate if the Find button should be displayed

_setShowCloseButton

protected void _setShowCloseButton(java.lang.Object value)
should the Close button be displayed in the FindPanel

Parameters:
value - a boolean value to indicate if the Close button should be displayed

_setShowResetButton

protected void _setShowResetButton(java.lang.Object value)
should the Reset button be displayed in the FindPanel

Parameters:
value - a boolean value to indicate if the Reset button should be displayed

_setShowHelpButton

protected void _setShowHelpButton(java.lang.Object value)
should the Help button be displayed in the FindPanel

Parameters:
value - a boolean value to indicate if the Help button should be displayed

_setCustomEditors

protected void _setCustomEditors(java.lang.Object value)

_destroyEditInvokers

protected void _destroyEditInvokers()

_initEditInvokers

protected void _initEditInvokers(FindItemEditor[] editors)

_setEditorsOnDataPanel

protected void _setEditorsOnDataPanel()

_setShowStatusBar

protected void _setShowStatusBar(java.lang.Object value)
should the Status bar displayed in the FindPanel

Parameters:
value - a boolean value to indicate if the status bar should be displayed

_setShowORButton

protected void _setShowORButton(java.lang.Object value)
should the OR button be displayed in the FindPanel

Parameters:
value - a boolean value to indicate if the OR button should be displayed

_setShowRemoveButton

protected void _setShowRemoveButton(java.lang.Object value)
should the REMOVE button be displayed in the FindPanel

Parameters:
value - a boolean value to indicate if the Remove button should be displayed

_setShowRemoveAllButton

protected void _setShowRemoveAllButton(java.lang.Object value)
should the Remove All button be displayed in the FindPanel

Parameters:
value - a boolean value to indicate if the RemoveAll button should be displayed

_isDisableAutomaticWildCardInSearch

protected boolean _isDisableAutomaticWildCardInSearch()

_enableControls

protected void _enableControls(boolean flag)

_notifyButtonClick

public void _notifyButtonClick(int whichButton)
notification that the button click happened. The notification will be passed to the button click listeners

Parameters:
whichButton - a constant indicating which button was clicked

_showButtonHelper

protected void _showButtonHelper(int order,
                                 java.lang.Object val)
A helper method to show/hide button


_getButtonPosition

protected int _getButtonPosition(int order)

_isDataPublished

protected boolean _isDataPublished()

_notifyPropertyChange

protected void _notifyPropertyChange(int whichProperty,
                                     java.lang.Object newValue)

_getRefreshedRowIndex

protected int _getRefreshedRowIndex(DataPanel dataPanel)
Query criteria changes your row index if there were any deletion/addition


_modifyQueryCriteriaValue

protected java.lang.String _modifyQueryCriteriaValue(int sqlType,
                                                     java.lang.Object value,
                                                     boolean useSpecialChars,
                                                     java.lang.Object param)

_setUserData

protected void _setUserData(int colIndex,
                            java.lang.Object value)

_getUserData

protected java.lang.Object _getUserData(int colIndex)

_determineMinButtonSize

protected java.awt.Dimension _determineMinButtonSize(javax.swing.JButton b,
                                                     java.awt.Dimension desiredSize)
make sure the entire button text can be displayed instead of ....


getCurrentDataPanel

protected DataPanel getCurrentDataPanel()

getFindItemEditor

protected FindItemEditor getFindItemEditor(int col)

getFindItemModel

protected FindItemModel getFindItemModel(int row,
                                         int col)

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.