public class FilterBuilder extends Layout implements HasFilterChangedHandlers, HasSearchHandlers
A FilterBuilder produces an AdvancedCriteria
object, which the DataSource
subsystem can
use to filter datasets, including the ability to perform such filtering within the browser for datasets that are
completely loaded.
The operators available for each field can be customized at the DataSource level via DataSourceField.validOperators
, DataSource.setTypeOperators()
and related APIs.
config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Constructor and Description |
---|
FilterBuilder() |
FilterBuilder(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
void |
addClause(FilterClause filterClause)
Add a new
FilterClause to this FilterBuilder. |
void |
addCriterion(Criterion criterion)
Add a new criterion, including recursively adding sub-criteria for a criterion that contains other criteria.
|
com.google.gwt.event.shared.HandlerRegistration |
addFilterChangedHandler(FilterChangedHandler handler)
Add a filterChanged handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addSearchHandler(SearchHandler handler)
Add a search handler.
|
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName . |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName . |
void |
clearCriteria()
Clear all current criteria.
|
protected com.google.gwt.core.client.JavaScriptObject |
create() |
ImgButton |
getAddButton()
An ImgButton that allows new clauses to be added if
showAddButton is set. |
java.lang.String |
getAddButtonPrompt()
The hover prompt text for the add button.
|
java.lang.Boolean |
getAllowEmpty()
If set to false, the last clause cannot be removed.
|
Canvas |
getBracket()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
VStack |
getClauseStack()
VStack of all clauses that are part of this FilterBuilder
|
AdvancedCriteria |
getCriteria()
Get the edited criteria entered by the user.
|
AdvancedCriteria |
getCriteria(boolean includeEmptyValues)
Get the edited criteria entered by the user.
|
DataSource |
getDataSource()
The DataSource that this component should bind to for default fields and for performing
DSRequest . |
java.lang.String |
getEditorType(DataSourceField field,
OperatorId operatorId)
Returns the type of editor to use for the field.
|
DataSource |
getFieldDataSource()
If specified, the FilterBuilder will dynamically fetch DataSourceField definitions from this DataSource rather than
using
dataSource . |
FormItem |
getFieldPickerProperties()
Properties to combine with the
FieldPicker autoChild FormItem. |
java.lang.String |
getFieldPickerTitle()
The title for the
field-picker select-item. |
java.lang.Integer |
getFieldPickerWidth()
Width for the field picker formItem displayed in clauses within this FilterBuilder.
|
java.lang.String |
getFieldPickerWidthAsString()
Width for the field picker formItem displayed in clauses within this FilterBuilder.
|
java.lang.String |
getInlineAndNotTitle()
Title for the "And Not" operator (only applicable to the "inline" appearance)
|
java.lang.String |
getInlineAndTitle()
Title for the "And" operator (only applicable to the "inline" appearance)
|
java.lang.String |
getInlineOrTitle()
Title for the "Or" operator (only applicable to the "inline" appearance)
|
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure()
Getter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
java.lang.String |
getMatchAllTitle()
Title for the "Match All" (and) operator when using
topOperatorAppearance :"radio". |
java.lang.String |
getMatchAnyTitle()
Title for the "Match Any" (or) operator when using
topOperatorAppearance :"radio". |
java.lang.String |
getMatchNoneTitle()
Title for the "Match None" (not) operator when using
topOperatorAppearance :"radio". |
Canvas[] |
getMembers()
An array of canvases that will be contained within this layout.
|
java.lang.String |
getMissingFieldPrompt()
The message to display next to fieldNames that do not exist in the available dataSource.
|
Label |
getModeSwitcher()
Label to change between simple and advanced mode.
|
java.lang.String |
getModeSwitcherAdvancedMessage()
Title for the "Advanced.." mode switcher label (only applicable to the "radio" appearance).
|
java.lang.String |
getModeSwitcherFlattenWarningMessage()
Message displayed when switching to "radio" mode if the criteria will be logically changed.
|
java.lang.String |
getModeSwitcherSimpleMessage()
Title for the "Simple Mode.." mode switcher label (only applicable to the "bracket" appearance).
|
SelectItem |
getOperatorPicker()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
FormItem |
getOperatorPickerProperties()
Properties to combine with the
operatorPicker
autoChild FormItem. |
java.lang.String |
getOperatorPickerTitle()
The title for the operator-picker select-item.
|
java.lang.Integer |
getOperatorPickerWidth()
Width for the operator picker formItem displayed in clauses within this FilterBuilder.
|
java.lang.String |
getOperatorPickerWidthAsString()
Width for the operator picker formItem displayed in clauses within this FilterBuilder.
|
static FilterBuilder |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
DynamicForm |
getRadioOperatorForm()
With
TopOperatorAppearance :"radio", form that appears above the stack of clauses and
allows picking the LogicalOperator for the overall FilterBuilder. |
HLayout |
getRadioOperatorLayout()
HLayout of radioOperationForm and optional modeSwitcher.
|
java.lang.String |
getRadioOperatorTitle()
The title for the Operator RadioGroupItem displayed in the
radioOperatorForm . |
java.lang.String |
getRangeSeparator()
For operators that check that a value is within a range, text to show between the start and end input fields for
specifying the limits of the range.
|
ImgButton |
getRemoveButton()
The removal ImgButton that appears before each clause if
showRemoveButton is set. |
java.lang.String |
getRemoveButtonPrompt()
The hover prompt text for the remove button.
|
java.lang.Boolean |
getRetainValuesAcrossFields()
Dictates whether values entered by a user should be retained in the value fields when a different field is selected.
|
java.lang.Boolean |
getSaveOnEnter()
If true, when the user hits the Enter key while focused in a text-item in this FilterBuilder, we automatically invoke
the user-supplied
FilterBuilder.search() method. |
FilterClause[] |
getSelectedClauses()
Returns the list of this FilterBuilder's FilterClauses that are currently selected.
|
java.lang.Boolean |
getShowAddButton()
If set, a button will be shown underneath all current clauses allowing a new clause to be added.
|
java.lang.Boolean |
getShowFieldTitles()
If true (the default), show field titles in the drop-down box used to select a field for querying.
|
java.lang.Boolean |
getShowModeSwitcher()
When enabled allows FilterBuilder in
topOperatorAppearance:"radio" or
topOperatorAppearance:"bracket" mode to be switch to the other view by the user. |
java.lang.Boolean |
getShowRemoveButton()
If set, a button will be shown for each clause allowing it to be removed.
|
java.lang.Boolean |
getShowSelectionCheckbox()
If true, causes a CheckboxItem to appear to the left of each clause in "inline"
appearance . |
java.lang.Boolean |
getShowSubClauseButton()
Whether to show a button that allows the user to add subclauses.
|
java.lang.Boolean |
getSortFields()
Should the
FieldPicker items be sorted alphabetically in the drop down list. |
IButton |
getSubClauseButton()
Button allowing the user to add subclauses grouped by a
LogicalOperator . |
java.lang.String |
getSubClauseButtonPrompt()
The hover prompt text for the subClauseButton.
|
java.lang.String |
getSubClauseButtonTitle()
The title of the subClauseButton
|
LogicalOperator |
getTopOperator()
Default logical operator for all top-level clauses in the FilterBuilder.
|
TopOperatorAppearance |
getTopOperatorAppearance()
How to display and edit the
top-level operator for
this FilterBuilder. |
DynamicForm |
getTopOperatorForm()
With
TopOperatorAppearance "bracket" and "inline", a form that appears to the left of
the stack of clauses and allows picking the LogicalOperator for the overall
FilterBuilder (or for that specific FilterClause, in the case of "inline") |
SelectItem |
getTopOperatorItem()
Automatically generated SelectItem autoChild shown in the
topOperatorForm . |
int |
getTopOperatorItemWidth()
Width for the
topOperatorItem autoChild. |
java.lang.String |
getTopOperatorItemWidthAsString()
Width for the
topOperatorItem autoChild. |
OperatorId[] |
getTopOperatorOptions()
Logical operators to allow for
TopOperatorAppearance s of "radio" and "bracket". |
java.lang.String |
getTopOperatorTitle()
The title for the left-aligned Operator selectItem in the
topOperatorForm . |
java.lang.Boolean |
getValidateOnChange()
If true (the default), validates each entered value when it changes, to make sure it is a a valid value of its type
(valid string, number, and so on).
|
FormItem |
getValueFieldProperties(FieldType type,
java.lang.String fieldName,
OperatorId operatorId,
ValueItemType itemType,
java.lang.String fieldType)
Override to return properties for the FormItem(s) used for the "value" field displayed within clauses within this
filterBuilder.
|
java.lang.Integer |
getValueItemWidth()
Width for the value-chooser formItem displayed in clauses within this FilterBuilder.
|
java.lang.String |
getValueItemWidthAsString()
Width for the value-chooser formItem displayed in clauses within this FilterBuilder.
|
protected void |
onInit_FilterBuilder() |
void |
onInit() |
void |
removeClause(FilterClause clause)
Remove a clause this FilterBuilder is currently showing.
|
void |
setAddButtonPrompt(java.lang.String addButtonPrompt)
The hover prompt text for the add button.
|
void |
setAllowEmpty(java.lang.Boolean allowEmpty)
If set to false, the last clause cannot be removed.
|
void |
setCriteria(AdvancedCriteria criteria)
Initial criteria.
|
void |
setDataSource(DataSource dataSource)
DataSource this filter should use for field definitions and available ${isc.DocUtils.linkForRef('object:Operator')}s.
|
static void |
setDefaultProperties(FilterBuilder filterBuilderProperties)
Class level method to set the default properties of this class.
|
void |
setFieldDataSource(DataSource fieldDataSource)
If specified, the FilterBuilder will dynamically fetch DataSourceField definitions from this DataSource rather than
using
dataSource . |
void |
setFieldOperatorCustomizer(FieldOperatorCustomizer customizer)
This method installs a customizer that returns the set of OperatorIds applicable to the passed fieldName
|
void |
setFieldPickerProperties(FormItem fieldPickerProperties)
Properties to combine with the
FieldPicker autoChild FormItem. |
void |
setFieldPickerTitle(java.lang.String fieldPickerTitle)
The title for the
field-picker select-item. |
void |
setFieldPickerWidth(java.lang.Integer fieldPickerWidth)
Width for the field picker formItem displayed in clauses within this FilterBuilder.
|
void |
setFieldPickerWidth(java.lang.String fieldPickerWidth)
Width for the field picker formItem displayed in clauses within this FilterBuilder.
|
void |
setInlineAndNotTitle(java.lang.String inlineAndNotTitle)
Title for the "And Not" operator (only applicable to the "inline" appearance)
|
void |
setInlineAndTitle(java.lang.String inlineAndTitle)
Title for the "And" operator (only applicable to the "inline" appearance)
|
void |
setInlineOrTitle(java.lang.String inlineOrTitle)
Title for the "Or" operator (only applicable to the "inline" appearance)
|
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.form.FilterBuilderLogicalStructure s)
Setter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
void |
setMatchAllTitle(java.lang.String matchAllTitle)
Title for the "Match All" (and) operator when using
topOperatorAppearance :"radio". |
void |
setMatchAnyTitle(java.lang.String matchAnyTitle)
Title for the "Match Any" (or) operator when using
topOperatorAppearance :"radio". |
void |
setMatchNoneTitle(java.lang.String matchNoneTitle)
Title for the "Match None" (not) operator when using
topOperatorAppearance :"radio". |
void |
setMissingFieldPrompt(java.lang.String missingFieldPrompt)
The message to display next to fieldNames that do not exist in the available dataSource.
|
void |
setModeSwitcherAdvancedMessage(java.lang.String modeSwitcherAdvancedMessage)
Title for the "Advanced.." mode switcher label (only applicable to the "radio" appearance).
|
void |
setModeSwitcherFlattenWarningMessage(java.lang.String modeSwitcherFlattenWarningMessage)
Message displayed when switching to "radio" mode if the criteria will be logically changed.
|
void |
setModeSwitcherSimpleMessage(java.lang.String modeSwitcherSimpleMessage)
Title for the "Simple Mode.." mode switcher label (only applicable to the "bracket" appearance).
|
void |
setOperatorPickerProperties(FormItem operatorPickerProperties)
Properties to combine with the
operatorPicker
autoChild FormItem. |
void |
setOperatorPickerTitle(java.lang.String operatorPickerTitle)
The title for the operator-picker select-item.
|
void |
setOperatorPickerWidth(java.lang.Integer operatorPickerWidth)
Width for the operator picker formItem displayed in clauses within this FilterBuilder.
|
void |
setOperatorPickerWidth(java.lang.String operatorPickerWidth)
Width for the operator picker formItem displayed in clauses within this FilterBuilder.
|
void |
setRadioOperatorTitle(java.lang.String radioOperatorTitle)
The title for the Operator RadioGroupItem displayed in the
radioOperatorForm . |
void |
setRangeSeparator(java.lang.String rangeSeparator)
For operators that check that a value is within a range, text to show between the start and end input fields for
specifying the limits of the range.
|
void |
setRemoveButtonPrompt(java.lang.String removeButtonPrompt)
The hover prompt text for the remove button.
|
void |
setRetainValuesAcrossFields(java.lang.Boolean retainValuesAcrossFields)
Dictates whether values entered by a user should be retained in the value fields when a different field is selected.
|
void |
setSaveOnEnter(java.lang.Boolean saveOnEnter)
If true, when the user hits the Enter key while focused in a text-item in this FilterBuilder, we automatically invoke
the user-supplied
FilterBuilder.search() method. |
void |
setShowAddButton(java.lang.Boolean showAddButton)
If set, a button will be shown underneath all current clauses allowing a new clause to be added.
|
void |
setShowFieldTitles(boolean showFieldTitles)
If true (the default), show field titles in the drop-down box used to select a field for querying.
|
void |
setShowFieldTitles(java.lang.Boolean showFieldTitles)
If true (the default), show field titles in the drop-down box used to select a field for querying.
|
void |
setShowModeSwitcher(java.lang.Boolean showModeSwitcher)
When enabled allows FilterBuilder in
topOperatorAppearance:"radio" or
topOperatorAppearance:"bracket" mode to be switch to the other view by the user. |
void |
setShowRemoveButton(java.lang.Boolean showRemoveButton)
If set, a button will be shown for each clause allowing it to be removed.
|
void |
setShowSelectionCheckbox(java.lang.Boolean showSelectionCheckbox)
If true, causes a CheckboxItem to appear to the left of each clause in "inline"
appearance . |
void |
setShowSubClauseButton(java.lang.Boolean showSubClauseButton)
Whether to show a button that allows the user to add subclauses.
|
void |
setSortFields(java.lang.Boolean sortFields)
Should the
FieldPicker items be sorted alphabetically in the drop down list. |
void |
setSubClauseButtonPrompt(java.lang.String subClauseButtonPrompt)
The hover prompt text for the subClauseButton.
|
void |
setSubClauseButtonTitle(java.lang.String subClauseButtonTitle)
The title of the subClauseButton
|
void |
setTopOperator(LogicalOperator topOperator)
Default logical operator for all top-level clauses in the FilterBuilder.
|
void |
setTopOperatorAppearance(TopOperatorAppearance topOperatorAppearance)
How to display and edit the
top-level operator for
this FilterBuilder. |
void |
setTopOperatorItemWidth(int topOperatorItemWidth)
Width for the
topOperatorItem autoChild. |
void |
setTopOperatorItemWidth(java.lang.String topOperatorItemWidth)
Width for the
topOperatorItem autoChild. |
void |
setTopOperatorOptions(OperatorId... topOperatorOptions)
Logical operators to allow for
TopOperatorAppearance s of "radio" and "bracket". |
void |
setTopOperatorTitle(java.lang.String topOperatorTitle)
The title for the left-aligned Operator selectItem in the
topOperatorForm . |
void |
setValidateOnChange(java.lang.Boolean validateOnChange)
If true (the default), validates each entered value when it changes, to make sure it is a a valid value of its type
(valid string, number, and so on).
|
void |
setValueItemWidth(java.lang.Integer valueItemWidth)
Width for the value-chooser formItem displayed in clauses within this FilterBuilder.
|
void |
setValueItemWidth(java.lang.String valueItemWidth)
Width for the value-chooser formItem displayed in clauses within this FilterBuilder.
|
java.lang.Boolean |
validate()
Validate the clauses of this FilterBuilder.
|
addMember, addMember, addMember, addMember, addMemberPostCreate, addMemberPostCreate, addMemberPreCreate, addMemberPreCreate, addMembers, addMembers, addMembersChangedHandler, getAnimateMembers, getAnimateMemberTime, getCanDropComponents, getDefaultResizeBars, getDropComponent, getDropLine, getDropLineThickness, getDropPosition, getEditProxyConstructor, getEnforcePolicy, getHPolicy, getLayoutBottomMargin, getLayoutLeftMargin, getLayoutMargin, getLayoutRightMargin, getLayoutTopMargin, getLeaveScrollbarGap, getLocateMembersBy, getLocateMembersType, getManagePercentBreadth, getMember, getMember, getMemberDefaultBreadth, getMemberNumber, getMemberNumber, getMemberOverlap, getMembersLength, getMembersMargin, getMinMemberSize, getOverflow, getPaddingAsLayoutMargin, getResizeBar, getResizeBarClass, getResizeBarSize, getReverseOrder, getShowDragPlaceHolder, getShowDropLines, getStackZIndex, getVertical, getVPolicy, hasMember, hideDropLine, hideMember, hideMember, layoutIsDirty, onInit_Layout, reflow, reflow, reflowNow, removeMember, removeMembers, removeMembers, reorderMember, reorderMembers, setAlign, setAlign, setAnimateMembers, setAnimateMemberTime, setCanDropComponents, setDefaultLayoutAlign, setDefaultLayoutAlign, setDefaultProperties, setDefaultResizeBars, setDropLineProperties, setDropLineThickness, setEditProxyConstructor, setEnforcePolicy, setHPolicy, setLayoutBottomMargin, setLayoutLeftMargin, setLayoutMargin, setLayoutRightMargin, setLayoutTopMargin, setLeaveScrollbarGap, setLocateMembersBy, setLocateMembersType, setLogicalStructure, setManagePercentBreadth, setMemberOverlap, setMembers, setMembersMargin, setMinMemberSize, setOverflow, setPaddingAsLayoutMargin, setPlaceHolderDefaults, setPlaceHolderProperties, setResizeBarClass, setResizeBarSize, setReverseOrder, setShowDragPlaceHolder, setShowDropLines, setStackZIndex, setVertical, setVisibleMember, setVPolicy, showMember, showMember
addChild, addChild, addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addSnapAlignCandidate, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, deparent, depeer, disable, enable, encloses, focus, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoDraw, getAutoMaskComponents, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenResizeSnapAlign, getChildrenSnapAlign, getChildrenSnapCenterAlign, getChildrenSnapEdgeAlign, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getElement, getElement, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFormItemAutoChild, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeavePageSpace, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPanelContainer, getParentCanvas, getParentElement, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSkinImgDir, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUseBackMask, getUseDragMask, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, printComponents, provideRuleContext, redraw, redraw, removeChild, removeChild, removePeer, removePeer, removeSnapAlignCandidate, resizeBy, resizeTo, resizeTo, revealChild, revealChild, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAllowExternalFilters, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoDraw, setAutoHeight, setAutoMaskComponents, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenResizeSnapAlign, setChildrenSnapAlign, setChildrenSnapCenterAlign, setChildrenSnapEdgeAlign, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setElement, setExtraSpace, setFacetId, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeavePageSpace, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setPadding, setPageLeft, setPageTop, setParentCanvas, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setScrollbarConstructor, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSkinImgDir, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseBackMask, setUseDragMask, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateEditNode, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
addDrawHandler, applyFactoryProperties, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, isFactoryCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent
public FilterBuilder()
public FilterBuilder(com.google.gwt.core.client.JavaScriptObject jsObj)
public static FilterBuilder getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName, Canvas defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties. For usage tips on this
param, see SGWTProperties
.AutoChildUsage
public static void changeAutoChildDefaults(java.lang.String autoChildName, FormItem defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties. For usage tips on this
param, see SGWTProperties
.AutoChildUsage
protected com.google.gwt.core.client.JavaScriptObject create()
public ImgButton getAddButton() throws java.lang.IllegalStateException
showAddButton
is set.
For an overview of how to use and configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public void setAddButtonPrompt(java.lang.String addButtonPrompt) throws java.lang.IllegalStateException
addButtonPrompt
- Default value is "Add"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getAddButtonPrompt()
public void setAllowEmpty(java.lang.Boolean allowEmpty) throws java.lang.IllegalStateException
allowEmpty
- Default value is falsejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getAllowEmpty()
public Canvas getBracket()
Using AutoChildren
for details.
Widget used as a "bracket" to hint to the user that a subclause groups several field-by-field filter criteria under one logical operator.
By default, a simple CSS-style Canvas with borders on three sides. A vertical StretchImg could provide a more elaborate appearance.
public VStack getClauseStack() throws java.lang.IllegalStateException
For an overview of how to use and configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public void setFieldDataSource(DataSource fieldDataSource) throws java.lang.IllegalStateException
dataSource
. The FieldPicker
will default to being a ComboBoxItem
rather than a SelectItem
so that the user will have type-ahead auto-completion. The
records returned from the fieldDataSource
must have properties corresponding to a DataSourceField
definition, at a minimum, "name"
and "type"
. Any property legal on a DataSourceField is legal on the returned records, including valueMap
.
Even when a fieldDataSource
is
specified, dataSource
may still be specified in
order to control the list of valid operators
for each
field.
fieldDataSource
- Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic DataSource getFieldDataSource()
dataSource
. The FieldPicker
will default to being a ComboBoxItem
rather than a SelectItem
so that the user will have type-ahead auto-completion. The
records returned from the fieldDataSource
must have properties corresponding to a DataSourceField
definition, at a minimum, "name"
and "type"
. Any property legal on a DataSourceField is legal on the returned records, including valueMap
.
Even when a fieldDataSource
is
specified, dataSource
may still be specified in
order to control the list of valid operators
for each
field.
public void setFieldPickerProperties(FormItem fieldPickerProperties) throws java.lang.IllegalStateException
FieldPicker
autoChild FormItem.fieldPickerProperties
- Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic FormItem getFieldPickerProperties()
FieldPicker
autoChild FormItem.public void setFieldPickerTitle(java.lang.String fieldPickerTitle) throws java.lang.IllegalStateException
field-picker
select-item.fieldPickerTitle
- Default value is "Field Name"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getFieldPickerTitle()
field-picker
select-item.public void setFieldPickerWidth(java.lang.Integer fieldPickerWidth) throws java.lang.IllegalStateException
fieldPickerWidth
- Default value is "*"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Integer getFieldPickerWidth()
public void setFieldPickerWidth(java.lang.String fieldPickerWidth) throws java.lang.IllegalStateException
fieldPickerWidth
- Default value is "*"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getFieldPickerWidthAsString()
public void setInlineAndNotTitle(java.lang.String inlineAndNotTitle) throws java.lang.IllegalStateException
inlineAndNotTitle
- Default value is "and not"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getInlineAndNotTitle()
public void setInlineAndTitle(java.lang.String inlineAndTitle) throws java.lang.IllegalStateException
inlineAndTitle
- Default value is "and"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getInlineAndTitle()
public void setInlineOrTitle(java.lang.String inlineOrTitle) throws java.lang.IllegalStateException
inlineOrTitle
- Default value is "or"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getInlineOrTitle()
public void setMatchAllTitle(java.lang.String matchAllTitle) throws java.lang.IllegalStateException
topOperatorAppearance
:"radio".matchAllTitle
- Default value is "Match All"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getMatchAllTitle()
topOperatorAppearance
:"radio".public void setMatchAnyTitle(java.lang.String matchAnyTitle) throws java.lang.IllegalStateException
topOperatorAppearance
:"radio".matchAnyTitle
- Default value is "Match Any"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getMatchAnyTitle()
topOperatorAppearance
:"radio".public void setMatchNoneTitle(java.lang.String matchNoneTitle) throws java.lang.IllegalStateException
topOperatorAppearance
:"radio".matchNoneTitle
- Default value is "Match None"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getMatchNoneTitle()
topOperatorAppearance
:"radio".public void setMissingFieldPrompt(java.lang.String missingFieldPrompt) throws java.lang.IllegalStateException
missingFieldPrompt
- Default value is "[missing field definition]"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getMissingFieldPrompt()
public Label getModeSwitcher() throws java.lang.IllegalStateException
showModeSwitcher
is true.
Shows either modeSwitcherSimpleMessage
or modeSwitcherAdvancedMessage
depending on the current state of the filter.
For an overview of how to use and configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public void setModeSwitcherAdvancedMessage(java.lang.String modeSwitcherAdvancedMessage) throws java.lang.IllegalStateException
modeSwitcherAdvancedMessage
- Default value is "Advanced.."java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getModeSwitcherAdvancedMessage()
public void setModeSwitcherFlattenWarningMessage(java.lang.String modeSwitcherFlattenWarningMessage) throws java.lang.IllegalStateException
modeSwitcherFlattenWarningMessage
- Default value is "Criteria will be modified to fit in simpler editing interface"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getModeSwitcherFlattenWarningMessage()
public void setModeSwitcherSimpleMessage(java.lang.String modeSwitcherSimpleMessage) throws java.lang.IllegalStateException
modeSwitcherSimpleMessage
- Default value is "Simple Mode.."java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getModeSwitcherSimpleMessage()
public SelectItem getOperatorPicker()
Using AutoChildren
for details.
AutoChild for the FormItem
that allows a user to select the operator
when creating filter clauses. Each clause will create an operatorPicker automatically. To customize this item, use
operatorPickerProperties
public void setOperatorPickerProperties(FormItem operatorPickerProperties) throws java.lang.IllegalStateException
operatorPicker
autoChild FormItem.operatorPickerProperties
- Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic FormItem getOperatorPickerProperties()
operatorPicker
autoChild FormItem.public void setOperatorPickerTitle(java.lang.String operatorPickerTitle) throws java.lang.IllegalStateException
operatorPickerTitle
- Default value is "Operator"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getOperatorPickerTitle()
public void setOperatorPickerWidth(java.lang.Integer operatorPickerWidth) throws java.lang.IllegalStateException
operatorPickerWidth
- Default value is 150java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Integer getOperatorPickerWidth()
public void setOperatorPickerWidth(java.lang.String operatorPickerWidth) throws java.lang.IllegalStateException
operatorPickerWidth
- Default value is 150java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getOperatorPickerWidthAsString()
public DynamicForm getRadioOperatorForm() throws java.lang.IllegalStateException
TopOperatorAppearance
:"radio", form that appears above the stack of clauses and
allows picking the LogicalOperator
for the overall FilterBuilder. By default, consists of a simple RadioGroupItem.
For an overview of how to use and configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public HLayout getRadioOperatorLayout() throws java.lang.IllegalStateException
For an overview of how to use and configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public void setRadioOperatorTitle(java.lang.String radioOperatorTitle) throws java.lang.IllegalStateException
radioOperatorForm
.radioOperatorTitle
- Default value is "Overall Operator"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getRadioOperatorTitle()
radioOperatorForm
.public void setRangeSeparator(java.lang.String rangeSeparator) throws java.lang.IllegalStateException
rangeSeparator
- Default value is "and"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getRangeSeparator()
public ImgButton getRemoveButton() throws java.lang.IllegalStateException
showRemoveButton
is set.
For an overview of how to use and configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public void setRemoveButtonPrompt(java.lang.String removeButtonPrompt) throws java.lang.IllegalStateException
removeButtonPrompt
- Default value is "Remove"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getRemoveButtonPrompt()
public void setRetainValuesAcrossFields(java.lang.Boolean retainValuesAcrossFields)
Note that, when switching between fields that have an optionDataSource or valueMap, this property is ignored and the values are never retained.
retainValuesAcrossFields
- Default value is truepublic java.lang.Boolean getRetainValuesAcrossFields()
Note that, when switching between fields that have an optionDataSource or valueMap, this property is ignored and the values are never retained.
public void setSaveOnEnter(java.lang.Boolean saveOnEnter) throws java.lang.IllegalStateException
FilterBuilder.search()
method.saveOnEnter
- Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getSaveOnEnter()
FilterBuilder.search()
method.public void setShowAddButton(java.lang.Boolean showAddButton) throws java.lang.IllegalStateException
showAddButton
- Default value is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowAddButton()
public void setShowFieldTitles(java.lang.Boolean showFieldTitles) throws java.lang.IllegalStateException
multiple DataSources
are
configured, multiDSFieldFormat
controls how
field names appear in the field drop-down.showFieldTitles
- Default value is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowFieldTitles()
multiple DataSources
are
configured, multiDSFieldFormat
controls how
field names appear in the field drop-down.public void setShowModeSwitcher(java.lang.Boolean showModeSwitcher) throws java.lang.IllegalStateException
topOperatorAppearance:"radio"
or
topOperatorAppearance:"bracket"
mode to be switch to the other view by the user. "radio" mode is considered
simple where "bracket" mode is advanced mode. Note that when switching from "bracket" to "radio" mode any entered
criteria will be flattened by calling DataSource.flattenCriteria()
. If the criteria cannot be flattened without losing symantics (see DataSource.canFlattenCriteria()
) the user is prompted to
confirm.
If showModeSwitcher is set and topOperatorAppearance is unset:
criteria
if any: advanced mode ("bracket") will be used if
AdvancedCriteria are provided which cannot be flattened without loss of data (see DataSource.canFlattenCriteria()
), otherwise simple mode
("radio") will be used. setCriteria()
after draw, the FilterBuilder will switch to advanced mode if the criteria cannot be shown in simple
mode without losing information, but will never automatically switch to simple mode, but an explicit call
setTopOperatorAppearance("radio")
can be
used to do so. showModeSwitcher
- Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdsetModeSwitcherSimpleMessage(java.lang.String)
,
setModeSwitcherAdvancedMessage(java.lang.String)
,
setModeSwitcherFlattenWarningMessage(java.lang.String)
public java.lang.Boolean getShowModeSwitcher()
topOperatorAppearance:"radio"
or
topOperatorAppearance:"bracket"
mode to be switch to the other view by the user. "radio" mode is considered
simple where "bracket" mode is advanced mode. Note that when switching from "bracket" to "radio" mode any entered
criteria will be flattened by calling DataSource.flattenCriteria()
. If the criteria cannot be flattened without losing symantics (see DataSource.canFlattenCriteria()
) the user is prompted to
confirm.
If showModeSwitcher is set and topOperatorAppearance is unset:
criteria
if any: advanced mode ("bracket") will be used if
AdvancedCriteria are provided which cannot be flattened without loss of data (see DataSource.canFlattenCriteria()
), otherwise simple mode
("radio") will be used. setCriteria()
after draw, the FilterBuilder will switch to advanced mode if the criteria cannot be shown in simple
mode without losing information, but will never automatically switch to simple mode, but an explicit call
setTopOperatorAppearance("radio")
can be
used to do so. getModeSwitcherSimpleMessage()
,
getModeSwitcherAdvancedMessage()
,
getModeSwitcherFlattenWarningMessage()
public void setShowRemoveButton(java.lang.Boolean showRemoveButton) throws java.lang.IllegalStateException
showRemoveButton
- Default value is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowRemoveButton()
public void setShowSelectionCheckbox(java.lang.Boolean showSelectionCheckbox) throws java.lang.IllegalStateException
appearance
. This checkbox allows the user to select individual
clauses so that, for example, clauses can be removed from the filterBuilder by application code. This property is
ignored for appearances other than "inline".showSelectionCheckbox
- Default value is falsejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowSelectionCheckbox()
appearance
. This checkbox allows the user to select individual
clauses so that, for example, clauses can be removed from the filterBuilder by application code. This property is
ignored for appearances other than "inline".public void setShowSubClauseButton(java.lang.Boolean showSubClauseButton) throws java.lang.IllegalStateException
TopOperatorAppearance
is "radio" or "inline", true in all other cases.showSubClauseButton
- Default value is See Descriptionjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowSubClauseButton()
TopOperatorAppearance
is "radio" or "inline", true in all other cases.public void setSortFields(java.lang.Boolean sortFields) throws java.lang.IllegalStateException
FieldPicker
items be sorted alphabetically in the drop down list.sortFields
- Default value is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getSortFields()
FieldPicker
items be sorted alphabetically in the drop down list.public IButton getSubClauseButton() throws java.lang.IllegalStateException
LogicalOperator
.
For an overview of how to use and configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public void setSubClauseButtonPrompt(java.lang.String subClauseButtonPrompt) throws java.lang.IllegalStateException
subClauseButtonPrompt
- Default value is "Add Subclause"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getSubClauseButtonPrompt()
public void setSubClauseButtonTitle(java.lang.String subClauseButtonTitle) throws java.lang.IllegalStateException
subClauseButtonTitle
- Default value is "+()"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getSubClauseButtonTitle()
public void setTopOperator(LogicalOperator topOperator)
May be able to be changed by the user via
the UI, according to TopOperatorAppearance
.
If this method is called after the component has been drawn/initialized:
Programmatically change the topOperator
for this FilterBuilder.
topOperator
- new top-level operator. Default value is "and"public LogicalOperator getTopOperator()
May be able to be changed by the user via
the UI, according to TopOperatorAppearance
.
public void setTopOperatorAppearance(TopOperatorAppearance topOperatorAppearance)
top-level operator
for
this FilterBuilder. See TopOperatorAppearance
for a list of options.
If this method is called after the component has been drawn/initialized:
Modify TopOperatorAppearance
at runtime.
Note that when changing from "bracket" to "radio" mode the criteria will be flattened by calling DataSource.flattenCriteria()
which could result in a logical change to the criteria.
topOperatorAppearance
- new topOperatorAppearance. Default value is "bracket"public TopOperatorAppearance getTopOperatorAppearance()
top-level operator
for
this FilterBuilder. See TopOperatorAppearance
for a list of options.
public DynamicForm getTopOperatorForm() throws java.lang.IllegalStateException
TopOperatorAppearance
"bracket" and "inline", a form that appears to the left of
the stack of clauses and allows picking the LogicalOperator
for the overall
FilterBuilder (or for that specific FilterClause, in the case of "inline") By default, consists of a CheckboxItem if
showSelectionCheckbox
is true, and a
simple SelectItem containing the available logical operators.
If this FilterBuilder shows nested sub-clauses, the same defaults will be applied to the top-operator item for each sub-clause.
For an overview of how to use and configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public SelectItem getTopOperatorItem() throws java.lang.IllegalStateException
topOperatorForm
. Developers may customize this item
using the standard autoChild pattern (by modifying topOperatorItemDefaults
and
topOperatorItemProperties
). If this FilterBuilder shows nested sub-clauses, the same defaults will be applied to the top-operator item for each sub-clause.
For an overview of how to use and configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public void setTopOperatorItemWidth(int topOperatorItemWidth) throws java.lang.IllegalStateException
topOperatorItem
autoChild.topOperatorItemWidth
- Default value is "*"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getTopOperatorItemWidth()
topOperatorItem
autoChild.public void setTopOperatorItemWidth(java.lang.String topOperatorItemWidth) throws java.lang.IllegalStateException
topOperatorItem
autoChild.topOperatorItemWidth
- Default value is "*"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getTopOperatorItemWidthAsString()
topOperatorItem
autoChild.public void setTopOperatorOptions(OperatorId... topOperatorOptions) throws java.lang.IllegalStateException
TopOperatorAppearance
s of "radio" and "bracket".
Note that this list may be further limited according to the available operators
returned by the DataSource
.
topOperatorOptions
- Default value is ["and", "or", "not"]java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic OperatorId[] getTopOperatorOptions()
TopOperatorAppearance
s of "radio" and "bracket".
Note that this list may be further limited according to the available operators
returned by the DataSource
.
public void setTopOperatorTitle(java.lang.String topOperatorTitle) throws java.lang.IllegalStateException
topOperatorForm
.topOperatorTitle
- Default value is "Clause Operator"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getTopOperatorTitle()
topOperatorForm
.public void setValidateOnChange(java.lang.Boolean validateOnChange) throws java.lang.IllegalStateException
FilterBuilder
by calling validate()
from your own code.validateOnChange
- Default value is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getValidateOnChange()
FilterBuilder
by calling validate()
from your own code.public void setValueItemWidth(java.lang.Integer valueItemWidth) throws java.lang.IllegalStateException
getValueFieldProperties()
for information on
customizing the value item.valueItemWidth
- Default value is 150java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Integer getValueItemWidth()
getValueFieldProperties()
for information on
customizing the value item.public void setValueItemWidth(java.lang.String valueItemWidth) throws java.lang.IllegalStateException
getValueFieldProperties()
for information on
customizing the value item.valueItemWidth
- Default value is 150java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getValueItemWidthAsString()
getValueFieldProperties()
for information on
customizing the value item.public void addClause(FilterClause filterClause)
FilterClause
to this FilterBuilder. This API is intended for the
rare use case of adding a highly customized FilterClause component that does not include the standard
field/operator/value picking interface, instead providing a custom interface and returning a criterion via FilterClause.getCriterion()
.
If you just want to
programmatically add a new FilterClause showing a specific Criterion use addCriterion()
.
If you want to use the standard
field/operator/value interface but provide a custom control for editing the value, see DataSource.addSearchOperator()
and Operator.editorType.
filterClause
- A FilterClause
instancepublic void addCriterion(Criterion criterion)
criterion
- new criterion to be addedpublic void clearCriteria()
public com.google.gwt.event.shared.HandlerRegistration addFilterChangedHandler(FilterChangedHandler handler)
Handler fired when there is a change() event fired on any FormItem within the filterBuilder.
addFilterChangedHandler
in interface HasFilterChangedHandlers
handler
- the filterChanged handlerHandlerRegistration
used to remove this handlerpublic java.lang.String getEditorType(DataSourceField field, OperatorId operatorId)
Default behavior is to use the Operator.editorType for a custom
operator, otherwise, use RelativeDateItem
for before/after/between
operators on date fields, otherwise, use the same editor as would be chosen by a SearchForm
.
field
- DataSourceField definitionoperatorId
- OperatorId
for the chosen operatorpublic FilterClause[] getSelectedClauses()
showSelectionCheckbox
property is set. This
method is only applicable where TopOperatorAppearance
is "inline" (because that is
the only appearance that supports showSelectionCheckbox
)public com.google.gwt.event.shared.HandlerRegistration addSearchHandler(SearchHandler handler)
A StringMethod that is automatically invoked if FilterBuilder.saveOnEnter
is set and the user presses Enter whilst in a text-item in any clause or subclause.
addSearchHandler
in interface HasSearchHandlers
handler
- the search handlerHandlerRegistration
used to remove this handlerpublic java.lang.Boolean validate()
public static void setDefaultProperties(FilterBuilder filterBuilderProperties)
Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
filterBuilderProperties
- properties that should be used as new defaults when instances of this class are createdSGWTProperties
protected void onInit_FilterBuilder()
public void setShowFieldTitles(boolean showFieldTitles) throws java.lang.IllegalStateException
showFieldTitles
- showFieldTitles default is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic void setDataSource(DataSource dataSource)
dataSource
- dataSource Default value is nullpublic DataSource getDataSource()
DSRequest
. Can be specified as either a DataSource instance or the String ID of a DataSource.
public void setCriteria(AdvancedCriteria criteria)
When initialized with criteria, appropriate clauses for editing the provided criteria will be automatically generated.
Note that empty or partial criteria are allowed, for example, criteria that
specify fieldName
only will generate an expression with the
operator not chosen yet, and a ${isc.DocUtils.linkForRef('object:Criterion')} with a logical operator ("and" or
"or") but not ${isc.DocUtils.linkForRef('criteria.criteria','subcriteria')} defined will generate an empty
subclause. Set new criteria for editing.
An interface for editing the provided criteria will be generated
identically to what happens when initialized with Criteria
.
Any existing criteria entered by the user will be discarded.
criteria
- new criteria. Pass null or {} to effectively reset the
filterBuilder to it's initial state when no criteria are
specified. Default value is nullpublic AdvancedCriteria getCriteria()
public AdvancedCriteria getCriteria(boolean includeEmptyValues)
By
- default if a user has selected a field and operator type, but has failed to enter a value for
the field it will be skipped. This optional parameter allows you to retrieve all criteria,
including those with an empty value attribute.public void removeClause(FilterClause clause)
clause
- clause as retrieved from filterBuilder.clausespublic Canvas[] getMembers()
Layout
layoutAlign
-- specifies the member's alignment along the breadth axis; valid values are "top", "center" and
"bottom" for a horizontal layout and "left", "center" and "right" for a vertical layout (see defaultLayoutAlign
for default implementation.)
showResizeBar
-- set to true to show a resize bar
(default is false) layout policy
.getMembers
in class Layout
public FormItem getValueFieldProperties(FieldType type, java.lang.String fieldName, OperatorId operatorId, ValueItemType itemType, java.lang.String fieldType)
Note that the valueType impacts when this method is called. For operators with valueType
"fieldType"
or "custom"
, a single value field is displayed. For operators with valueType
"valueRange"
two value-field items are displayed (one for the start and one for the end position). The
valueItemType
parameter may be used to determine which form item is being generated.
Note : This is an override point
type
- type of the DataSource field for this filter row. Note that for DataSourceSimpleTypeField
SimpleType
based DataSource fields this attribute will be nullfieldName
- name of the DataSource field for this filter rowoperatorId
- OperatorId
for the chosen operatoritemType
- What valueItem is being generated.fieldType
- type of the DataSource field for this filter row. Typically one would use the parameter but this value is useful when the
FieldType
is a custom SimpleType in which case the type will be FieldType.CUSTOM
and this parameter is the name of the SimpleTypepublic void setFieldOperatorCustomizer(FieldOperatorCustomizer customizer)
customizer
- the customizer to execute.public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.form.FilterBuilderLogicalStructure s)
LogicalStructure
interface,
which supports Eclipse's logical structure debugging facility.public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
LogicalStructure
interface,
which supports Eclipse's logical structure debugging facility.getLogicalStructure
in interface LogicalStructure
getLogicalStructure
in class Layout