com.supermap.mapping.dyn

Class DynamicView

  • java.lang.Object
    • android.view.View
      • com.supermap.mapping.dyn.DynamicView
  • All Implemented Interfaces:
    android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback


    public class DynamicView
    extends android.view.View
    The dynamic layer control.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class android.view.View

        android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
    • Field Summary

      • Fields inherited from class android.view.View

        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, 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_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_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VISIBLE, X, Y
    • Constructor Summary

      Constructors 
      Constructor and Description
      DynamicView(android.content.Context context, Map map)
      The dynamic layer constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addElement(DynamicElement element)
      Adds the dynamic object.
      void clear()
      Clears the dynamic object.
      void continuAnimation()
      continue animation (all elements)
      void dispose()
      Disposes resources.
      android.view.GestureDetector getGestureDetector()
      Gets the gesture detector that users customize
      float GetHitTestTolerance()
      Gets the tolerance selected by the dynamic object.
      int getIndex()
      Gets the index of the current dynamic layer.
      int getViewAlpha()
      Returns the object transparency of the dynamic layer.
      boolean isAllNamesVisible()
      Obtains whether display all names of objects.
      boolean isAutoSort()
      Whether to sort
      boolean isCacheEnabled()
      Returns whether to enable the cache mode
      boolean isElementAvoid()
      Whether to enable the avoiding effect
      boolean isPolymerize()
      Gets whether to open the aggregation function.
      boolean isVisible()
      Returns whether the dynamic layer is visibility
      boolean moveBottom()
      Move the dynamic layer to the bottom
      boolean moveDown()
      Move the dynamic layer down
      boolean moveTo(int index)
      Moves the dynamic layer to the specified index.
      boolean moveTop()
      Move the dynamic layer to the top
      boolean moveUp()
      Move the dynamic layer up
      void pauseAnimation()
      pause animation (all elements)
      DynamicElement query(int id)
      Gets the dynamic data by the given ID.
      java.util.List<DynamicElement> query(int[] ids)
      Queries the data in quadtree by ID array.
      java.util.List<DynamicElement> query(Rectangle2D bounds)
      Queries the data in quadtree by bounds.
      java.util.List<DynamicElement> queryByTag(java.lang.String tag)
      According to the label query dynamic object, return the dynamic object list containing the same label.
      void refresh()
      Refreshes the dynamic layer.
      int removeByTag(java.lang.String tag)
      Removes the dynamic object according to the label and returns the object number.
      boolean removeElement(DynamicElement element)
      Removes the dynamic object.
      boolean removeElement(int id)
      Removes the dynamic object.
      Bitmap screenShot() 
      void setAllNamesVisible(boolean visible)
      Sets whether display all names of dynamic objects.
      void setAutoSort(boolean enable)
      Allow the dynamic layer object to sort according to the size.
      void setCacheEnabled(boolean enabled)
      Sets whether to enable the cache mode to improve the display efficiency of dynamic layer in big data
      void setElementAvoid(boolean mIsElementAvoid)
      Enables Avoid
      void setGestureDetector(android.view.GestureDetector gsDetector)
      Sets the gesture detector.
      void setHitTestTolerance(float tolerance)
      Sets the tolerance selected by the dynamic object.
      void setPolymerize(boolean value)
      Sets whether to open the aggregation function.
      void setViewAlpha(int value)
      Sets the object transparency of the dynamic layer. 0~255 is valid.
      void setVisible(boolean value)
      Sets whether the dynamic layer is visibility
      void startAnimation()
      Starts the animation.
      void stopAnimation()
      stop animation (all elements)
      • Methods inherited from class android.view.View

        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, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewsWithText, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getCameraDistance, getClipBounds, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, 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, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, 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, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DynamicView

        public DynamicView(android.content.Context context,
                           Map map)
        The dynamic layer constructor.
        Parameters:
        context - android context environment.
        map - map.
    • Method Detail

      • addElement

        public void addElement(DynamicElement element)
        Adds the dynamic object.
        Parameters:
        element - dynamic object.
      • clear

        public void clear()
        Clears the dynamic object.
      • query

        public java.util.List<DynamicElement> query(Rectangle2D bounds)
        Queries the data in quadtree by bounds.
        Parameters:
        bounds - query range
        Returns:
        The query results
      • removeElement

        public boolean removeElement(DynamicElement element)
        Removes the dynamic object.
        Parameters:
        element - dynamic object.
        Returns:
        True, if successful; Otherwise false.
      • removeElement

        public boolean removeElement(int id)
        Removes the dynamic object.
        Parameters:
        id - dynamic object ID.
        Returns:
        True, if successful; Otherwise false.
      • query

        public java.util.List<DynamicElement> query(int[] ids)
        Queries the data in quadtree by ID array.
        Parameters:
        ids - ID array.
        Returns:
        The query results
      • query

        public DynamicElement query(int id)
        Gets the dynamic data by the given ID.
        Parameters:
        id - object ID.
        Returns:
        The query results
      • getGestureDetector

        public android.view.GestureDetector getGestureDetector()
        Gets the gesture detector that users customize
        Returns:
        The action gesture.
      • setGestureDetector

        public void setGestureDetector(android.view.GestureDetector gsDetector)
        Sets the gesture detector.
        Parameters:
        gsDetector - the listener invoked for all the callbacks, this must not be null?
      • setHitTestTolerance

        public void setHitTestTolerance(float tolerance)
        Sets the tolerance selected by the dynamic object.
        Parameters:
        tolerance - the tolerance selected by the dynamic object.
      • GetHitTestTolerance

        public float GetHitTestTolerance()
        Gets the tolerance selected by the dynamic object.
        Returns:
        The tolerance selected by the dynamic object.
      • isPolymerize

        public boolean isPolymerize()
        Gets whether to open the aggregation function.
        Returns:
        True, if successful; Otherwise false.
      • setPolymerize

        public void setPolymerize(boolean value)
        Sets whether to open the aggregation function.
        Parameters:
        value - Specifies whether to open the aggregation function.
      • refresh

        public void refresh()
        Refreshes the dynamic layer.
      • startAnimation

        public void startAnimation()
        Starts the animation.
      • pauseAnimation

        public void pauseAnimation()
        pause animation (all elements)
      • continuAnimation

        public void continuAnimation()
        continue animation (all elements)
      • stopAnimation

        public void stopAnimation()
        stop animation (all elements)
      • setCacheEnabled

        public void setCacheEnabled(boolean enabled)
        Sets whether to enable the cache mode to improve the display efficiency of dynamic layer in big data
        Parameters:
        enabled - Whether to enable the cache mode
      • isCacheEnabled

        public boolean isCacheEnabled()
        Returns whether to enable the cache mode
        Returns:
        boolean Whether to enable the cache mode
      • setAutoSort

        public void setAutoSort(boolean enable)
        Allow the dynamic layer object to sort according to the size.
        Parameters:
        enable - Whether to sort. true means sort; otherwise, false.
      • isAutoSort

        public boolean isAutoSort()
        Whether to sort
        Returns:
        Whether to sort. true means sort; otherwise, false.
      • moveUp

        public boolean moveUp()
        Move the dynamic layer up
        Returns:
        True, if successful; Otherwise false.
      • moveDown

        public boolean moveDown()
        Move the dynamic layer down
        Returns:
        True, if successful; Otherwise false.
      • moveTop

        public boolean moveTop()
        Move the dynamic layer to the top
        Returns:
        True, if successful; Otherwise false.
      • moveBottom

        public boolean moveBottom()
        Move the dynamic layer to the bottom
        Returns:
        True, if successful; Otherwise false.
      • setVisible

        public void setVisible(boolean value)
        Sets whether the dynamic layer is visibility
        Parameters:
        value - A boolean, true means to set the dynamic layer is visible; otherwise, false.
      • isVisible

        public boolean isVisible()
        Returns whether the dynamic layer is visibility
        Returns:
        boolean A boolean, true means the dynamic layer is visible; otherwise, false.
      • queryByTag

        public java.util.List<DynamicElement> queryByTag(java.lang.String tag)
        According to the label query dynamic object, return the dynamic object list containing the same label.
        Parameters:
        tag - Label. The string type.
        Returns:
        Returns the dynamic object list containing the same label.
      • removeByTag

        public int removeByTag(java.lang.String tag)
        Removes the dynamic object according to the label and returns the object number.
        Parameters:
        tag - tag string.
        Returns:
        Returns the number of removed objects.
      • moveTo

        public boolean moveTo(int index)
        Moves the dynamic layer to the specified index.
        Parameters:
        index - The specified index.
        Returns:
        a boolean, true means successful; otherwise, false.
      • getIndex

        public int getIndex()
        Gets the index of the current dynamic layer.
        Returns:
        The index of the current dynamic layer.
      • setViewAlpha

        public void setViewAlpha(int value)
        Sets the object transparency of the dynamic layer. 0~255 is valid.
        Parameters:
        value - object transparency.
      • getViewAlpha

        public int getViewAlpha()
        Returns the object transparency of the dynamic layer.
        Returns:
        boolean a boolean, true means the object is transparent; otherwise, false.
      • setAllNamesVisible

        public void setAllNamesVisible(boolean visible)
        Sets whether display all names of dynamic objects.
        Parameters:
        visible - whether the names of dynamic objects are visible, default false, display according to the property, otherwise, display.
      • isAllNamesVisible

        public boolean isAllNamesVisible()
        Obtains whether display all names of objects.
        Returns:
        return whether display all objects names, yes, return true, otherwise, false.
      • dispose

        public void dispose()
        Disposes resources.
      • isElementAvoid

        public boolean isElementAvoid()
        Whether to enable the avoiding effect
        Returns:
        false
      • setElementAvoid

        public void setElementAvoid(boolean mIsElementAvoid)
        Enables Avoid
        Parameters:
        mIsElementAvoid -
      • screenShot

        public Bitmap screenShot()