Class WAxisSliderWidget
WCartesianChart.
Note: This widget currently only works with the HtmlCanvas rendering method.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Field Summary
Fields inherited from class eu.webtoolkit.jwt.WInteractWidget
dragTouchEndSlot_, dragTouchSlot_, noDefaultFields inherited from class eu.webtoolkit.jwt.WWidget
WT_GETEXTRAMS_JS -
Constructor Summary
ConstructorsConstructorDescriptionCreates an axis slider widget.WAxisSliderWidget(WDataSeries series) Creates an axis slider widget.WAxisSliderWidget(WDataSeries series, WContainerWidget parentContainer) Creates an axis slider widget.WAxisSliderWidget(WContainerWidget parentContainer) Creates an axis slider widget. -
Method Summary
Modifier and TypeMethodDescriptionReturns the background brush.Returns the brush to draw the handles left and right of the selected area with.Returns the brush for the selected area.Returns the pen to draw the selected part of the data series with.intgetSelectionAreaPadding(Side side) Returns the internal margin for the selection area.Returns the pen to draw the data series with.booleanReturns whether chart layout is computed automatically.booleanReturns whether the X axis tick labels are drawn.booleanReturns whether the Y axis of the associated chart should be updated to fit the series.protected voidpaintEvent(WPaintDevice paintDevice) Paints the widget.voidremove()Destructor.protected voidrender(EnumSet<RenderFlag> flags) Renders the widget.final voidConfigures the axis slider layout to be automatic.voidsetAutoLayoutEnabled(boolean enabled) Configures the axis slider layout to be automatic.voidsetBackground(WBrush brush) Set the background brush.voidsetHandleBrush(WBrush brush) Set the brush to draw the handles left and right of the selected area with.final voidSet whether to draw the X axis tick labels on the slider widget.voidsetLabelsEnabled(boolean enabled) Set whether to draw the X axis tick labels on the slider widget.voidsetSelectedAreaBrush(WBrush brush) Set the brush for the selected area.voidsetSelectedSeriesPen(WPen pen) Set the pen to draw the selected part of the data series with.final voidsetSelectionAreaPadding(int padding) Sets an internal margin for the selection area.final voidsetSelectionAreaPadding(int padding, Side side, Side... sides) Sets an internal margin for the selection area.voidsetSelectionAreaPadding(int padding, EnumSet<Side> sides) Sets an internal margin for the selection area.voidsetSeries(WDataSeries series) voidsetSeriesPen(WPen pen) Set the pen to draw the data series with.final voidSet whether the Y axis of the associated chart should be updated to fit the series.voidsetYAxisZoomEnabled(boolean enabled) Set whether the Y axis of the associated chart should be updated to fit the series.Methods inherited from class eu.webtoolkit.jwt.WPaintedWidget
addArea, createDomElement, createJSBrush, createJSPainterPath, createJSPen, createJSPoint, createJSRect, createJSText, createJSTransform, enableAjax, getArea, getAreas, getBotResourceId, getCreatePaintDevice, getDomChanges, getMethod, getObjJsRef, getPreferredMethod, getRepaintSlot, insertArea, layoutSizeChanged, refresh, removeArea, resize, setBotResourceId, setFormData, setPreferredMethod, update, update, updateMethods inherited from class eu.webtoolkit.jwt.WInteractWidget
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, getMouseOverDelay, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, propagateSetEnabled, setDraggable, setDraggable, setDraggable, setDraggable, setMouseOverDelay, setPopup, touchEnded, touchMoved, touchStarted, unsetDraggableMethods inherited from class eu.webtoolkit.jwt.WWebWidget
addStyleClass, beingDeleted, blurred, callJavaScriptMember, childrenChanged, doJavaScript, escapeText, escapeText, escapeText, escapeText, find, findById, focussed, formDataChanged, getAttributeValue, getBaseZIndex, getChildren, getClearSides, getDecorationStyle, getFloatSide, getHeight, getHtmlTagName, getId, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getOffset, getPositionScheme, getScrollVisibilityMargin, getStyleClass, getTabIndex, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, hasFocus, hasStyleClass, hideToolTip, isCanReceiveFocus, isDisabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isRendered, isScrollVisibilityEnabled, isScrollVisible, isSetFirstFocus, isThemeStyleEnabled, isVisible, iterateChildren, jsStringLiteral, jsStringLiteral, manageWidget, parentResized, parentResized, propagateSetVisible, removeScript, removeStyleClass, resendFormData, scrollVisibilityChanged, setAttributeValue, setBaseZIndex, setCanReceiveFocus, setClearSides, setDecorationStyle, setDeferredToolTip, setDisabled, setFlexBox, setFloatSide, setFocus, setHidden, setHiddenKeepsGeometry, setHtmlTagName, setId, setInline, setJavaScriptMember, setLineHeight, setLoadLaterWhenInvisible, setMargin, setMaximumSize, setMinimumSize, setObjectName, setOffsets, setParentWidget, setPositionScheme, setScrollVisibilityEnabled, setScrollVisibilityMargin, setSelectable, setStyleClass, setTabIndex, setThemeStyleEnabled, setToolTip, setVerticalAlignment, showToolTip, showToolTipOnHover, unescapeText, updateSignalConnection, voidEventSignal, widgetAdded, widgetRemovedMethods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addJSignal, addStyleClass, animateHide, animateShow, applyThemeStyles, boxBorder, boxPadding, createJavaScript, disable, dropEvent, enable, getDropTouch, getJsRef, getParent, hide, htmlText, isExposed, isGlobalWidget, isLayoutSizeAware, needsRerender, positionAt, positionAt, positionAt, positionAt, removeFromParent, removeStyleClass, removeWidget, render, resize, scheduleRender, scheduleRender, scheduleRender, scheduleThemeStyleApply, setClearSides, setDeferredToolTip, setFocus, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, trMethods inherited from class eu.webtoolkit.jwt.WObject
getObjectName
-
Constructor Details
-
WAxisSliderWidget
Creates an axis slider widget.Creates an axis slider widget that is not associated with a chart. Before it is used, a chart should be assigned with setChart(), and a series column chosen with setSeriesColumn().
-
WAxisSliderWidget
public WAxisSliderWidget()Creates an axis slider widget. -
WAxisSliderWidget
Creates an axis slider widget.Creates an axis slider widget associated with the given data series of the given chart.
-
WAxisSliderWidget
Creates an axis slider widget.
-
-
Method Details
-
remove
public void remove()Destructor.- Overrides:
removein classWPaintedWidget- See Also:
-
setSeries
-
setSeriesPen
Set the pen to draw the data series with. -
getSeriesPen
Returns the pen to draw the data series with. -
setSelectedSeriesPen
Set the pen to draw the selected part of the data series with.If not set, this defaults to
getSeriesPen(). -
getSelectedSeriesPen
Returns the pen to draw the selected part of the data series with. -
setHandleBrush
Set the brush to draw the handles left and right of the selected area with. -
getHandleBrush
Returns the brush to draw the handles left and right of the selected area with. -
setBackground
Set the background brush. -
getBackground
Returns the background brush. -
setSelectedAreaBrush
Set the brush for the selected area. -
getSelectedAreaBrush
Returns the brush for the selected area. -
setSelectionAreaPadding
Sets an internal margin for the selection area.This configures the area (in pixels) around the selection area that is available for the axes and labels, and the handles.
Alternatively, you can configure the chart layout to be computed automatically using
setAutoLayoutEnabled().- See Also:
-
setSelectionAreaPadding
Sets an internal margin for the selection area.Calls
setSelectionAreaPadding(padding, EnumSet.of(side, sides)) -
setSelectionAreaPadding
public final void setSelectionAreaPadding(int padding) Sets an internal margin for the selection area. -
getSelectionAreaPadding
Returns the internal margin for the selection area.This is either the padding set through
setSelectionAreaPadding()or computed usingsetAutoLayoutEnabled(). -
setAutoLayoutEnabled
public void setAutoLayoutEnabled(boolean enabled) Configures the axis slider layout to be automatic.This configures the selection area so that the space around it is suited for the text that is rendered.
-
setAutoLayoutEnabled
public final void setAutoLayoutEnabled()Configures the axis slider layout to be automatic. -
isAutoLayoutEnabled
public boolean isAutoLayoutEnabled()Returns whether chart layout is computed automatically.- See Also:
-
setLabelsEnabled
public void setLabelsEnabled(boolean enabled) Set whether to draw the X axis tick labels on the slider widget.AxisProperty::Labels are enabled by default.
-
setLabelsEnabled
public final void setLabelsEnabled()Set whether to draw the X axis tick labels on the slider widget.Calls
setLabelsEnabled(true) -
isLabelsEnabled
public boolean isLabelsEnabled()Returns whether the X axis tick labels are drawn.- See Also:
-
setYAxisZoomEnabled
public void setYAxisZoomEnabled(boolean enabled) Set whether the Y axis of the associated chart should be updated to fit the series.Y axis zoom is enabled by default.
-
setYAxisZoomEnabled
public final void setYAxisZoomEnabled()Set whether the Y axis of the associated chart should be updated to fit the series. -
isYAxisZoomEnabled
public boolean isYAxisZoomEnabled()Returns whether the Y axis of the associated chart should be updated to fit the series.- See Also:
-
getSeries
-
render
Description copied from class:WWidgetRenders the widget.This function renders the widget (or an update for the widget), after this has been scheduled using
scheduleRender().The default implementation will render the widget by serializing changes to JavaScript and HTML. You may want to reimplement this widget if you have been postponing some of the layout / rendering implementation until the latest moment possible. In that case you should make sure you call the base implementation however.
- Overrides:
renderin classWPaintedWidget
-
paintEvent
Description copied from class:WPaintedWidgetPaints the widget.You should reimplement this method to paint the contents of the widget, using the given paintDevice.
- Specified by:
paintEventin classWPaintedWidget
-