public abstract class RadChartViewBase<T extends ChartSeries> extends View implements ChartView, LegendInfoProvider, GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, ChartScaleGestureDetector.OnScaleGestureListener
View.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.MeasureSpec, View.OnApplyWindowInsetsListener, View.OnAttachStateChangeListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VISIBLE, X, Y, Z
Constructor and Description |
---|
RadChartViewBase(Context context,
AttributeSet attrs)
Initializes a new instance of the
RadChartViewBase class with passed Context and
attribute set as arguments. |
RadChartViewBase(Context context,
AttributeSet attrs,
int defStyle)
Initializes a new instance of the
RadChartViewBase class with passed Context ,
attribute set and def style as arguments. |
Modifier and Type | Method and Description |
---|---|
void |
addOnDrawListener(DrawListener listener) |
void |
beginUpdate()
Begins an update block during which the chart will not automatically update itself.
|
ChartAreaModel |
chartAreaModel()
Gets the current chart area.
|
RadPoint |
clampTranslate(RadPoint translate,
RadSize newZoom)
|
RadSize |
clampZoom(double width,
double height) |
abstract ChartAreaModel |
createChartAreaModel()
Creates the model of the plot area.
|
void |
endUpdate()
Ends the update block and forces one redraw of the chart asynchronously.
|
void |
endUpdate(boolean asynchronous)
Ends the update block and forces one redraw of the chart either synchronously or asynchronously.
|
String |
generateEmptyContent()
Generates a string holding information about the load state of the chart area.
It either returns the reasons if a chart area failed to load or the state of the series
and the data inside the plot area.
|
ChartBehaviorCollection |
getBehaviors()
Gets a collection of chart behaviors. For example a ChartToolTipBehavior can
be added to this collection which will enable tooltips on certain gestures.
|
ChartAreaModel |
getChartArea()
Gets the current chart area.
|
int |
getCollectionIndex()
Gets the index of this presenter in its parent
PresenterCollection . |
ChartDataContext |
getDataContext(DataPoint point) |
ChartDataContext |
getDataContext(Point physicalOrigin)
Gets the data context that corresponds to the given physical point.
|
ChartDataContext |
getDataContext(Point physicalOrigin,
boolean measureInOneDimension)
Gets the data context that corresponds to the given physical point.
|
Object |
getEmptyContent()
Gets the content to be displayed when the chart is either not properly initialized or if
it's missing data.
|
int |
getHoldDelay() |
RadSize |
getMaxZoom()
Gets the maximum allowed zoom for this instance.
|
ChartPalette |
getPalette() |
RadPoint |
getPanOffset()
Gets the current pan offset.
|
double |
getPanOffsetX()
Gets the x-coordinate of the top-left corner where the layout should start from.
|
double |
getPanOffsetY()
Gets the y-coordinate of the top-left corner where the layout should start from.
|
RadRect |
getPlotAreaClip()
Gets the rect that encloses the plot area in view coordinates - that is without the zoom
factor applied and with the pan offset calculated.
|
ChartPalette |
getSelectionPalette() |
PresenterCollection<T> |
getSeries()
Gets the collection containing all the series presented by this instance.
|
double |
getViewportHeight()
Gets the visible height of the widget view.
|
double |
getViewportWidth()
Gets the visible width of the widget view.
|
RadSize |
getZoom()
Gets the current zoom (scale) of the chart.
|
double |
getZoomHeight()
Gets the current scale applied along the vertical direction.
|
double |
getZoomWidth()
Gets the current scale applied along the horizontal direction.
|
void |
invalidatePalette()
Forces re-evaluation of the palette of this instance.
|
boolean |
isClipToBounds()
Gets the value indicating whether the chart content will be clipped to the control's bounds.
|
RadSize |
measureContent(ChartNode owner,
Object content)
Retrieves the desired size of the specified logical node's content.
|
void |
onBehaviorsCollectionChanging(BehaviorCollectionChangedInfo info)
Used to respond to a change in the collection of behaviours.
|
boolean |
onDoubleTap(MotionEvent e) |
boolean |
onDoubleTapEvent(MotionEvent e) |
boolean |
onDown(MotionEvent e) |
boolean |
onFling(MotionEvent e1,
MotionEvent e2,
float velocityX,
float velocityY) |
void |
onLongPress(MotionEvent e) |
void |
onPresenterAdded(ChartElementPresenter presenter)
Used to handle the addition of a new presenter.
|
void |
onPresenterRemoved(ChartElementPresenter presenter)
Used to remove and detach a given presenter from the chart.
|
boolean |
onScale(ChartScaleGestureDetector detector)
Responds to scaling events for a gesture in progress.
|
boolean |
onScaleBegin(ChartScaleGestureDetector detector)
Responds to the beginning of a scaling gesture.
|
void |
onScaleEnd(ChartScaleGestureDetector detector)
Responds to the end of a scale gesture.
|
boolean |
onScroll(MotionEvent e1,
MotionEvent e2,
float distanceX,
float distanceY) |
void |
onShowPress(MotionEvent e) |
boolean |
onSingleTapConfirmed(MotionEvent e) |
boolean |
onSingleTapUp(MotionEvent e) |
boolean |
onTouchEvent(MotionEvent event) |
ChartElementPresenter |
presenterImpl() |
List<? extends ChartElementPresenter> |
presenters() |
void |
refreshNode(ChartNode node)
Invalidates the visual representation of the specified logical node.
|
void |
removeOnDrawListener(DrawListener listener) |
void |
requestInvalidateArrange()
Makes arrangements that precede an invalidation.
|
void |
requestRender()
Used to redraw the chart elements.
|
void |
resetBehaviors() |
void |
setChartPadding(float padding)
Sets uniform padding on the chart.
|
void |
setChartPadding(float left,
float top,
float right,
float bottom)
Used to set the padding of every side of the chart.
|
void |
setClipToBounds(boolean value)
Sets the value indicating whether the chart content will be clipped to the control's bounds.
|
void |
setEmptyContent(Object value)
Sets the content to be displayed when the chart is either not properly initialized or if
it's missing data.
|
void |
setHoldDelay(int milliseconds) |
void |
setMaxZoom(RadSize value)
Gets the maximum allowed zoom for this instance.
|
void |
setPalette(ChartPalette value) |
void |
setPanOffset(double x,
double y) |
void |
setPanOffset(RadPoint value)
Sets the current pan offset.
|
void |
setSelectionPalette(ChartPalette value) |
void |
setSeries(PresenterCollection<T> newSeries)
Sets the collection containing all the series presented by this instance.
|
void |
setZoom(double width,
double height) |
void |
setZoom(RadSize newZoom)
Used to set the current zoom and to trigger the
onZoomChanged() method of the
current instance. |
void |
sortPresenters()
Used to arrange all views according to their Z-Index and then rearrange them on the
render surface.
|
StackedSeriesContext |
stackedSeriesContext()
Gets the stacked series context.
|
void |
validateBehaviourSupport(ChartBehavior behavior)
Makes sure the current chart instance supports a specific behavior.
|
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchProvideStructure, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, drawableHotspotChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityClassName, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLegendInfos
public RadChartViewBase(Context context, AttributeSet attrs)
RadChartViewBase
class with passed Context
and
attribute set as arguments.context
- context to be used.attrs
- attributes to be used.public RadChartViewBase(Context context, AttributeSet attrs, int defStyle)
RadChartViewBase
class with passed Context
,
attribute set and def style as arguments.context
- context to be used.attrs
- attributes to be used.defStyle
- def style to be used.public int getHoldDelay()
public void setHoldDelay(int milliseconds)
public PresenterCollection<T> getSeries()
public void setSeries(PresenterCollection<T> newSeries)
newSeries
- the new collection of series.public void addOnDrawListener(DrawListener listener)
public void removeOnDrawListener(DrawListener listener)
public ChartElementPresenter presenterImpl()
public List<? extends ChartElementPresenter> presenters()
public StackedSeriesContext stackedSeriesContext()
public void validateBehaviourSupport(ChartBehavior behavior)
behavior
- the behaviour to be checked.public void requestRender()
public double getViewportWidth()
ChartView
getViewportWidth
in interface ChartView
public double getViewportHeight()
ChartView
getViewportHeight
in interface ChartView
public void requestInvalidateArrange()
public double getZoomWidth()
ChartView
getZoomWidth
in interface ChartView
public double getZoomHeight()
ChartView
getZoomHeight
in interface ChartView
public double getPanOffsetX()
ChartView
getPanOffsetX
in interface ChartView
public double getPanOffsetY()
ChartView
getPanOffsetY
in interface ChartView
public RadRect getPlotAreaClip()
ChartView
getPlotAreaClip
in interface ChartView
public void onPresenterAdded(ChartElementPresenter presenter)
presenter
- the new presenter to be added.public ChartAreaModel getChartArea()
public ChartPalette getSelectionPalette()
public void setSelectionPalette(ChartPalette value)
public void sortPresenters()
public ChartAreaModel chartAreaModel()
public boolean isClipToBounds()
public void setClipToBounds(boolean value)
value
- the new value for the clip to bounds.public void beginUpdate()
endUpdate()
method is
used to end this update block and causes the chart to redraw itself once to reflect the changes made during the update block.
The beginUpdate() endUpdate() block should be used as a performance improvement if the chart has to be updated several times in a row.public void endUpdate(boolean asynchronous)
public void endUpdate()
public Object getEmptyContent()
public void setEmptyContent(Object value)
value
- the new empty content.public void setChartPadding(float left, float top, float right, float bottom)
left
- padding on the left side.top
- padding on the top side.right
- padding on the right side.bottom
- padding on the bottom side.public void setChartPadding(float padding)
padding
- The padding to set.public void onPresenterRemoved(ChartElementPresenter presenter)
presenter
- presenter to be removed.public String generateEmptyContent()
public abstract ChartAreaModel createChartAreaModel()
public RadSize getZoom()
public RadSize getMaxZoom()
public void setMaxZoom(RadSize value)
value
- the new maximum zoom.public RadPoint getPanOffset()
public void setPanOffset(RadPoint value)
value
- the new pan offset.public void setPanOffset(double x, double y)
public RadPoint clampTranslate(RadPoint translate, RadSize newZoom)
translate
- the point to be translated.newZoom
- the new zoom to be used when translating the point.public void setZoom(RadSize newZoom)
onZoomChanged()
method of the
current instance.newZoom
- the new zoom.public void setZoom(double width, double height)
public RadSize clampZoom(double width, double height)
public ChartBehaviorCollection getBehaviors()
public ChartDataContext getDataContext(Point physicalOrigin)
physicalOrigin
- point to be used in determining the data context.public ChartDataContext getDataContext(Point physicalOrigin, boolean measureInOneDimension)
physicalOrigin
- point to be used in determining the data context.measureInOneDimension
- Determines whether to measure distance in both dimensions or in one direction according to associated primary axis location.public ChartDataContext getDataContext(DataPoint point)
public void onBehaviorsCollectionChanging(BehaviorCollectionChangedInfo info)
info
- instance holding the type of action that occurred in the collection.public void resetBehaviors()
public boolean onDown(MotionEvent e)
onDown
in interface GestureDetector.OnGestureListener
public void onShowPress(MotionEvent e)
onShowPress
in interface GestureDetector.OnGestureListener
public boolean onSingleTapUp(MotionEvent e)
onSingleTapUp
in interface GestureDetector.OnGestureListener
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
onScroll
in interface GestureDetector.OnGestureListener
public void onLongPress(MotionEvent e)
onLongPress
in interface GestureDetector.OnGestureListener
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
onFling
in interface GestureDetector.OnGestureListener
public boolean onSingleTapConfirmed(MotionEvent e)
onSingleTapConfirmed
in interface GestureDetector.OnDoubleTapListener
public boolean onDoubleTap(MotionEvent e)
onDoubleTap
in interface GestureDetector.OnDoubleTapListener
public boolean onDoubleTapEvent(MotionEvent e)
onDoubleTapEvent
in interface GestureDetector.OnDoubleTapListener
public boolean onTouchEvent(@NonNull MotionEvent event)
onTouchEvent
in class View
public boolean onScale(ChartScaleGestureDetector detector)
ChartScaleGestureDetector.OnScaleGestureListener
onScale
in interface ChartScaleGestureDetector.OnScaleGestureListener
detector
- The detector reporting the event - use this to
retrieve extended info about event state.public boolean onScaleBegin(ChartScaleGestureDetector detector)
ChartScaleGestureDetector.OnScaleGestureListener
onScaleBegin
in interface ChartScaleGestureDetector.OnScaleGestureListener
detector
- The detector reporting the event - use this to
retrieve extended info about event state.public void onScaleEnd(ChartScaleGestureDetector detector)
ChartScaleGestureDetector.OnScaleGestureListener
ChartScaleGestureDetector.getFocusX()
and ChartScaleGestureDetector.getFocusY()
will return focal point
of the pointers remaining on the screen.onScaleEnd
in interface ChartScaleGestureDetector.OnScaleGestureListener
detector
- The detector reporting the event - use this to
retrieve extended info about event state.public ChartPalette getPalette()
public void setPalette(ChartPalette value)
public void refreshNode(ChartNode node)
ChartElementPresenter
refreshNode
in interface ChartElementPresenter
node
- the node to be refreshed.public RadSize measureContent(ChartNode owner, Object content)
ChartElementPresenter
measureContent
in interface ChartElementPresenter
owner
- node that holds the content.content
- content of the node.public void invalidatePalette()
ChartElementPresenter
invalidatePalette
in interface ChartElementPresenter
public int getCollectionIndex()
ChartElementPresenter
PresenterCollection
.getCollectionIndex
in interface ChartElementPresenter
PresenterCollection
.