org.arakhne.neteditor.android.activity
G - is the type of the graph supported by this editor.public class FigureView<G extends Graph<?,?,?,?>> extends ZoomableView implements ViewComponentContainer<Figure,G>
| Modifier and Type | Class and Description |
|---|---|
protected class |
FigureView.EventHandler |
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, 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| Modifier and Type | Field and Description |
|---|---|
protected ReentrantLock |
changeLock
Lock resource that may be used for deletion actions.
|
static int |
CLICK_PRECISION
Precision in pixels for the clicking action.
|
protected ListenerCollection<EventListener> |
listenerList
List of listeners associated with this view.
|
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_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, 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_WINDOW_FOCUSED_STATE_SET, 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, 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_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_INHERIT, TEXT_ALIGNMENT_RESOLVED_DEFAULT, TRANSLATION_X, TRANSLATION_Y, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y| Constructor and Description |
|---|
FigureView(android.content.Context context) |
FigureView(android.content.Context context,
android.util.AttributeSet attrs) |
FigureView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle) |
| Modifier and Type | Method and Description |
|---|---|
int |
addFigure(Figure component) |
void |
addFigureListener(FigureListener listener)
Add listener on figure events.
|
void |
addModelObjectListener(ModelObjectListener listener)
Add Listener on changes in this object.
|
protected Rectangle2f |
calcDocumentBounds()
Compute and reply the bounds of the entire document.
|
protected DocumentWrapper |
createDocumentWrapper()
Invoked by the constructor to create a wrapper to the
data of the viewed document.
|
protected void |
fireFigureAdded(Figure added)
Notifies the listeners about the addition of a figure.
|
protected void |
fireFigureChanged(Figure changed)
Notifies the listeners about the change of a figure.
|
protected void |
fireFigureRemoved(Figure removed)
Notifies the listeners about the removal of a figure.
|
FigureActionModeManager |
getActionModeManager()
Replies the object that permits to change
the configuration of the action mode manager.
|
Color |
getBackgroundColor() |
CollisionAvoider |
getCollisionAvoider()
Replies the object that permits to avoid collision between a
figure to insert inside and the already present figures.
|
Figure |
getFigureAt(float x,
float y)
Replies the figure at the given coordinate.
|
Figure |
getFigureAt(int index) |
int |
getFigureCount() |
FigureFactory<G> |
getFigureFactory() |
Figure |
getFigureIn(Rectangle2f bounds)
Replies the first figure that are inside the specified bounds.
|
Figure |
getFigureOn(Shape2f bounds)
Replies the first figure that are intersecting the specified bounds.
|
Collection<? extends Figure> |
getFigures()
Replies the figures in the container.
|
Set<Figure> |
getFiguresIn(Rectangle2f bounds)
Replies the figures that are inside the specified bounds.
|
Set<Figure> |
getFiguresOn(Shape2f bounds)
Replies the figures that are intersecting the specified bounds.
|
Figure |
getFigureWithBoundsAt(float x,
float y)
Replies the figure that has its bounds with the specified
point inside.
|
G |
getGraph()
Replies the graph displayed by this view.
|
float |
getHitPrecision()
Replies the precisions of the hits on the view.
|
protected float |
getPreferredFocusX()
Replies the preferred position of the focus point.
|
protected float |
getPreferredFocusY()
Replies the preferred position of the focus point.
|
Color |
getSelectionBackgroundColor() |
Color |
getSelectionForegroundColor() |
SelectionManager |
getSelectionManager()
Replies the selection manager.
|
Object |
getTreeLock() |
UndoManager |
getUndoManager()
Replies the undo/redo manager.
|
UUID |
getUUID()
Replies the UUId of the view.
|
Rectangle2f |
getViewBounds() |
void |
importGraph(G graph,
Map<UUID,List<ViewComponent>> figures)
Import the graph and the specified figures into this editor.
|
int |
indexOfFigure(Figure figure)
Replies the index of the figure.
|
boolean |
isAlwaysRemovingModelObjects()
Replies if the mode container want to remove the model
objects when a figure is removed from the view.
|
boolean |
isEditable()
Replies if the data inside the view is editable.
|
boolean |
isFigureAutomaticallyAdded()
Replies if the figure are automatically added into the view
when a model object was added in the graph.
|
boolean |
isSelectionEnabled()
Replies if the selection manager is enabled.
|
boolean |
isShadowDrawn() |
Iterator<Figure> |
iterator() |
int |
moveFigureAt(Figure figure,
int index)
Move the figure at the specified position in the layers used by this panel.
|
void |
moveFigureBackground(Figure figure)
Move the figure at the background in the layers used by this panel.
|
void |
moveFigureDown(Figure figure)
Move the figure down in the layers used by this panel.
|
void |
moveFigureFront(Figure figure)
Move the figure at the front in the layers used by this panel.
|
void |
moveFigureUp(Figure figure)
Move the figure up in the layers used by this panel.
|
protected void |
onClick(PointerEvent e)
Invoked when a short-click is detected.
|
protected void |
onDrawView(android.graphics.Canvas canvas,
float scaleFactor,
CenteringTransform centeringTransform)
Invoked to paint the view after it is translated and scaled.
|
protected void |
onLongClick(PointerEvent e)
Invoked when a long-click is detected.
|
protected void |
onPointerDragged(PointerEvent e)
Invoked when the pointer is moved with a button down.
|
protected void |
onPointerPressed(PointerEvent e)
Invoked when the a touch-down event is detected.
|
protected void |
onPointerReleased(PointerEvent e)
Invoked when the a touch-up event is detected.
|
void |
paintViewComponents(ViewGraphics2D g) |
void |
removeAllFigures() |
int |
removeFigure(Figure component) |
int |
removeFigure(Figure component,
boolean unlinkToModelObject)
Remove the specified component.
|
Figure |
removeFigureAt(int index) |
void |
removeFigureListener(FigureListener listener)
Remove listener on figure events.
|
void |
removeModelObjectListener(ModelObjectListener listener)
Add Listener on changes in this object.
|
void |
repaint(Figure figure)
Refresh the drawing area covered by the given figure.
|
void |
setBackgroundDrawable(android.graphics.drawable.Drawable d) |
void |
setEditable(boolean editable)
Set if this viewer is interactively editable.
|
void |
setFigureAutomaticallyAdded(boolean auto)
Replies if the figure are automatically added into the view
when a model object was added in the graph.
|
void |
setFigureFactory(FigureFactory<G> factory)
Set the figure factory used by this panel.
|
void |
setGraph(G g)
Set the graph associated to this panel.
|
void |
setHitPrecision(float precision)
Replies the precision of the hits on the view.
|
void |
setSelectionBackgroundColor(int color)
Set the background color of the selection.
|
void |
setSelectionEnabled(boolean enable)
Set if the selection manager is enabled.
|
void |
setSelectionForegroundColor(int color)
Set the background color of the selection.
|
void |
setSelectionManager(SelectionManager manager)
Set the selection manager.
|
void |
setShadowDrawn(boolean draw) |
fitView, getFocusX, getFocusY, getMaxScalingFactor, getMinScalingFactor, getScalingFactor, getScalingFactorToFit, getScalingSensitivity, getViewportCenterX, getViewportCenterY, isIgnoreRepaint, isMoveDirectionInverted, isXAxisInverted, isYAxisInverted, logical2pixel_size, logical2pixel_x, logical2pixel_y, logical2pixel, logical2pixel, logical2pixel, logical2pixel, logical2pixel, logical2pixel, logical2pixel, logical2pixel, onDraw, onScale, onSizeChanged, onTouchEvent, onUpdateViewParameters, pixel2logical_size, pixel2logical_x, pixel2logical_y, pixel2logical, pixel2logical, pixel2logical, pixel2logical, pixel2logical, pixel2logical, pixel2logical, pixel2logical, repaint, repaint, repaint, repaint, repaint, resetView, setFocusPoint, setIgnoreRepaint, setMaxScalingFactor, setMinScalingFactor, setMoveDirectionInverted, setOnClickListener, setOnLongClickListener, setScalingFactor, setScalingFactorAndFocus, setScalingFactorForPixelRatio, setScalingSensitivity, setXAxisInverted, setYAxisInverted, toast, toast, translateFocusPoint, zoomIn, zoomOutaddChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, drawableStateChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLayerType, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPaddingOffsetRequired, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onAttachedToWindow, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDetachedFromWindow, onDisplayHint, onDragEvent, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onMeasure, onOverScrolled, onPopulateAccessibilityEvent, onRestoreInstanceState, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onStartTemporaryDetach, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundResource, setBottom, setCameraDistance, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLayerType, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDrawpublic static final int CLICK_PRECISION
protected final ReentrantLock changeLock
protected final ListenerCollection<EventListener> listenerList
public FigureView(android.content.Context context)
context - is the droid context in which the view is displayed.public FigureView(android.content.Context context,
android.util.AttributeSet attrs)
context - is the droid context in which the view is displayed.attrs - are the attributes of the view.public FigureView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle)
context - is the droid context in which the view is displayed.attrs - are the attributes of the view.defStyle - is the style of the view.protected DocumentWrapper createDocumentWrapper()
ZoomableViewcreateDocumentWrapper in class ZoomableViewnull.public boolean isSelectionEnabled()
true if the selection manager is enabled.public void setSelectionEnabled(boolean enable)
enable - is true if the selection manager is enabled.public boolean isAlwaysRemovingModelObjects()
true if both the figure and the
model objects should be removed at the same time,
false if only the figure should be removed
(not the model object).public SelectionManager getSelectionManager()
public UndoManager getUndoManager()
public void setSelectionManager(SelectionManager manager)
manager - is the new selection manager.public final UUID getUUID()
getUUID in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>protected float getPreferredFocusX()
getPreferredFocusX in class ZoomableViewprotected float getPreferredFocusY()
getPreferredFocusY in class ZoomableViewpublic CollisionAvoider getCollisionAvoider()
public boolean isFigureAutomaticallyAdded()
getFigureFactory().true if the figures are automatically added;
otherwise false.public void setFigureAutomaticallyAdded(boolean auto)
getFigureFactory().auto - is true if the figures are automatically added;
otherwise false.public FigureFactory<G> getFigureFactory()
getFigureFactory in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public void setFigureFactory(FigureFactory<G> factory)
factory - is the new figure factory.public G getGraph()
public void setGraph(G g)
g - is the graph.public Collection<? extends Figure> getFigures()
public Figure getFigureWithBoundsAt(float x, float y)
getFigureAt(float, float).
This function uses the precision of the clicks, which
is replied by getHitPrecision().x - y - null if none.public Set<Figure> getFiguresOn(Shape2f bounds)
bounds - null.public Figure getFigureOn(Shape2f bounds)
bounds - null.public Set<Figure> getFiguresIn(Rectangle2f bounds)
bounds - null.public Figure getFigureIn(Rectangle2f bounds)
bounds - null.public void moveFigureUp(Figure figure)
figure - is the figure to move up.public void moveFigureDown(Figure figure)
figure - is the figure to move down.public void moveFigureFront(Figure figure)
figure - is the figure to move to the front.public void moveFigureBackground(Figure figure)
figure - is the figure to move to the background.public int moveFigureAt(Figure figure, int index)
figure - is the figure to move to the front.index - is the new position of the figure.-1
if the figure was not found.IllegalArgumentExceptionpublic int indexOfFigure(Figure figure)
figure - is the figure to search for.-1 if
is was not found.public final Rectangle2f getViewBounds()
getViewBounds in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>protected Rectangle2f calcDocumentBounds()
public float getHitPrecision()
public void setHitPrecision(float precision)
CLICK_PRECISION
is used.precision - is the precision of the hits, in pixels.public boolean isEditable()
true if the view enables edition;
otherwise false.public void setEditable(boolean editable)
editable - is true if this viewer is editable; otherwise false.public boolean isShadowDrawn()
isShadowDrawn in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public void setShadowDrawn(boolean draw)
setShadowDrawn in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public void repaint(Figure figure)
This function does nothing if ZoomableView.isIgnoreRepaint()
replies true;
figure - protected void onDrawView(android.graphics.Canvas canvas,
float scaleFactor,
CenteringTransform centeringTransform)
onDrawView in class ZoomableViewcanvas - is the canvas in which the view must be painted.scaleFactor - is the scaling factor to use for drawing.centeringTransform - is the transform to use to put the draws at the center of the view.public void paintViewComponents(ViewGraphics2D g)
paintViewComponents in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>protected void onPointerPressed(PointerEvent e)
ZoomableViewonPointerPressed in class ZoomableViewprotected void onPointerDragged(PointerEvent e)
ZoomableViewonPointerDragged in class ZoomableViewprotected void onPointerReleased(PointerEvent e)
ZoomableViewonPointerReleased in class ZoomableViewprotected void onLongClick(PointerEvent e)
ZoomableViewonLongClick in class ZoomableViewprotected void onClick(PointerEvent e)
ZoomableViewonClick in class ZoomableViewpublic FigureActionModeManager getActionModeManager()
public void addModelObjectListener(ModelObjectListener listener)
listener - public void removeModelObjectListener(ModelObjectListener listener)
listener - public void addFigureListener(FigureListener listener)
listener - public void removeFigureListener(FigureListener listener)
listener - protected void fireFigureRemoved(Figure removed)
removed - protected void fireFigureChanged(Figure changed)
changed - protected void fireFigureAdded(Figure added)
added - public Object getTreeLock()
getTreeLock in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public int getFigureCount()
getFigureCount in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public Figure getFigureAt(float x, float y)
getFigureWithBoundsAt(float, float).
This function uses the precision of the clicks, which
is replied by getHitPrecision().x - y - null if none.public Figure getFigureAt(int index)
getFigureAt in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public int addFigure(Figure component)
addFigure in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public int removeFigure(Figure component)
removeFigure in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public int removeFigure(Figure component, boolean unlinkToModelObject)
component - is the component to remove.unlinkToModelObject - indicates if the removed component should be
unlink to its model object.-1 if not found.removeFigure(Figure)public Figure removeFigureAt(int index)
removeFigureAt in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public void removeAllFigures()
removeAllFigures in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public Color getSelectionForegroundColor()
getSelectionForegroundColor in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public void setSelectionForegroundColor(int color)
color - public Color getSelectionBackgroundColor()
getSelectionBackgroundColor in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public void setSelectionBackgroundColor(int color)
color - public Color getBackgroundColor()
getBackgroundColor in interface ViewComponentContainer<Figure,G extends Graph<?,?,?,?>>public void setBackgroundDrawable(android.graphics.drawable.Drawable d)
setBackgroundDrawable in class android.view.Viewpublic void importGraph(G graph, Map<UUID,List<ViewComponent>> figures)
graph - is the graph to integrate.figures - are the figures (classified per view id) to import, from front to background.Copyright © 2001-2013 NetEditor Developers. 
NetEditor API Documentation by NetEditor Developers is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Based on a work at www.arakhne.org/neteditor