public abstract class GWindow extends processing.core.PApplet implements GConstants
Modifier and Type | Field and Description |
---|---|
static int |
ALL_METHOD |
static int |
CLIP_RUN |
static int |
COMBI_MODES |
GWinData |
data
Used to associated data to a GWindow
|
static java.lang.String |
DEFAULT_SLIDER_STYLE |
static int |
DRAG_CONTROL |
static int |
DRAW_METHOD |
static char |
EOL |
static int |
EXCP_IN_HANDLER |
static int[][] |
grid |
static int |
GROUP_CONTROL_METHOD |
static int |
I_CL |
static int |
I_COVERED |
static int |
I_CR |
static int |
I_INSIDE |
static int |
I_MODES |
static int |
I_NONE |
static int |
I_TL |
static int |
I_TR |
static int |
INVALID_PAPPLET |
static int |
INVALID_TYPE |
static int |
KEY_METHOD |
static int |
MERGE_RUNS |
static int |
MISSING |
static int |
MOUSE_METHOD |
static int |
NONEXISTANT |
static int |
OFF_CONTROL |
static int |
OVER_CONTROL |
static java.awt.BasicStroke |
pen_1_0 |
static java.awt.BasicStroke |
pen_2_0 |
static java.awt.BasicStroke |
pen_3_0 |
static java.awt.BasicStroke |
pen_4_0 |
static int |
POST_METHOD |
static int |
PRE_METHOD |
static int |
PRESS_CONTROL |
static int |
SCROLLBAR_HORIZONTAL |
static int |
SCROLLBAR_VERTICAL |
static java.lang.String |
SLIDER_STYLES |
java.lang.String |
tag
Simple tag that can be used by the user
|
int |
tagNo
Allows user to specify a number for this component
|
static int |
TINT_FOR_ALPHA |
java.util.LinkedList<GAbstractControl> |
toAdd |
java.util.LinkedList<GAbstractControl> |
toRemove |
static int |
TPAD2 |
static int |
TPAD4 |
static int |
TPAD6 |
static int |
TPAD8 |
static float |
WHEEL_DELTA |
static float |
WHEEL_STICK_FACTOR |
java.util.LinkedList<GAbstractControl> |
windowControls |
static int |
Z_PANEL |
static int |
Z_SLIPPY |
static int |
Z_SLIPPY_EXPANDS |
static int |
Z_STICKY |
args, ARGS_DENSITY, ARGS_DISPLAY, ARGS_EDITOR_LOCATION, ARGS_EXTERNAL, ARGS_HIDE_STOP, ARGS_LOCATION, ARGS_PRESENT, ARGS_SKETCH_FOLDER, ARGS_STOP_COLOR, ARGS_WINDOW_COLOR, DEFAULT_HEIGHT, DEFAULT_WIDTH, displayHeight, displayWidth, EXTERNAL_MOVE, EXTERNAL_STOP, finished, firstMouse, focused, frame, frameCount, frameRate, g, height, javaPlatform, javaVersion, javaVersionName, key, keyCode, keyEvent, keyPressed, mouseButton, mouseEvent, mousePressed, mouseX, mouseY, pixelDensity, pixelHeight, pixels, pixelWidth, platform, pmouseX, pmouseY, recorder, requestImageMax, useNativeSelect, width
ALPHA_BLOCK, ALPHA_PICK, BACKGROUND, BLUE_SCHEME, CANCEL, CLOSE_WINDOW, CLOSED, CTRL_ANGULAR, CTRL_HORIZONTAL, CTRL_VERTICAL, CYAN_SCHEME, DECIMAL, END, ERROR, EXIT_APP, EXPONENT, FAMILY, FOREGROUND, FORWARD, GOLD_SCHEME, GREEN_SCHEME, HOME, INFO, INTEGER, KEEP_OPEN, NO, OK, OK_CANCEL, ORANGE_SCHEME, ORIENT_LEFT, ORIENT_RIGHT, ORIENT_TRACK, PLAIN, POSTURE, POSTURE_OBLIQUE, POSTURE_REGULAR, PURPLE_SCHEME, QUERY, RED_SCHEME, REVERSE, SCHEME_10, SCHEME_11, SCHEME_12, SCHEME_13, SCHEME_14, SCHEME_15, SCHEME_8, SCHEME_9, SCROLLBARS_AUTOHIDE, SCROLLBARS_BOTH, SCROLLBARS_HORIZONTAL_ONLY, SCROLLBARS_NONE, SCROLLBARS_VERTICAL_ONLY, SIZE, STRIKETHROUGH, STRIKETHROUGH_OFF, STRIKETHROUGH_ON, SUPERSCRIPT, SUPERSCRIPT_OFF, SUPERSCRIPT_SUB, SUPERSCRIPT_SUPER, USER_COL_SCHEME, WARNING, 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, X4, X8, YELLOW_SCHEME, YES, YES_NO, YES_NO_CANCEL
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_ASYNC_SAVEFRAME, DISABLE_BUFFER_READING, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_KEY_REPEAT, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_ASYNC_SAVEFRAME, ENABLE_BUFFER_READING, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_KEY_REPEAT, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ESC, EXCLUSION, FX2D, 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, SPAN, SPHERE, SPOT, SQUARE, SUBTRACT, SVG, 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
Modifier and Type | Method and Description |
---|---|
void |
addData(GWinData data)
To provide a unique fields for this window create a class that inherits
from GWinData with public access fields.
|
void |
addDrawHandler(java.lang.Object obj,
java.lang.String methodName)
Attempt to add the 'draw' handler method.
|
void |
addKeyHandler(java.lang.Object obj,
java.lang.String methodName)
Attempt to add the 'key' handler method.
|
void |
addMouseHandler(java.lang.Object obj,
java.lang.String methodName)
Attempt to add the 'mouse' handler method.
|
void |
addOnCloseHandler(java.lang.Object obj,
java.lang.String methodName)
Attempt to create the on-close-window event handler for this GWindow.
|
void |
addPostHandler(java.lang.Object obj,
java.lang.String methodName)
Attempt to add the 'post' handler method.
|
void |
addPreHandler(java.lang.Object obj,
java.lang.String methodName)
Attempt to add the 'pre' handler method.
|
void |
close()
This will close the window provided the action-on-close flag is CLOSE_WINDOW
otherwise the window remains open.
|
void |
draw()
Execute any draw handler for this window.
|
void |
forceClose()
This will close the window provided the action-on-close flag is CLOSE_WINDOW
or KEEP_OPEN otherwise the window remains open.
|
abstract processing.core.PVector |
getPosition(processing.core.PVector pos)
Returns a PVector with the windows top-left coordinates.
|
abstract java.lang.String |
getTitle()
Get the windowTitle
|
static GWindow |
getWindow(processing.core.PApplet app,
java.lang.String title,
int px,
int py,
int w,
int h,
java.lang.String renderer)
Factory method to create and start a new window.
|
abstract boolean |
isVisible()
Returns the windows visibility
|
void |
keyEvent(processing.event.KeyEvent event)
Execute any key event handler associated with this window and its controls
|
void |
mouseEvent(processing.event.MouseEvent event)
Execute any mouse event handler associated with this window and its controls
|
void |
performCloseAction()
This method is executed when the window closes.
|
void |
post()
Execute any post handler associated with this window and its controls.
|
void |
pre()
Execute any pre handler associated with this window and its controls
|
abstract void |
setActionOnClose(int action)
This sets what happens when the users attempts to close the window.
|
void |
setAlwaysOnTop(boolean ontop)
Sets whether this window should always be above other windows.
|
void |
setLocation(int x,
int y)
Set the windows position
|
void |
settings() |
void |
setTitle(java.lang.String title)
Set the window title
|
void |
setup() |
void |
setVisible(boolean visible)
Set the windows visibility
|
abs, abs, acos, 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, attrib, attrib, attrib, attribColor, attribNormal, attribPosition, 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, 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, copy, cos, createFont, createFont, createFont, createGraphics, createGraphics, createGraphics, createImage, createInput, createInput, createInputRaw, createOutput, createOutput, createPath, createPath, createReader, createReader, createReader, 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, die, die, directionalLight, displayDensity, displayDensity, dispose, dist, dist, edge, ellipse, ellipseMode, emissive, emissive, emissive, endCamera, endContour, endPGL, endRaw, endRecord, endShape, endShape, exec, exit, exitActual, exitCalled, 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, focusLost, frameMoved, frameRate, frameResized, frustum, fullScreen, fullScreen, fullScreen, fullScreen, get, get, get, getExtension, getGraphics, getMatrix, getMatrix, getMatrix, getSurface, green, handleDraw, hex, hex, hex, hex, hideMenuBar, hint, hour, hue, image, image, image, imageMode, insertFrame, isLooping, join, join, keyPressed, keyPressed, keyReleased, keyReleased, keyTyped, keyTyped, launch, lerp, lerpColor, lerpColor, lightFalloff, lights, lightSpecular, line, line, link, listFiles, listFiles, listPaths, 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, 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, mouseDragged, mouseDragged, mouseEntered, mouseEntered, mouseExited, mouseExited, mouseMoved, mouseMoved, mousePressed, mousePressed, mouseReleased, mouseReleased, mouseWheel, mouseWheel, nf, nf, 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, orientation, ortho, ortho, ortho, parseBoolean, parseBoolean, parseBoolean, parseBoolean, parseByte, parseByte, parseByte, parseByte, parseByte, parseByte, parseByte, parseByte, parseChar, parseChar, parseChar, parseChar, parseFloat, 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, pixelDensity, 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, registerMethod, requestImage, requestImage, resetMatrix, resetShader, resetShader, resume, reverse, reverse, reverse, reverse, reverse, reverse, reverse, rotate, rotate, rotateX, rotateY, rotateZ, round, 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, selectFolder, selectInput, selectInput, selectInput, selectInput, selectInput, selectOutput, selectOutput, selectOutput, selectOutput, selectOutput, set, set, setMatrix, setMatrix, setMatrix, setSize, 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, sketchDisplay, sketchFile, sketchFullScreen, sketchHeight, sketchOutputPath, sketchOutputStream, sketchPath, sketchPath, sketchPixelDensity, sketchRenderer, sketchSmooth, sketchWidth, sketchWindowColor, 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, 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, unregisterMethod, updatePixels, updatePixels, urlDecode, urlEncode, vertex, vertex, vertex, vertex, vertex, year
public GWinData data
public java.lang.String tag
public int tagNo
public java.util.LinkedList<GAbstractControl> windowControls
public java.util.LinkedList<GAbstractControl> toRemove
public java.util.LinkedList<GAbstractControl> toAdd
public static final java.lang.String SLIDER_STYLES
public static final java.lang.String DEFAULT_SLIDER_STYLE
public static final int DRAW_METHOD
public static final int MOUSE_METHOD
public static final int PRE_METHOD
public static final int KEY_METHOD
public static final int POST_METHOD
public static final int ALL_METHOD
public static final int GROUP_CONTROL_METHOD
public static final int MISSING
public static final int NONEXISTANT
public static final int INVALID_TYPE
public static final int INVALID_PAPPLET
public static final int EXCP_IN_HANDLER
public static final int OFF_CONTROL
public static final int OVER_CONTROL
public static final int PRESS_CONTROL
public static final int DRAG_CONTROL
public static final int TINT_FOR_ALPHA
public static final int I_NONE
public static final int I_TL
public static final int I_TR
public static final int I_CL
public static final int I_CR
public static final int I_INSIDE
public static final int I_COVERED
public static final int I_MODES
public static final int MERGE_RUNS
public static final int CLIP_RUN
public static final int COMBI_MODES
public static final int[][] grid
public static final java.awt.BasicStroke pen_1_0
public static final java.awt.BasicStroke pen_2_0
public static final java.awt.BasicStroke pen_3_0
public static final java.awt.BasicStroke pen_4_0
public static final int TPAD2
public static final int TPAD4
public static final int TPAD6
public static final int TPAD8
public static final int SCROLLBAR_VERTICAL
public static final int SCROLLBAR_HORIZONTAL
public static final float WHEEL_DELTA
public static final float WHEEL_STICK_FACTOR
public static final char EOL
public static final int Z_STICKY
public static final int Z_SLIPPY
public static final int Z_SLIPPY_EXPANDS
public static final int Z_PANEL
public static GWindow getWindow(processing.core.PApplet app, java.lang.String title, int px, int py, int w, int h, java.lang.String renderer)
title
- text to appear in frame title barpx
- horizontal position of top-left cornerpy
- vertical position of top-left cornerw
- width of drawing surfaceh
- height of surfacer
- renderer must be JAVA2D, P3D or P3Dpublic void addData(GWinData data)
data
- public void setVisible(boolean visible)
public abstract boolean isVisible()
public void setTitle(java.lang.String title)
public abstract java.lang.String getTitle()
public void setLocation(int x, int y)
public abstract processing.core.PVector getPosition(processing.core.PVector pos)
public void setAlwaysOnTop(boolean ontop)
public void draw()
draw
in class processing.core.PApplet
public void pre()
public void post()
public void mouseEvent(processing.event.MouseEvent event)
public void keyEvent(processing.event.KeyEvent event)
public void addDrawHandler(java.lang.Object obj, java.lang.String methodName)
obj
- the object to handle the eventmethodName
- the method to execute in the object handler classpublic void addPreHandler(java.lang.Object obj, java.lang.String methodName)
obj
- the object to handle the eventmethodName
- the method to execute in the object handler classpublic void addMouseHandler(java.lang.Object obj, java.lang.String methodName)
obj
- the object to handle the eventmethodName
- the method to execute in the object handler classpublic void addKeyHandler(java.lang.Object obj, java.lang.String methodName)
obj
- the object to handle the eventmethodName
- the method to execute in the object handler classpublic void addPostHandler(java.lang.Object obj, java.lang.String methodName)
obj
- the object to handle the eventmethodName
- the method to execute in the object handler classpublic void addOnCloseHandler(java.lang.Object obj, java.lang.String methodName)
obj
- the object to handle the on-close-window eventmethodName
- the method to execute in the object handler classpublic void close()
public void forceClose()
public abstract void setActionOnClose(int action)
action
- the required close actionpublic void settings()
settings
in class processing.core.PApplet
public void setup()
setup
in class processing.core.PApplet
public void performCloseAction()
Processing library G4P by Peter Lager. (c) 2017