public class BarcodeSearchField extends SearchField
SearchField.Meaning, SearchField.OrderComparator
Modifier and Type | Field and Description |
---|---|
protected boolean |
halfWidth |
protected java.lang.String |
hint |
advanced, data, displayName, id, meaning, visible
Constructor and Description |
---|
BarcodeSearchField(java.lang.String id,
java.lang.String displayName,
boolean advanced,
boolean halfWidth,
java.lang.String hint) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHint()
Gets the hint to be displayed as a placeholder inside the field.
|
boolean |
isHalfWidth()
Gets whether this should share its row with another field.
|
void |
setHalfWidth(boolean halfWidth)
Sets whether this should share its row with another field.
|
void |
setHint(java.lang.String hint)
Sets the hint to be displayed as a placeholder inside the field.
|
org.json.JSONObject |
toJSON()
Serialize a SearchField to a JSONObject.
|
fromJSON, getData, getDisplayName, getId, getMeaning, isAdvanced, isVisible, setAdvanced, setData, setDisplayName, setId, setMeaning, setVisible, toString
public BarcodeSearchField(java.lang.String id, java.lang.String displayName, boolean advanced, boolean halfWidth, java.lang.String hint)
id
- ID of the search field, later given to your search() functiondisplayName
- The name to display for the search fieldadvanced
- Set if this field should only be shown when showing the
advanced search formhint
- The hint to display inside the search fieldhalfWidth
- Set to true to make the field appear next to the one before
(only needed on the second field). The displayName will not be
shown.public java.lang.String getHint()
public void setHint(java.lang.String hint)
public boolean isHalfWidth()
public void setHalfWidth(boolean halfWidth)
public org.json.JSONObject toJSON() throws org.json.JSONException
SearchField
toJSON
in class SearchField
org.json.JSONException