public class DiagramView
extends android.view.ViewGroup
Diagram
object.android.view.ViewGroup.LayoutParams, android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
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.OnContextClickListener, 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.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
Modifier and Type | Field and Description |
---|---|
static float |
densityMultiplier |
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
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, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, 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, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, 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, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, 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, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, 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, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
Constructor and Description |
---|
DiagramView(android.content.Context context)
Initializes a new instance of the DiagramView class.
|
DiagramView(android.content.Context context,
android.util.AttributeSet attributes) |
Modifier and Type | Method and Description |
---|---|
void |
adoptHostedControls(boolean onlyUnparented)
Adopts controls hosted in other views and moves them to this view.
|
void |
beginEdit(DiagramItem diagItem,
InplaceEditable item,
android.graphics.PointF pointerPosition)
Enters inplace-edit mode, letting the user edit the text of the specified item.
|
void |
beginEdit(InplaceEditable item)
Enters inplace-edit mode, letting the user edit the text of the specified item.
|
void |
beginEdit(InplaceEditable item,
android.graphics.PointF pointerPosition) |
void |
bringIntoView(DiagramItem item)
Scrolls the viewport so that the specified item will be visible.
|
void |
cancelDrag() |
android.graphics.RectF |
canvasToDoc(android.graphics.Rect devRect) |
protected int |
computeHorizontalScrollRange() |
protected int |
computeVerticalScrollRange() |
boolean |
copyToClipboard()
Copies the current selection of items to the system clipboard.
|
boolean |
copyToClipboard(boolean groups)
Copies the current selection of items to the system clipboard.
|
boolean |
cutToClipboard()
Cuts the currently selected items to the system clipboard.
|
boolean |
cutToClipboard(boolean groups)
Cuts the currently selected items to the system clipboard.
|
android.graphics.PointF |
deviceToDoc(int x,
int y)
Transforms points from the client coordinate space to the document coordinate space.
|
android.graphics.PointF |
deviceToDoc(android.graphics.Point devPoint)
Transforms points from the client coordinate space to the document coordinate space.
|
android.graphics.RectF |
deviceToDoc(android.graphics.Rect devRect)
Transforms points from the client coordinate space to the document coordinate space.
|
void |
disableInteractionBuffer() |
android.graphics.Point |
docToDevice(android.graphics.PointF docPoint)
Transforms points from the document coordinate space to the device coordinate space.
|
android.graphics.Rect |
docToDevice(android.graphics.RectF docRect)
Transforms points from the document coordinate space to the device coordinate space.
|
void |
endEdit(boolean accept)
Exits inplace-edit mode and either accepts or rejects the changes made to the item's text.
|
boolean |
getAllowInplaceEdit()
Gets a value indicating whether users are allowed
to edit the text of diagram items.
|
SmoothingMode |
getAntiAlias()
Gets the current anti-aliasing mode for non text objects.
|
boolean |
getAutoScroll()
Gets a value indicating whether the diagram will scroll automatically
when the pointer is dragged towards the edge of the view.
|
Behavior |
getBehavior()
Gets a value indicating how the control responds to users actions.
|
BehaviorBase |
getCustomBehavior()
Gets custom behavior object specifying how the control responds to user interaction.
|
java.lang.Class<? extends DiagramLink> |
getCustomLinkType()
Gets a custom type of DiagramLink-derived objects that will
be created when the users starts drawing.
|
java.lang.Class<? extends DiagramNode> |
getCustomNodeType()
Gets the type of a DiagramNode-derived class whose
instance should be created when a user starts drawing.
|
DelKeyAction |
getDelKeyAction()
Gets a value that specifies what action should be carried out
when the user hits the Del key.
|
Diagram |
getDiagram()
Gets the diagram displayed by this view.
|
float |
getDocScrollX()
Gets the horizontal scroll position.
|
float |
getDocScrollY()
Gets the vertical scroll position.
|
int |
getDragThreshold()
Gets the minimum distance the pointer should be dragged, measured in pixels,
that would cause a drag event instead of click.
|
boolean |
getInplaceEditAcceptOnEnter()
Gets a value indicating whether pressing the ENTER key
ends inplace editing and accepts changes.
|
boolean |
getInplaceEditCancelOnEsc()
Gets a value indicating whether pressing the ESC key
ends inplace editing and cancels changes.
|
Font |
getInplaceEditFont()
Gets the font used to display text in the inplace- edit text control.
|
boolean |
getMagnifierEnabled()
Gets a value indicating whether the magnifier tool is currently enabled.
|
float |
getMagnifierFactor()
Gets the zoom factor of the magnifier tool.
|
Color |
getMagnifierFrameColor()
Gets the color of the magnifier frame.
|
int |
getMagnifierFrameThickness()
Gets the thickness of the magnifier frame, expressed in pixels.
|
int |
getMagnifierHeight()
Gets the height of the magnifier tool, expressed in pixels.
|
Color |
getMagnifierSecondaryFrameColor()
Gets the secondary color of the magnifier frame.
|
boolean |
getMagnifierShading()
Gets a value indicating whether to enhance the effect of
a magnifier lense by using a gradient shading.
|
Shape |
getMagnifierShape()
Gets the shape of the magnifier tool.
|
int |
getMagnifierWidth()
Gets the width of the magnifier tool, expressed in pixels.
|
int |
getMinimumZoomSize()
Gets the minimum size in pixels that the control lets users zoom to using a pinch gesture.
|
ModificationStart |
getModificationStart()
Gets a value indicating how users can start modifying items in the diagram.
|
boolean |
getShowToolTips()
Gets a value indicating whether an item's ToolTip is shown
when the mouse hovers over the item.
|
SmoothingMode |
getTextAntiAlias()
Gets the current anti-aliasing mode for text.
|
boolean |
getTrackPointedItem()
Gets a value indicating whether the control will raise the
nodePointerEnter and
nodePointerLeave events. |
android.graphics.RectF |
getViewport() |
boolean |
getXmlClipboard()
Gets a value that specifies whether XML serialization
will be used when saving/loading the selection to/from clipboard.
|
float |
getZoomFactor()
Gets the current zoom level.
|
ZoomPivot |
getZoomPivot()
Gets the pivot point of pinch-zoom gestures.
|
void |
loadFrom(java.io.InputStream in)
Loads the diagram contents from a stream.
|
void |
loadFrom(java.lang.String fileName,
android.content.Context context)
Loads the diagram contents from a file.
|
void |
loadFromString(java.lang.String chartData)
Loads the diagram contents from a string.
|
void |
loadFromXml(org.w3c.dom.Document document,
boolean freeProcessedXml)
Loads the contents of the XML diagram document.
|
void |
loadFromXml(org.xml.sax.InputSource source)
Loads the contents of the XML diagram document.
|
void |
loadFromXml(java.io.InputStream stream)
Loads the contents of the XML diagram document.
|
void |
loadFromXml(java.lang.String fileName)
Loads the contents of the XML diagram document.
|
protected void |
onDraw(android.graphics.Canvas canvas) |
protected void |
onLayout(boolean changed,
int left,
int top,
int right,
int bottom) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
void |
onRestoreInstanceState(android.os.Parcelable state)
View.onRestoreInstanceState override.
|
android.os.Parcelable |
onSaveInstanceState()
View.onSaveInstanceState override.
|
protected void |
onSizeChanged(int w,
int h,
int oldw,
int oldh) |
boolean |
onTouchEvent(android.view.MotionEvent event) |
boolean |
pasteFromClipboard(float dx,
float dy)
Pastes diagram items from the system clipboard.
|
boolean |
pasteFromClipboard(float dx,
float dy,
boolean unconnectedLinks)
Pastes diagram items from the system clipboard.
|
void |
pointerDown(android.view.MotionEvent event) |
void |
pointerMove(android.view.MotionEvent event) |
void |
pointerUp(android.view.MotionEvent event) |
void |
repaint()
Repaints the whole diagram.
|
void |
repaint(android.graphics.RectF docRect)
Repaints the specified region of the diagram.
|
void |
resumeRepaint()
Resumes repainting the control after a
suspendRepaint() call. |
void |
saveTo(java.io.OutputStream out)
Saves the diagram contents into a stream.
|
void |
saveTo(java.lang.String fileName,
android.content.Context context)
Saves the diagram contents into a file.
|
java.lang.String |
saveToString()
Saves the diagram contents into a string.
|
java.lang.String |
saveToString(SaveToStringFormat format,
boolean includeUnalteredProperties)
Saves the diagram contents into a string.
|
void |
saveToXml(org.w3c.dom.Document document)
Saves the diagram to the specified XML document.
|
void |
saveToXml(org.w3c.dom.Document document,
boolean includeUnalteredProperties)
Saves the diagram to the specified XML document.
|
void |
saveToXml(java.io.OutputStream stream,
boolean includeUnalteredProperties)
Saves the diagram to the specified XML document.
|
void |
saveToXml(java.lang.String fileName)
Saves the diagram to the specified XML document.
|
void |
scrollTo(float x,
float y)
Scrolls the diagram to the specified position.
|
void |
setAllowInplaceEdit(boolean value)
Sets a value indicating whether users are allowed
to edit the text of diagram items.
|
void |
setAntiAlias(SmoothingMode antiAlias)
Sets the current anti-aliasing mode for non text objects.
|
void |
setAutoScroll(boolean value)
Sets a value indicating whether the diagram should scroll automatically
when the pointer is dragged towards the edge of the view.
|
void |
setBehavior(Behavior value)
Sets a value indicating how the control should respond to users actions.
|
void |
setCustomBehavior(BehaviorBase value)
Sets a custom behavior object specifying how the control responds to user interaction.
|
void |
setCustomLinkType(java.lang.Class<? extends DiagramLink> value)
Sets a custom type of DiagramLink-derived objects that will
be created when the users starts drawing.
|
void |
setCustomNodeType(java.lang.Class<? extends DiagramNode> value)
Sets the type of a DiagramNode-derived class whose
instance should be created when a user starts drawing.
|
void |
setDelKeyAction(DelKeyAction delKeyAction)
Sets a value that specifies what action should be carried out
when the user hits the Del key.
|
void |
setDiagram(Diagram value)
Sets the diagram displayed by this view.
|
void |
setDocScrollX(float value)
Sets the horizontal scroll position.
|
void |
setDocScrollY(float value)
Sets the vertical scroll position.
|
void |
setDragThreshold(int dragThreshold)
Sets the minimum distance the pointer should be dragged, measured in pixels,
that would cause a drag event instead of click.
|
void |
setInplaceEditAcceptOnEnter(boolean inplaceEditAcceptOnEnter)
Sets a value indicating whether pressing the ENTER key
ends inplace editing and accepts changes.
|
void |
setInplaceEditCancelOnEsc(boolean inplaceEditCancelOnEsc)
Sets a value indicating whether pressing the ESC key
ends inplace editing and cancels changes.
|
void |
setInplaceEditFont(Font value)
Sets the font used to display text in the inplace- edit text control.
|
static void |
setLicenseKey(java.lang.String licenseKey)
Sets the component's license key string, disabling evaluation mode.
|
void |
setMagnifierEnabled(boolean value)
Sets a value indicating whether the magnifier tool is currently enabled.
|
void |
setMagnifierFactor(float value)
Gets the zoom factor of the magnifier tool.
|
void |
setMagnifierFrameColor(Color value)
Sets the color of the magnifier frame.
|
void |
setMagnifierFrameThickness(int value)
Sets the thickness of the magnifier frame, expressed in pixels.
|
void |
setMagnifierHeight(int value)
Sets the height of the magnifier tool, expressed in pixels.
|
void |
setMagnifierSecondaryFrameColor(Color value)
Sets the secondary color of the magnifier frame.
|
void |
setMagnifierShading(boolean value)
Sets a value indicating whether to enhance the effect of
a magnifier lense by using a gradient shading.
|
void |
setMagnifierShape(Shape value)
Sets the shape of the magnifier tool.
|
void |
setMagnifierWidth(int value)
Sets the width of the magnifier tool, expressed in pixels.
|
void |
setMinimumZoomSize(int value)
Sets the minimum size in pixels that the control lets users zoom to using a pinch gesture.
|
void |
setModificationStart(ModificationStart value)
Sets a value indicating how users can start modifying items in the
diagram.
|
void |
setShowToolTips(boolean value)
Sets a value indicating whether an item's ToolTip is shown
when the mouse hovers over the item.
|
void |
setTextAntiAlias(SmoothingMode antiAlias)
Sets the current anti-aliasing mode for text.
|
void |
setTrackPointedItem(boolean value)
Sets a value indicating whether the control should raise the
nodePointerEnter and
nodePointerLeave events. |
void |
setXmlClipboard(boolean xmlClipboard)
Sets a value that specifies whether XML serialization
will be used when saving/loading the selection to/from clipboard.
|
void |
setZoomFactor(float value)
Sets the zoom level.
|
void |
setZoomPivot(ZoomPivot value)
Sets the pivot point of pinch-zoom gestures.
|
void |
startInteraction(InteractionState interactionState,
android.graphics.PointF point)
Starts the specified interactive operation.
|
void |
suspendRepaint()
Stops repainting the control automatically after changes of property values.
|
void |
zoomToFit()
Zooms the diagram so that all its contents becomes visible.
|
void |
zoomToFit(android.graphics.RectF rect)
Zooms and scrolls the diagram so that the specified rectangular area
becomes visible.
|
addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, checkLayoutParams, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getAccessibilityClassName, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAttachedToWindow, onCreateDrawableState, onDetachedFromWindow, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, shouldDelayChildPressedState, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, 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, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRtlPropertiesChanged, onScreenStateChanged, onScrollChanged, onSetAlpha, onStartTemporaryDetach, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, 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, 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, setMeasuredDimension, 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, verifyDrawable, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows, requestLayout
public DiagramView(android.content.Context context)
public DiagramView(android.content.Context context, android.util.AttributeSet attributes)
public android.os.Parcelable onSaveInstanceState()
onSaveInstanceState
in class android.view.View
public void onRestoreInstanceState(android.os.Parcelable state)
onRestoreInstanceState
in class android.view.View
public boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent
in class android.view.View
public void pointerDown(android.view.MotionEvent event)
public void pointerMove(android.view.MotionEvent event)
public void pointerUp(android.view.MotionEvent event)
public boolean getTrackPointedItem()
nodePointerEnter
and
nodePointerLeave
events.true
if nodePointerEnter
and
nodePointerLeave
events are raised when the
pointer enters or leaves the bounds of an item, otherwise false.public void setTrackPointedItem(boolean value)
nodePointerEnter
and
nodePointerLeave
events.value
- true
if nodePointerEnter
and
nodePointerLeave
events should be raised when the pointer
enters or leaves the bounds of an item, otherwise false
.public void saveTo(java.lang.String fileName, android.content.Context context) throws java.io.FileNotFoundException, java.io.IOException
fileName
- The name of the file into which the diagram
contents should be saved.context
- The Context object used to open the output stream.java.io.FileNotFoundException
java.io.IOException
public void saveTo(java.io.OutputStream out) throws java.io.IOException
out
- An OutputStream
where
the diagram contents should be saved.java.io.IOException
public java.lang.String saveToString()
String
containing the base64 encoded diagram contents.public java.lang.String saveToString(SaveToStringFormat format, boolean includeUnalteredProperties)
format
- A member of the SaveToStringFormat
enumeration that indicates
the desired serialized string format.includeUnalteredProperties
- true to serialize all properties;
false to serialize only properties different from their default value.public void loadFrom(java.lang.String fileName, android.content.Context context) throws java.io.FileNotFoundException, java.io.IOException
fileName
- The name of the file from which the diagram
contents should be loaded.context
- The Context object used to open the input stream.java.io.FileNotFoundException
java.io.IOException
public void loadFrom(java.io.InputStream in) throws java.io.IOException
in
- An InputStream
from which to load the diagram contents.java.io.IOException
public void loadFromString(java.lang.String chartData)
chartData
- A String
from which to load the diagram contents.public void saveToXml(java.lang.String fileName) throws java.io.IOException, XmlException
fileName
- The full path and name of the disk file where the diagram should be saved.java.io.IOException
XmlException
public void saveToXml(java.io.OutputStream stream, boolean includeUnalteredProperties) throws XmlException, java.io.UnsupportedEncodingException
stream
- An OutputStream
where the XML markup should be serialized.XmlException
java.io.UnsupportedEncodingException
public void saveToXml(org.w3c.dom.Document document)
document
- A DOM Document object where the diagram should be saved.public void saveToXml(org.w3c.dom.Document document, boolean includeUnalteredProperties)
document
- A DOM Document object where the diagram should be saved.public void loadFromXml(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException, XmlException
fileName
- The name of the XML file the data should be read from.java.io.FileNotFoundException
java.io.IOException
XmlException
public void loadFromXml(java.io.InputStream stream) throws XmlException
stream
- An InputStream
where the XML markup should be read from.XmlException
public void loadFromXml(org.xml.sax.InputSource source) throws XmlException
source
- An InputSource
where the XML markup should be read from.XmlException
public void loadFromXml(org.w3c.dom.Document document, boolean freeProcessedXml) throws XmlException
document
- A DOM Document object from which to load the diagram data.XmlException
public void suspendRepaint()
public void resumeRepaint()
suspendRepaint()
call.protected void onDraw(android.graphics.Canvas canvas)
onDraw
in class android.view.View
public android.graphics.Rect docToDevice(android.graphics.RectF docRect)
docRect
- A RectF
object, whose
coordinates should be transformed and returned.Rect
instance, which represents the device
coordinates of docRect.public android.graphics.RectF deviceToDoc(android.graphics.Rect devRect)
devRect
- An instance of the Rect
object, whose
coordinates should be transformed and returned.RectF
object, which represents the
document coordinates of devRectpublic android.graphics.RectF canvasToDoc(android.graphics.Rect devRect)
public android.graphics.Point docToDevice(android.graphics.PointF docPoint)
docPoint
- A PointF
object, whose
coordinates should be transformed and returned.Point
instance, which represents the device
coordinates of docPoint.public android.graphics.PointF deviceToDoc(android.graphics.Point devPoint)
devPoint
- An instance of the Point
object, whose
coordinates should be transformed and returned.PointF
object, which represents the
document coordinates of devPointpublic android.graphics.PointF deviceToDoc(int x, int y)
x
- y
- PointF
object, which represents the
document coordinates of device point (x, y)public boolean copyToClipboard() throws java.io.IOException, XmlException
java.io.IOException
XmlException
public boolean copyToClipboard(boolean groups) throws java.io.IOException, XmlException
groups
- true to copy item groups; otherwise, false.java.io.IOException
XmlException
public boolean cutToClipboard() throws java.io.IOException, XmlException
java.io.IOException
XmlException
public boolean cutToClipboard(boolean groups) throws java.io.IOException, XmlException
groups
- true to cut item groups; otherwise, false.java.io.IOException
XmlException
public boolean pasteFromClipboard(float dx, float dy) throws java.io.IOException, XmlException
dx
- Horizontal offset of pasted items from their original positions.dy
- Vertical offset of pasted items from their original positions.java.io.IOException
XmlException
public boolean pasteFromClipboard(float dx, float dy, boolean unconnectedLinks) throws java.io.IOException, XmlException
dx
- Horizontal offset of pasted items from their original positions.dy
- Vertical offset of pasted items from their original positions.unconnectedLinks
- true to allow pasting links whose origin or destination node
has not been copied; otherwise, false. Default is false.java.io.IOException
XmlException
public Font getInplaceEditFont()
java.awt.Font
object representing
the font of the inplace edit control.public void setInplaceEditFont(Font value)
value
- A java.awt.Font
object representing
the font of the inplace edit control.public Behavior getBehavior()
Behavior
enumeration.public void setBehavior(Behavior value)
value
- A member of the Behavior
enumeration.public BehaviorBase getCustomBehavior()
public void setCustomBehavior(BehaviorBase value)
public void cancelDrag()
public float getDocScrollX()
public void setDocScrollX(float value)
value
- A float value specifying the horizontal scroll position.public float getDocScrollY()
public void setDocScrollY(float value)
value
- A float value specifying the vertical scroll position.public void scrollTo(float x, float y)
x
- A float value specifying the horizontal scroll position.y
- A float value specifying the vertical scroll position.public float getZoomFactor()
public void setZoomFactor(float value)
value
- A float value specifying the zoom factor
as percents of the original view size.public int getMinimumZoomSize()
public void setMinimumZoomSize(int value)
value
- An integer value specifying the minimum zoom size in pixels.public ZoomPivot getZoomPivot()
ZoomPivot
enumeration.public void setZoomPivot(ZoomPivot value)
value
- A member of the ZoomPivot
enumeration.public void zoomToFit()
public void zoomToFit(android.graphics.RectF rect)
rect
- A RectF
object representing the
region to which the view should be fitted.public int getDragThreshold()
public java.lang.Class<? extends DiagramNode> getCustomNodeType()
public void setCustomNodeType(java.lang.Class<? extends DiagramNode> value)
value
- public java.lang.Class<? extends DiagramLink> getCustomLinkType()
public void setCustomLinkType(java.lang.Class<? extends DiagramLink> value)
public float getMagnifierFactor()
public void setMagnifierFactor(float value)
public int getMagnifierWidth()
public void setMagnifierWidth(int value)
public int getMagnifierHeight()
public void setMagnifierHeight(int value)
public Shape getMagnifierShape()
public void setMagnifierShape(Shape value)
public int getMagnifierFrameThickness()
public void setMagnifierFrameThickness(int value)
public Color getMagnifierFrameColor()
public void setMagnifierFrameColor(Color value)
public Color getMagnifierSecondaryFrameColor()
public void setMagnifierSecondaryFrameColor(Color value)
public boolean getMagnifierShading()
public void setMagnifierShading(boolean value)
public boolean getMagnifierEnabled()
The magnifier tool can be alternatively enabled on-demand through a modifier key or a mouse button.
public void setMagnifierEnabled(boolean value)
The magnifier tool can be alternatively enabled on-demand through a modifier key or a mouse button.
public void setDragThreshold(int dragThreshold)
dragThreshold
- The minimal distance to move the pointer before starting a drag operation.public boolean getAutoScroll()
true
if the diagram will scroll automatically,
otherwise false
.public void setAutoScroll(boolean value)
value
- true
if the diagram should scroll
automatically, otherwise false
.public ModificationStart getModificationStart()
ModificationStart
enumeration.public void setModificationStart(ModificationStart value)
value
- A member of the ModificationStart
enumeration.public void bringIntoView(DiagramItem item)
item
- The DiagramItem
to bring into view.public android.graphics.RectF getViewport()
public void repaint(android.graphics.RectF docRect)
docRect
- A RectF
object representing the
region of the diagram that should be repainted.public void repaint()
public boolean getAllowInplaceEdit()
true
if users are allowed to edit the text
of diagram items, otherwise false
.public void setAllowInplaceEdit(boolean value)
value
- true
if users are allowed to edit the text
of diagram items, otherwise false
.public boolean getShowToolTips()
true
if tooltips are shown for the diagram
items that have them, otherwise false
.public void setShowToolTips(boolean value)
value
- true
if tooltips are shown for the diagram
items that have them, otherwise false
.public boolean getInplaceEditAcceptOnEnter()
true
if ENTER ends inplace editing, otherwise false
public void setInplaceEditAcceptOnEnter(boolean inplaceEditAcceptOnEnter)
inplaceEditAcceptOnEnter
- true
if ENTER should end
inplace editing, otherwise false
public boolean getInplaceEditCancelOnEsc()
true
if ESC should end inplace editing, otherwise false
public void setInplaceEditCancelOnEsc(boolean inplaceEditCancelOnEsc)
inplaceEditCancelOnEsc
- true
if ESC should end inplace editing, otherwise false
public void beginEdit(InplaceEditable item)
item
- The diagram item or table's cell whose text should be edited.public void beginEdit(InplaceEditable item, android.graphics.PointF pointerPosition)
public void beginEdit(DiagramItem diagItem, InplaceEditable item, android.graphics.PointF pointerPosition)
item
- The diagram item or table's cell whose text should be edited.public void endEdit(boolean accept)
accept
- true to accept changes made to text; false to reject them.public SmoothingMode getAntiAlias()
SmoothingMode
enumeration.public void setAntiAlias(SmoothingMode antiAlias)
antiAlias
- A member of the SmoothingMode
enumerationsetTextAntiAlias(com.mindfusion.diagramming.SmoothingMode)
public SmoothingMode getTextAntiAlias()
SmoothingMode
enumeration.public void setTextAntiAlias(SmoothingMode antiAlias)
antiAlias
- A member of the SmoothingMode
enumerationsetAntiAlias(com.mindfusion.diagramming.SmoothingMode)
public DelKeyAction getDelKeyAction()
DelKeyAction
enumeration.public void setDelKeyAction(DelKeyAction delKeyAction)
delKeyAction
- A member of the DelKeyAction
enumeration.public boolean getXmlClipboard()
true
if XML serialization will be used;
otherwise false
.public void setXmlClipboard(boolean xmlClipboard)
xmlClipboard
- true
if XML serialization will be used;
otherwise false
.public Diagram getDiagram()
public void setDiagram(Diagram value)
public void adoptHostedControls(boolean onlyUnparented)
ControlNode
objects in multiple views.
For example, you might want to invoke it when a view becomes the topmost window in a MDI application.onlyUnparented
- true
if only controls that currently
do not have a parent view are adopted; false
to adopt all controls.protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
onMeasure
in class android.view.View
protected void onLayout(boolean changed, int left, int top, int right, int bottom)
onLayout
in class android.view.ViewGroup
protected int computeHorizontalScrollRange()
computeHorizontalScrollRange
in class android.view.View
protected int computeVerticalScrollRange()
computeVerticalScrollRange
in class android.view.View
protected void onSizeChanged(int w, int h, int oldw, int oldh)
onSizeChanged
in class android.view.View
public void startInteraction(InteractionState interactionState, android.graphics.PointF point)
public void disableInteractionBuffer()
public static void setLicenseKey(java.lang.String licenseKey)
licenseKey
- A string value containing encoded MindFusion.Diagramming license information.