public abstract class GRoundControl extends GComponent
GComponent.Z_Order
Modifier and Type | Field and Description |
---|---|
int |
lastTargetNeedleAngle |
int |
needleAngle |
int |
targetNeedleAngle |
boolean |
wrap0 |
eventType, fGlobalFont, globalColor, globalColorScheme, globalFont, localColor, localFont, tag, tagNo, z
ADD, ALPHA, ALPHA_MASK, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUE_MASK, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ACCURATE_2D, DISABLE_ACCURATE_TEXTURES, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_STROKE_PERSPECTIVE, DISABLE_TEXTURE_CACHE, DISABLE_TEXTURE_MIPMAPS, DISABLE_TRANSFORM_CACHE, DODGE, DOWN, DXF, ELLIPSE, ENABLE_ACCURATE_2D, ENABLE_ACCURATE_TEXTURES, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_STROKE_PERSPECTIVE, ENABLE_TEXTURE_CACHE, ENABLE_TEXTURE_MIPMAPS, ENABLE_TRANSFORM_CACHE, ENTER, EPSILON, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, GIF, GRAY, GREEN_MASK, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, RED_MASK, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPHERE, SPOT, SQUARE, SUBTRACT, TAB, TARGA, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z
ADD_DUPLICATE, BACKGROUND, CHANGED, CLICKED, CLOSE_WINDOW, COLLAPSED, CTRL_ANGULAR, CTRL_HORIZONTAL, CTRL_VERTICAL, DESELECTED, DISABLE_AUTO_DRAW, DRAGGED, ENTERED, EXCP_IN_HANDLER, EXIT_APP, EXPANDED, FAMILY, FOREGROUND, HUD_UNSUPPORTED, INVALID_STATUS, JUSTIFICATION, JUSTIFICATION_FULL, JUSTIFICATION_NONE, KEEP_OPEN, MISSING, NONEXISTANT, NOT_PEASYCAM, POSTURE, POSTURE_OBLIQUE, POSTURE_REGULAR, PRESSED, RELEASED, RUNTIME_ERROR, SCROLL_DOWN, SCROLL_LEFT, SCROLL_RIGHT, SCROLL_UP, SCROLLBAR_HORIZONTAL, SCROLLBAR_VERTICAL, SCROLLBARS_AUTOHIDE, SCROLLBARS_BOTH, SCROLLBARS_HORIZONTAL_ONLY, SCROLLBARS_NONE, SCROLLBARS_VERTICAL_ONLY, SELECTED, SET, SIZE, STRIKETHROUGH, STRIKETHROUGH_OFF, STRIKETHROUGH_ON, SUPERSCRIPT, SUPERSCRIPT_SUB, SUPERSCRIPT_SUPER, USER_COL_SCHEME, WEIGHT, WEIGHT_BOLD, WEIGHT_DEMIBOLD, WEIGHT_DEMILIGHT, WEIGHT_EXTRA_LIGHT, WEIGHT_EXTRABOLD, WEIGHT_HEAVY, WEIGHT_LIGHT, WEIGHT_MEDIUM, WEIGHT_REGULAR, WEIGHT_SEMIBOLD, WEIGHT_ULTRABOLD, WIDTH, WIDTH_CONDENSED, WIDTH_EXTENDED, WIDTH_REGULAR, WIDTH_SEMI_CONDENSED, WIDTH_SEMI_EXTENDED
Constructor and Description |
---|
GRoundControl(PApplet theApplet,
int x,
int y,
int size,
int arcStart,
int arcEnd)
This constructor should be called by the appropriate child class constructor
|
GRoundControl(PApplet theApplet,
int x,
int y,
int width,
int height,
int arcStart,
int arcEnd)
This constructor should be called by the appropriate child class constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getControlMode()
Get the current mouse controller mode possible values are
GKnob.CTRL_ANGULAR or GKnob.CTRL_HORIZONTAL) orGKnob.CTRL_VERTICAL |
int |
getInertia() |
float |
getSensitivity()
This gets the sensitivity to be used in modes CTRL_HORIZONTAL and CTRL_VERTICAL
|
int |
getValue()
Get the current value represented by the control as an integer value.
|
float |
getValuef()
Get the current value represented by the control as a floating point value.
|
boolean |
isMouseORA()
Get the 'over rotation arc' option
|
abstract boolean |
isOverRotArc(int mouseX,
int mouseY)
Override this method in child classes
|
boolean |
isValueChanging()
Is the value changing as a result of the knob being rotated
with the mouse.
|
void |
mouseEvent(MouseEvent event)
Basic mouse event handler for all round components.
|
void |
pre()
Used to implement inertia
|
void |
setControlMode(int mode)
Set the mouse control mode to use, acceptable values are
GKnob.CTRL_ANGULAR or GKnob.CTRL_HORIZONTAL) orGKnob.CTRL_VERTICAL |
void |
setInertia(int inertia) |
void |
setLimits(float init,
float start,
float end)
Set the range of values that are to be returned by this control.
|
void |
setMouseORA(boolean overRotArcOnly)
If this is set to false (the default value) then the mouse button
can be pressed over any part of the knob and bzeel to start rotating
the knob.
|
void |
setSensitivity(float sensitivity)
This gets the sensitivity to be used in modes CTRL_HORIZONTAL and CTRL_VERTICAL
A value of 1 is 1 degree per pixel and a value of 2 is 2 degrees per pixel. |
void |
setValue(float newValue)
Set the current value of the control
|
void |
setValue(float newValue,
boolean ignoreInteria)
The same as setValue(newValue) except the second parameter determines
whether we should ignore any inertia value so the affect is immediate.
|
add, addAbsoluteControl, addCompoundControl, addEventHandler, addEventHandler, addRelativeControl, addXXX, calcAbsPosition, changeWindow, compareTo, contains, ctrlMode, dispose, draw, getAlpha, getBorder, getCtrlMode, getEventType, getFocusObject, getHeight, getOpaque, getPApplet, getParent, getStyledText, getText, getTransform, getWidth, getX, getY, hasFocus, hasKeyFocus, isEnabled, isOver, isVisible, keyPressed, remove, setAlpha, setBorder, setColorScheme, setEnabled, setFocus, setFont, setFontNew, setFontNew, setHeight, setLocalColorScheme, setOpaque, setRotation, setText, setText, setTextAlign, setTextNew, setTextNew, setVisible, setWidth, setX, setXY, setY, toString
public boolean wrap0
public int needleAngle
public int lastTargetNeedleAngle
public int targetNeedleAngle
public GRoundControl(PApplet theApplet, int x, int y, int width, int height, int arcStart, int arcEnd)
public GRoundControl(PApplet theApplet, int x, int y, int size, int arcStart, int arcEnd)
public void pre()
pre
in class GComponent
public void mouseEvent(MouseEvent event)
mouseEvent
in class GComponent
public abstract boolean isOverRotArc(int mouseX, int mouseY)
mouseX
- mouseY
- public boolean isValueChanging()
public int getControlMode()
public void setControlMode(int mode)
mode
- the mode to setpublic float getSensitivity()
public void setSensitivity(float sensitivity)
sensitivity
- the sensitivity to setpublic int getInertia()
public void setInertia(int inertia)
inertia
- the inertia to setpublic boolean isMouseORA()
public void setMouseORA(boolean overRotArcOnly)
public float getValuef()
public int getValue()
public void setLimits(float init, float start, float end)
init
- initial value of controlstart
- value matching the start rotationend
- value matching the start rotation (Values < start are acceptable)public void setValue(float newValue)
newValue
- the value to use will be constrained to legal vales.public void setValue(float newValue, boolean ignoreInteria)
newValue
- the value we wish the slider to becomeignoreInteria
- if true change is immediateProcessing library guicomponents by Peter Lager. (C) 2012