Package com.jbstrap.ui.components.filter
Class JBBaseFilter<T extends Component<?>>
java.lang.Object
com.jbstrap.core.messagebus.MessageBus
com.jbstrap.ui.Component<T>
com.jbstrap.ui.components.filter.BaseFilter<T>
com.jbstrap.ui.components.filter.JBBaseFilter<T>
- Direct Known Subclasses:
AdvancedFilter
,SimpleFilter
,TextFilter
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jbstrap.ui.components.filter.BaseFilter
BaseFilter.ColumnParams
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected Icon
protected String
protected Criteria
protected OperatorType
protected Icon
protected String
protected static final List<OperatorType>
protected Icon
protected String
protected Icon
protected String
protected static final String
protected static final String
Fields inherited from class com.jbstrap.ui.components.filter.BaseFilter
columns, defaultEditor, ds, filtering, postInitScript, type
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition
-
Constructor Summary
ConstructorDescriptionJBBaseFilter
(FilterType type) JBBaseFilter
(FilterType type, String language) JBBaseFilter
(String id, FilterType type, String language, FilterBarFiltering<?> filtering) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getColumnParamsAsJson
(BaseFilter<T>.ColumnParams param) Generate JSON parameter object from the column parametersGets the user-specified filter criterion from the filter component.void
init()
The component initialization method.boolean
void
void
onFilter
(FilterbarFilteringEvent event) Filter handlingreset()
Removes all filter conditions from the filter component and setting the filter component to defaultprotected void
abstract T
setCriteria
(Criteria criteria) setEnabled
(boolean enabled) Sets the component to be enabled.setShowEditor
(boolean showEditor) Methods inherited from class com.jbstrap.ui.components.filter.BaseFilter
getComponents, getDataDescriptor, getFiltering, getType, onHide, runAfterDrawOnEditor, runOnHideOnEditor, runOnShowOnEdior, setDataDescriptor, setFiltering, writeHTML
Methods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, addComponent, addComponents, addDeniedRole, addHandler, addStyle, addStyleClass, addStyleClasses, afterDraw, clearfix, closeTag, combinateAccess, containsStyle, containsStyleClass, draw, drawSubComponents, error, flattendComponentTree, getAccess, getAccessMode, getAllowedRoles, getAttribute, getAttributes, getBackgroundColor, getBorderColor, getClient, getComponentById, getComponents, getComponentsByClass, getData, getDeniedRoles, getHandlers, getId, getLanguageCode, getName, getParent, getParent, getRegisteredEvents, getStyle, getStyleClasses, getTextAlign, getTextColor, getToolTip, getToolTipPosition, getTypeName, getUI, insertComponentAfter, insertComponentBefore, isAccess, isDrawn, isEnabled, isEventBubbling, isVisible, onHotKeyEventHandler, onShow, openTag, redraw, removeAllComponents, removeAllowedRole, removeAllStyleClasses, removeAttribute, removeComponent, removeComponent, removeComponents, removeDeniedRole, removeHandler, removeStyle, removeStyle, removeStyleClass, removeStyleClasses, replaceComponent, replaceStyleClass, runAfterDraw, runJavaScript, runJavaScript, runJavaScript, runOnHide, runOnShow, say, setAttribute, setBackgroundColor, setBorder, setBorderColor, setData, setDisplayType, setEventBubbling, setFlex, setFloating, setHeight100, setHeight25, setHeight50, setHeight75, setHeightAuto, setLanguage, setMargin, setName, setOverflow, setPadding, setParent, setScrollable, setSelectionType, setShadow, setStyle, setTextAlign, setTextColor, setToolTip, setToolTipPosition, setVisible, setWidth100, setWidth25, setWidth50, setWidth75, setWidthAuto, showNotification, showNotification, showProcessIndicator, toggleStyleClass
Methods inherited from class com.jbstrap.core.messagebus.MessageBus
closeMessageBus, messageBusOpened, openMessageBus, renewSubscription, sendMessageToMessageBus, subscribeMessageBus, unsubscribeAllListeners, unsubscribeMessageBus
-
Field Details
-
HIDDEN_OPERATORS
-
TEXT
- See Also:
-
SIMPLE
- See Also:
-
ADVANCED
- See Also:
-
currentCriteria
-
defaultWorldOperator
-
filteredColumn
-
filterButtonText
-
resetButtonText
-
saveButtonText
-
cancelButtonText
-
filterButtonIcon
-
resetButtonIcon
-
saveButtonIcon
-
cancelButtonIcon
-
-
Constructor Details
-
JBBaseFilter
-
JBBaseFilter
-
JBBaseFilter
-
-
Method Details
-
init
Description copied from class:Component
The component initialization method.Empty method, only needs to be overwritten when making a custom component, that needs to call an initializing JavaScript on the client side. The method is called by the framework after the component is drawn, but before the afterDraw() method. The use of this method during application development is not allowed. This method is meant for inner use only.
- Overrides:
init
in classComponent<T extends Component<?>>
- Throws:
JavaScriptLoadError
- If there was a JavaScript error during the initialization.
-
getColumnParamsAsJson
Generate JSON parameter object from the column parameters- Parameters:
param
- The column parameters object- Returns:
- The generated JSON object
-
getCriteria
Gets the user-specified filter criterion from the filter component.- Specified by:
getCriteria
in classBaseFilter<T extends Component<?>>
- Returns:
- The filter criterion in the component or
null
if no filter criterion is specified
-
reset
Removes all filter conditions from the filter component and setting the filter component to default- Specified by:
reset
in classBaseFilter<T extends Component<?>>
- Returns:
- The filter component
-
onFilter
Filter handling- Parameters:
event
- Filter event
-
setCriteria
- Specified by:
setCriteria
in classBaseFilter<T extends Component<?>>
-
onChangeEditor
- Parameters:
event
- The change filter editor event
-
setEnabled
Sets the component to be enabled. Defaults totrue
- Overrides:
setEnabled
in classComponent<T extends Component<?>>
- Parameters:
enabled
-true
, the component is enabled, otherwise it's disabled- Returns:
- The component
-
setShowEditor
-
isShowEditor
public boolean isShowEditor() -
setButtonsData
protected void setButtonsData()
-