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
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected Iconprotected Stringprotected Criteriaprotected OperatorTypeprotected Iconprotected Stringprotected static final List<OperatorType>protected Iconprotected Stringprotected Iconprotected Stringprotected static final Stringprotected static final StringFields inherited from class com.jbstrap.ui.components.filter.BaseFilter
columns, defaultEditor, ds, filtering, postInitScript, typeFields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition -
Constructor Summary
ConstructorsConstructorDescriptionJBBaseFilter(FilterType type) JBBaseFilter(FilterType type, String language) JBBaseFilter(String id, FilterType type, String language, FilterBarFiltering<?> filtering) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetColumnParamsAsJson(BaseFilter<T>.ColumnParams param) Generate JSON parameter object from the column parametersGets the user-specified filter criterion from the filter component.voidinit()The component initialization method.booleanvoidvoidonFilter(FilterbarFilteringEvent event) Filter handlingreset()Removes all filter conditions from the filter component and setting the filter component to defaultprotected voidabstract TsetCriteria(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, writeHTMLMethods 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, toggleStyleClassMethods 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:ComponentThe 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:
initin 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:
getCriteriain classBaseFilter<T extends Component<?>>- Returns:
- The filter criterion in the component or
nullif no filter criterion is specified
-
reset
Removes all filter conditions from the filter component and setting the filter component to default- Specified by:
resetin classBaseFilter<T extends Component<?>>- Returns:
- The filter component
-
onFilter
Filter handling- Parameters:
event- Filter event
-
setCriteria
- Specified by:
setCriteriain classBaseFilter<T extends Component<?>>
-
onChangeEditor
- Parameters:
event- The change filter editor event
-
setEnabled
Sets the component to be enabled. Defaults totrue- Overrides:
setEnabledin 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()
-