public class SearchElement
extends java.lang.Object
Constructor and Description |
---|
SearchElement(SearchItem[] searchItems,
MessageReceiver messageReceiver,
DataObjectWrapper dataObjectWrapper)
Constructs a new search element.
|
SearchElement(SearchItem[] searchItems,
MessageReceiver messageReceiver,
DataObjectWrapper dataObjectWrapper,
int defaultColumnIndex)
Constructs a new search element.
|
Modifier and Type | Method and Description |
---|---|
void |
addTo(AttributeList attributeList)
Adds all components of this search element to the specified attribute list.
|
void |
extend(WhereCondition whereCondition)
Builds the part of the where condition represented by user input and adds it to the specified where condition.
|
static void |
extend(WhereCondition whereCondition,
java.util.Vector<SearchElement> searchElements,
boolean combineOr)
Extends a where condition with multiple where conditions of several search items.
|
protected java.lang.String |
getTranslation(java.lang.String resourceKey)
Returns a text in the corresponding language according to the locale
specific resource bundle of the package.
|
MustTextField |
getValueField()
Returns the text field containing the search value.
|
boolean |
isInputAccepted()
Returns true if user input is accepted.
|
boolean |
isOr()
Returns true if the selected combination request is 'or'.
|
void |
register(InquiryHistory inquiryHistory)
Registers all GUI elements to the specified inquiry history.
|
void |
reset()
Resets all GUI elements to the first state
|
void |
setSelectedIndex(int index)
Selects the item at index
index . |
public SearchElement(SearchItem[] searchItems, MessageReceiver messageReceiver, DataObjectWrapper dataObjectWrapper)
searchItems
- the search items to be offered in this search elementmessageReceiver
- the receiver of messages produced by this elementdataObject
- the data object to format date conditionpublic SearchElement(SearchItem[] searchItems, MessageReceiver messageReceiver, DataObjectWrapper dataObjectWrapper, int defaultColumnIndex)
searchItems
- the search items to be offered in this search elementmessageReceiver
- the receiver of messages produced by this elementdataObject
- the data object to format date conditiondefaultColumnIndex
- the default column indexpublic static void extend(WhereCondition whereCondition, java.util.Vector<SearchElement> searchElements, boolean combineOr)
whereCondition
- the where condition to extendsearchElements
- the search elements which shall extend the conditioncombineOr
- whether or not or conditions should be treated in advancepublic void addTo(AttributeList attributeList)
attributeList
- the attribute list to add the components topublic void register(InquiryHistory inquiryHistory)
inquiryHistory
- the inquiry history managerpublic MustTextField getValueField()
public void setSelectedIndex(int index)
index
.anIndex
- an integer specifying the list item to select,
where 0 specifies the first item in the list and -1 indicates no selectionjava.lang.IllegalArgumentException
- if anIndex
< -1 or
anIndex
is greater than or equal to sizepublic void reset()
public boolean isOr()
public boolean isInputAccepted()
protected java.lang.String getTranslation(java.lang.String resourceKey)
resourceKey
- the key of the resource to retrievepublic void extend(WhereCondition whereCondition)
whereCondition
- the where condition which should be extended by current users choiceCopyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de