Enum ZoomType
java.lang.Object
java.lang.Enum<ZoomType>
org.eclipse.nebula.visualization.xygraph.figures.ZoomType
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ZoomType>,java.lang.constant.Constable
public enum ZoomType extends java.lang.Enum<ZoomType>
The type of zoom on XYGraph.
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description DYNAMIC_ZOOMInteractive Dynamic zoomHORIZONTAL_ZOOMZoom via 'cursors' for horizontal start/end positionNONEDisarm zoom behaviorPANNINGZoom 'out' around mouse pointerRUBBERBAND_ZOOMInteractive Rubberband zoomVERTICAL_ZOOMZoom via 'cursors' for vertical start/end positionZOOM_INZoom 'in' around mouse pointerZOOM_IN_HORIZONTALLYZoom 'in' around mouse pointer along horizontal axisZOOM_IN_VERTICALLYZoom 'in' around mouse pointer along vertical axisZOOM_OUTZoom 'out' around mouse pointerZOOM_OUT_HORIZONTALLYZoom 'out' around mouse pointer along horizontal axisZOOM_OUT_VERTICALLYZoom 'out' around mouse pointer along vertical axes -
Method Summary
Modifier and Type Method Description org.eclipse.swt.graphics.CursorgetCursor()org.eclipse.swt.graphics.CursorgetCursorOnAxis(boolean horizontalAxis)java.lang.StringgetDescription()org.eclipse.swt.graphics.ImagegetIconImage()java.lang.StringgetId()Return the unique id for the enum.booleanisZoom()Some of the so-called ZoomTypes are not actually Zooms.voidsetCursor(org.eclipse.swt.graphics.Cursor cursor)Deprecated.see Javadocs above for detailsjava.lang.StringtoString()booleanuseWithFlags(int flags)Check if this zoom mode should be offered when a graph was created with given flagsstatic ZoomTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ZoomType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
RUBBERBAND_ZOOM
Interactive Rubberband zoom -
DYNAMIC_ZOOM
Interactive Dynamic zoom -
HORIZONTAL_ZOOM
Zoom via 'cursors' for horizontal start/end position -
VERTICAL_ZOOM
Zoom via 'cursors' for vertical start/end position -
ZOOM_IN
Zoom 'in' around mouse pointer -
ZOOM_OUT
Zoom 'out' around mouse pointer -
ZOOM_IN_HORIZONTALLY
Zoom 'in' around mouse pointer along horizontal axis -
ZOOM_OUT_HORIZONTALLY
Zoom 'out' around mouse pointer along horizontal axis -
ZOOM_IN_VERTICALLY
Zoom 'in' around mouse pointer along vertical axis -
ZOOM_OUT_VERTICALLY
Zoom 'out' around mouse pointer along vertical axes -
PANNING
Zoom 'out' around mouse pointer -
NONE
Disarm zoom behavior
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getIconImage
public org.eclipse.swt.graphics.Image getIconImage()- Returns:
- the iconImageData
-
getDescription
public java.lang.String getDescription()- Returns:
- the description
-
getCursor
public org.eclipse.swt.graphics.Cursor getCursor()- Returns:
- the cursor
-
getCursorOnAxis
public org.eclipse.swt.graphics.Cursor getCursorOnAxis(boolean horizontalAxis)- Returns:
- the cursor on axis.
-
useWithFlags
public boolean useWithFlags(int flags)Check if this zoom mode should be offered when a graph was created with given flags- Parameters:
flags- Flags of the XYGraph tool bar- Returns:
trueif this zoom type applies
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Enum<ZoomType>
-
getId
public java.lang.String getId()Return the unique id for the enum.- Returns:
- class name . enum name
-
setCursor
@Deprecated public void setCursor(org.eclipse.swt.graphics.Cursor cursor)Deprecated.see Javadocs above for detailsXXX: Using this is a bad idea, it modifies global state and as a result does not fully work as intended. The overriding of the cursor *must* be done outside of the enum. The failing case is when more than one plot is open at the same time and each plot tries to set the override cursor. In that case the last one wins. Nowhere within the Nebula code base calls this method, it only exists to support clients that used this in the past and is therefore deprecated.Override the cursor for the given zoom type.
Overriding the cursor is a normal operation for the
NONEcursor as when the cursor is NONE it is deactivated, so external control has an effect on the cursor.When set to non-
nullvalue,getCursor()andgetCursorOnAxis(boolean)will return the overridden cursor.- Parameters:
cursor- to use when overridden
-
isZoom
public boolean isZoom()Some of the so-called ZoomTypes are not actually Zooms. TheisZoom()returnstrueif the Zoom type is actually a zoom operation. Returnstruefor all items, except forNONEand .- Returns:
trueif an actual zoom type
-