Package com.jbstrap.ui.components.filter
Class BaseFilter<T extends Component<?>>
java.lang.Object
com.jbstrap.core.messagebus.MessageBus
com.jbstrap.ui.Component<T>
com.jbstrap.ui.components.filter.BaseFilter<T>
- Direct Known Subclasses:
JBBaseFilter
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<BaseFilter<T>.ColumnParams>
protected final BaseFilter<T>.ColumnParams
protected DataDescriptor
protected FilterBarFiltering<?>
protected String
protected final FilterType
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition
-
Constructor Summary
ConstructorDescriptionBaseFilter
(String id, FilterType type, String language, FilterBarFiltering<?> filtering) -
Method Summary
Modifier and TypeMethodDescriptionGets every previously added subcomponentabstract Criteria
Gets the DataDescriptor set as filter component.Gets the filterable component set as filter component.getType()
Gets filter typevoid
onHide()
The operations to be executed after the component is hidden on the clientabstract T
reset()
Removes all filter conditions from the filter component and setting the filter component to defaultprotected final void
runAfterDrawOnEditor
(Component<?> editor) protected final void
runOnHideOnEditor
(Component<?> editor) protected final void
runOnShowOnEdior
(Component<?> editor) abstract T
setCriteria
(Criteria criteria) setDataDescriptor
(DataDescriptor dataDescriptor) Builds the filter component according to the provided DataDescriptor.setFiltering
(FilterBarFiltering<?> filtering) Sets the filterable component as the filter component.boolean
writeHTML
(StringWriter writer) Creates the component's HTML equivalentMethods 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, init, 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, setEnabled, 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
-
type
-
ds
-
columns
-
filtering
-
postInitScript
-
defaultEditor
-
-
Constructor Details
-
BaseFilter
-
-
Method Details
-
getType
Gets filter type- Returns:
- The filter type
-
setFiltering
Sets the filterable component as the filter component. The filter component does not automatically call the filter method, no additional source code is needed.- Parameters:
filtering
- Filterable component instance Ifnull
is specified, the filter component does not automatically filter- Returns:
- Filter component
-
getFiltering
Gets the filterable component set as filter component.- Returns:
- Filterable component or
null
if not set
-
setDataDescriptor
Builds the filter component according to the provided DataDescriptor. The method adds all the columns in the specified DataDescriptor where the filter is enabled and also passes the parameters to these columns.- Parameters:
dataDescriptor
- The DataDescriptor instance used for building the filter component- Returns:
- The filter component
- See Also:
-
getDataDescriptor
Gets the DataDescriptor set as filter component.- Returns:
- DataDescriptor set as filter component
-
getCriteria
-
reset
Removes all filter conditions from the filter component and setting the filter component to default- Returns:
- The filter component
-
writeHTML
Description copied from class:Component
Creates the component's HTML equivalentThis method doesn't need to be used during application development. This method is used when developing a custom component. When creating a custom component, this method needs to be implemented. In the parameter (
StringWriter
class) the component's HTML equivalent must be specified, and the method has to return with a Boolean value. This boolean value determines if the component was drawn. If the user doesn't have access right to the component, or if the component couldn't be drawn, it should return withfalse
. Otherwise, it must return withtrue
. -
setCriteria
-
runAfterDrawOnEditor
- Parameters:
editor
- The editor component
-
runOnShowOnEdior
- Parameters:
editor
- The editor component
-
runOnHideOnEditor
- Parameters:
editor
- The editor component
-
getComponents
Description copied from class:Component
Gets every previously added subcomponent- Overrides:
getComponents
in classComponent<T extends Component<?>>
- Returns:
- A collection of every subcomponent that was added to the component. If there are none, the collection will be empty
-
onHide
public void onHide()Description copied from class:Component
The operations to be executed after the component is hidden on the clientBy default, this is an empty method. It has to be overwritten on a component or page, if additional operations have to be executed after the component is hidden.
-