org.openswing.swing.util.client
Interface SearchControl

All Known Implementing Classes:
CheckBoxListControl, ComboBoxControl, ComboBoxVOControl, Grid, ListControl, ListVOControl, TreePanel

public interface SearchControl

Title: OpenSwing Framework

Description: Interface implemented by combo control, list control and grid control to search items.

Copyright: Copyright (C) 2006 Mauro Carniel


Method Summary
 boolean disableListener()
           
 javax.swing.JComponent getComponent()
           
 int getRowCount()
           
 int getSelectedIndex()
           
 java.lang.String getValueAt(int index)
           
 boolean isReadOnly()
           
 int search(java.lang.String textToSeach)
          Method invoked by SearchWindowManager when the specified "textToSeach" pattern has not matchings in the current content of binded control.
 void setSelectedIndex(int index)
          Set the selected index.
 

Method Detail

getSelectedIndex

public int getSelectedIndex()
Returns:
the selected index in the input control

setSelectedIndex

public void setSelectedIndex(int index)
Set the selected index.


getRowCount

public int getRowCount()
Returns:
total rows count in the input control

getValueAt

public java.lang.String getValueAt(int index)
Returns:
the element at the specified index, converted in String format

getComponent

public javax.swing.JComponent getComponent()
Returns:
combo control or list control or grid control

isReadOnly

public boolean isReadOnly()
Returns:
true if the input control is in read only mode (so search is enabled), false otherwise

disableListener

public boolean disableListener()
Returns:
true to disable key listening on input control (for instance, in case of nested grids), false to listen for key events

search

public int search(java.lang.String textToSeach)
Method invoked by SearchWindowManager when the specified "textToSeach" pattern has not matchings in the current content of binded control. This callback can be used to retrieve additional data into control and to search inside new data.

Parameters:
textToSeach - patten of text to search
Returns:
-1 if no additional data is available, otherwise the row index of data just added that satify the pattern