processing.app.tools

## Class ColorSelector.ColorSlider

- Object
- - Component
  - - Container
    - - Panel
      - - Applet
        - - PApplet
          - - ColorSelector.ColorSlider

- All Implemented Interfaces:
    FocusListener, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, ImageObserver, MenuContainer, Serializable, Runnable, EventListener, Accessible, PConstants
  Enclosing class:
    ColorSelector

      public class ColorSelector.ColorSlider
      extends PApplet

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class PApplet

      `PApplet.RendererChangeException`

    - ### Nested classes/interfaces inherited from class Component

      `Component.BaselineResizeBehavior`

  - ### Field Summary

    - ### Fields inherited from class PApplet

      `args, ARGS_BGCOLOR, ARGS_DISPLAY, ARGS_EDITOR_LOCATION, ARGS_EXTERNAL, ARGS_FULL_SCREEN, ARGS_HIDE_STOP, ARGS_LOCATION, ARGS_PRESENT, ARGS_SKETCH_FOLDER, ARGS_STOP_COLOR, DEFAULT_HEIGHT, DEFAULT_WIDTH, defaultSize, displayHeight, displayWidth, EXTERNAL_MOVE, EXTERNAL_STOP, finished, firstMouse, focused, frame, frameCount, frameRate, g, height, javaVersion, javaVersionName, key, keyCode, keyEvent, keyPressed, MIN_WINDOW_HEIGHT, MIN_WINDOW_WIDTH, mouseButton, mouseEvent, mousePressed, mouseX, mouseY, online, paused, pixels, platform, pmouseX, pmouseY, recorder, requestImageMax, sketchPath, useNativeSelect, useQuartz, width`

    - ### Fields inherited from class Component

      `BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

    - ### Fields inherited from interface PConstants

      `ADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_RETINA_PIXELS, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_RETINA_PIXELS, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, 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, 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, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPHERE, SPOT, SQUARE, SUBTRACT, TAB, TARGA, TAU, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z`

    - ### Fields inherited from interface ImageObserver

      `ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColorSelector.ColorSlider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `draw()` ( begin auto-generated from draw.xml ) Called directly after setup() and continuously executes the lines of code contained inside its block until the program is stopped or noLoop() is called.
    `Dimension` | `getMaximumSize()`
    `Dimension` | `getMinimumSize()`
    `Dimension` | `getPreferredSize()`
    `void` | `keyPressed()` ( begin auto-generated from keyPressed.xml ) The keyPressed() function is called once every time a key is pressed.
    `void` | `mouseDragged()` ( begin auto-generated from mouseDragged.xml ) The mouseDragged() function is called once every time the mouse moves and a mouse button is pressed.
    `void` | `mousePressed()` ( begin auto-generated from mousePressed.xml ) The mousePressed() function is called once after every time a mouse button is pressed.
    `void` | `setup()` ( begin auto-generated from setup.xml ) The setup() function is called once when the program starts.
    `void` | `updateMouse()`

    - ### Methods inherited from class PApplet

      `abs, abs, acos, addListeners, alpha, ambient, ambient, ambient, ambientLight, ambientLight, append, append, append, append, append, append, applyMatrix, applyMatrix, applyMatrix, applyMatrix, applyMatrix, arc, arc, arraycopy, arrayCopy, arraycopy, arrayCopy, arraycopy, arrayCopy, asin, atan, atan2, background, background, background, background, background, background, background, beginCamera, beginContour, beginPGL, beginRaw, beginRaw, beginRecord, beginRecord, beginShape, beginShape, bezier, bezier, bezierDetail, bezierPoint, bezierTangent, bezierVertex, bezierVertex, binary, binary, binary, binary, blend, blend, blendColor, blendMode, blue, box, box, brightness, camera, camera, canDraw, ceil, checkExtension, clear, clip, color, color, color, color, color, color, color, color, colorMode, colorMode, colorMode, colorMode, concat, concat, concat, concat, concat, concat, concat, constrain, constrain, copy, copy, cos, createFont, createFont, createFont, createGraphics, createGraphics, createGraphics, createImage, createInput, createInput, createInputRaw, createOutput, createOutput, createPath, createPath, createReader, createReader, createReader, createShape, createShape, createShape, createShape, createWriter, createWriter, createWriter, cursor, cursor, cursor, cursor, curve, curve, curveDetail, curvePoint, curveTangent, curveTightness, curveVertex, curveVertex, dataFile, dataPath, day, debug, degrees, delay, desktopFile, desktopPath, destroy, die, die, directionalLight, displayable, dispose, dist, dist, edge, ellipse, ellipseMode, emissive, emissive, emissive, endCamera, endContour, endPGL, endRaw, endRecord, endShape, endShape, exec, exit, exp, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, fill, fill, fill, fill, fill, fill, filter, filter, filter, floor, flush, focusGained, focusGained, focusLost, focusLost, frameRate, frustum, get, get, get, getCache, getExtension, getMatrix, getMatrix, getMatrix, green, handleDraw, hex, hex, hex, hex, hint, hour, hue, image, image, image, imageMode, init, insertFrame, isGL, join, join, keyPressed, keyPressed, keyReleased, keyReleased, keyReleased, keyTyped, keyTyped, keyTyped, lerp, lerpColor, lerpColor, lightFalloff, lights, lightSpecular, line, line, link, link, loadBytes, loadBytes, loadBytes, loadFont, loadImage, loadImage, loadJSONArray, loadJSONArray, loadJSONObject, loadJSONObject, loadPixels, loadShader, loadShader, loadShape, loadShape, loadStrings, loadStrings, loadStrings, loadStrings, loadTable, loadTable, loadXML, loadXML, log, loop, mag, mag, main, main, main, map, mask, match, matchAll, max, max, max, max, max, max, method, millis, min, min, min, min, min, min, minute, modelX, modelY, modelZ, month, mouseClicked, mouseClicked, mouseClicked, mouseDragged, mouseDragged, mouseEntered, mouseEntered, mouseEntered, mouseExited, mouseExited, mouseExited, mouseMoved, mouseMoved, mouseMoved, mousePressed, mousePressed, mouseReleased, mouseReleased, mouseReleased, mouseWheel, mouseWheel, mouseWheelMoved, nf, nf, nf, nf, nfc, nfc, nfc, nfc, nfp, nfp, nfp, nfp, nfs, nfs, nfs, nfs, noClip, noCursor, noFill, noise, noise, noise, noiseDetail, noiseDetail, noiseSeed, noLights, noLoop, norm, normal, noSmooth, noStroke, noTexture, noTint, open, open, openStream, orientation, ortho, ortho, ortho, paint, param, parseBoolean, parseBoolean, parseBoolean, parseBoolean, parseByte, parseByte, parseByte, parseByte, parseByte, parseByte, parseByte, parseByte, parseByte, parseChar, parseChar, parseChar, parseChar, parseFloat, parseFloat, parseFloat, parseFloat, parseFloat, parseFloat, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseJSONArray, parseJSONObject, parseXML, parseXML, pause, perspective, perspective, point, point, pointLight, popMatrix, popStyle, postEvent, pow, print, print, print, print, print, print, print, print, print, printArray, printCamera, println, println, println, println, println, println, println, println, println, println, println, printMatrix, printProjection, pushMatrix, pushStyle, quad, quadraticVertex, quadraticVertex, radians, random, random, randomGaussian, randomSeed, rect, rect, rect, rectMode, red, redraw, registerDispose, registerDraw, registerKeyEvent, registerMethod, registerMouseEvent, registerPost, registerPre, registerSize, removeCache, removeListeners, requestImage, requestImage, resetMatrix, resetShader, resetShader, resume, reverse, reverse, reverse, reverse, reverse, reverse, reverse, rotate, rotate, rotateX, rotateY, rotateZ, round, run, runSketch, saturation, save, saveBytes, saveBytes, saveBytes, saveFile, saveFrame, saveFrame, saveJSONArray, saveJSONArray, saveJSONObject, saveJSONObject, savePath, saveStream, saveStream, saveStream, saveStream, saveStream, saveStrings, saveStrings, saveStrings, saveTable, saveTable, saveXML, saveXML, scale, scale, scale, screenX, screenX, screenY, screenY, screenZ, second, selectFolder, selectFolder, selectFolder, selectFolder, selectInput, selectInput, selectInput, selectInput, selectOutput, selectOutput, selectOutput, selectOutput, set, set, setCache, setMatrix, setMatrix, setMatrix, setupExternalMessages, setupFrameResizeListener, shader, shader, shape, shape, shape, shapeMode, shearX, shearY, shininess, shorten, shorten, shorten, shorten, shorten, shorten, shorten, showDepthWarning, showDepthWarningXYZ, showMethodWarning, showMissingWarning, showVariationWarning, sin, size, size, size, sketchFile, sketchFullScreen, sketchHeight, sketchPath, sketchQuality, sketchRenderer, sketchWidth, smooth, smooth, sort, sort, sort, sort, sort, sort, sort, sort, sort, sort, specular, specular, specular, sphere, sphereDetail, sphereDetail, splice, splice, splice, splice, splice, splice, splice, splice, splice, splice, splice, splice, splice, split, split, splitTokens, splitTokens, spotLight, sq, sqrt, start, status, stop, str, str, str, str, str, str, str, str, str, str, stroke, stroke, stroke, stroke, stroke, stroke, strokeCap, strokeJoin, strokeWeight, style, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, tan, text, text, text, text, text, text, text, text, text, text, text, textAlign, textAlign, textAscent, textDescent, textFont, textFont, textLeading, textMode, textSize, texture, textureMode, textureWrap, textWidth, textWidth, textWidth, thread, tint, tint, tint, tint, tint, tint, translate, translate, triangle, trim, trim, unbinary, unhex, unregisterDispose, unregisterDraw, unregisterKeyEvent, unregisterMethod, unregisterMouseEvent, unregisterPost, unregisterPre, unregisterSize, update, updateListeners, updatePixels, updatePixels, urlDecode, urlEncode, vertex, vertex, vertex, vertex, vertex, year`

    - ### Methods inherited from class Applet

      `getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus`

    - ### Methods inherited from class Panel

      `addNotify`

    - ### Methods inherited from class Container

      `add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, validate`

    - ### Methods inherited from class Component

      `action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ColorSelector.ColorSlider

          public ColorSelector.ColorSlider()

  - ### Method Detail

    - #### setup

          public void setup()

      Description copied from class: `PApplet`
      ( begin auto-generated from setup.xml ) The setup() function is called once when the program starts. It's used to define initial enviroment properties such as screen size and background color and to load media such as images and fonts as the program starts. There can only be one setup() function for each program and it shouldn't be called again after its initial execution. Note: Variables declared within setup() are not accessible within other functions, including draw(). ( end auto-generated )
      Overrides:
        `setup` in class `PApplet`
      See Also:
        `PApplet.size(int, int)`, `PApplet.loop()`, `PApplet.noLoop()`, `PApplet.draw()`

    - #### draw

          public void draw()

      Description copied from class: `PApplet`
      ( begin auto-generated from draw.xml ) Called directly after setup() and continuously executes the lines of code contained inside its block until the program is stopped or noLoop() is called. The draw() function is called automatically and should never be called explicitly. It should always be controlled with noLoop(), redraw() and loop(). After noLoop() stops the code in draw() from executing, redraw() causes the code inside draw() to execute once and loop() will causes the code inside draw() to execute continuously again. The number of times draw() executes in each second may be controlled with frameRate() function. There can only be one draw() function for each sketch and draw() must exist if you want the code to run continuously or to process events such as mousePressed(). Sometimes, you might have an empty call to draw() in your program as shown in the above example. ( end auto-generated )
      Overrides:
        `draw` in class `PApplet`
      See Also:
        `PApplet.setup()`, `PApplet.loop()`, `PApplet.noLoop()`, `PApplet.redraw()`, `PApplet.frameRate(float)`

    - #### mousePressed

          public void mousePressed()

      Description copied from class: `PApplet`
      ( begin auto-generated from mousePressed.xml ) The mousePressed() function is called once after every time a mouse button is pressed. The mouseButton variable (see the related reference entry) can be used to determine which button has been pressed. ( end auto-generated )

      ### Advanced

      If you must, use int button = mouseEvent.getButton(); to figure out which button was clicked. It will be one of: MouseEvent.BUTTON1, MouseEvent.BUTTON2, MouseEvent.BUTTON3 Note, however, that this is completely inconsistent across platforms.
      Overrides:
        `mousePressed` in class `PApplet`
      See Also:
        `PApplet.mouseX`, `PApplet.mouseY`, `PApplet.mousePressed`, `PApplet.mouseButton`, `PApplet.mouseReleased()`, `PApplet.mouseMoved()`, `PApplet.mouseDragged()`

    - #### mouseDragged

          public void mouseDragged()

      Description copied from class: `PApplet`
      ( begin auto-generated from mouseDragged.xml ) The mouseDragged() function is called once every time the mouse moves and a mouse button is pressed. ( end auto-generated )
      Overrides:
        `mouseDragged` in class `PApplet`
      See Also:
        `PApplet.mouseX`, `PApplet.mouseY`, `PApplet.mousePressed`, `PApplet.mousePressed()`, `PApplet.mouseReleased()`, `PApplet.mouseMoved()`

    - #### updateMouse

          public void updateMouse()

    - #### getPreferredSize

          public Dimension getPreferredSize()

      Overrides:
        `getPreferredSize` in class `Container`

    - #### getMinimumSize

          public Dimension getMinimumSize()

      Overrides:
        `getMinimumSize` in class `Container`

    - #### getMaximumSize

          public Dimension getMaximumSize()

      Overrides:
        `getMaximumSize` in class `Container`

    - #### keyPressed

          public void keyPressed()

      Description copied from class: `PApplet`
      ( begin auto-generated from keyPressed.xml ) The keyPressed() function is called once every time a key is pressed. The key that was pressed is stored in the key variable.
      For non-ASCII keys, use the keyCode variable. The keys included in the ASCII specification (BACKSPACE, TAB, ENTER, RETURN, ESC, and DELETE) do not require checking to see if they key is coded, and you should simply use the key variable instead of keyCode If you're making cross-platform projects, note that the ENTER key is commonly used on PCs and Unix and the RETURN key is used instead on Macintosh. Check for both ENTER and RETURN to make sure your program will work for all platforms.
      Because of how operating systems handle key repeats, holding down a key may cause multiple calls to keyPressed() (and keyReleased() as well). The rate of repeat is set by the operating system and how each computer is configured. ( end auto-generated )

      ### Advanced

      Called each time a single key on the keyboard is pressed. Because of how operating systems handle key repeats, holding down a key will cause multiple calls to keyPressed(), because the OS repeat takes over.

      Examples for key handling: (Tested on Windows XP, please notify if different on other platforms, I have a feeling Mac OS and Linux may do otherwise)

           1. Pressing 'a' on the keyboard:
              keyPressed  with key == 'a' and keyCode == 'A'
              keyTyped    with key == 'a' and keyCode ==  0
              keyReleased with key == 'a' and keyCode == 'A'

           2. Pressing 'A' on the keyboard:
              keyPressed  with key == 'A' and keyCode == 'A'
              keyTyped    with key == 'A' and keyCode ==  0
              keyReleased with key == 'A' and keyCode == 'A'

           3. Pressing 'shift', then 'a' on the keyboard (caps lock is off):
              keyPressed  with key == CODED and keyCode == SHIFT
              keyPressed  with key == 'A'   and keyCode == 'A'
              keyTyped    with key == 'A'   and keyCode == 0
              keyReleased with key == 'A'   and keyCode == 'A'
              keyReleased with key == CODED and keyCode == SHIFT

           4. Holding down the 'a' key.
              The following will happen several times,
              depending on your machine's "key repeat rate" settings:
              keyPressed  with key == 'a' and keyCode == 'A'
              keyTyped    with key == 'a' and keyCode ==  0
              When you finally let go, you'll get:
              keyReleased with key == 'a' and keyCode == 'A'

           5. Pressing and releasing the 'shift' key
              keyPressed  with key == CODED and keyCode == SHIFT
              keyReleased with key == CODED and keyCode == SHIFT
              (note there is no keyTyped)

           6. Pressing the tab key in an applet with Java 1.4 will
              normally do nothing, but PApplet dynamically shuts
              this behavior off if Java 1.4 is in use (tested 1.4.2_05 Windows).
              Java 1.1 (Microsoft VM) passes the TAB key through normally.
              Not tested on other platforms or for 1.3.

      Overrides:
        `keyPressed` in class `PApplet`
      See Also:
        `PApplet.key`, `PApplet.keyCode`, `PApplet.keyPressed`, `PApplet.keyReleased()`