grafica
Class GTitle

java.lang.Object
  extended by grafica.GTitle
All Implemented Interfaces:
PConstants

public class GTitle
extends Object
implements PConstants

Title class.

Author:
Javier Gracia Carpio http://www.openprocessing.org/user/16300

Field Summary
 
Fields inherited from interface processing.core.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
 
Constructor Summary
GTitle(PApplet parent, float[] dim)
          Constructor
 
Method Summary
 void draw()
          Draws the plot title
 void setDim(float[] newDim)
          Sets the plot box dimensions information
 void setDim(float xDim, float yDim)
          Sets the plot box dimensions information
 void setFontColor(int newFontColor)
          Sets the font color
 void setFontName(String newFontName)
          Sets the font name
 void setFontProperties(String newFontName, int newFontColor, int newFontSize)
          Sets all the font properties at once
 void setFontSize(int newFontSize)
          Sets the font size
 void setOffset(float newOffset)
          Sets the title offset
 void setRelativePos(float newRelativePos)
          Sets the title relative position in the plot
 void setText(String newText)
          Sets the title text
 void setTextAlignment(int newTextAlignment)
          Sets the title type of text alignment
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GTitle

public GTitle(PApplet parent,
              float[] dim)
Constructor

Parameters:
parent - the parent Processing applet
dim - the plot box dimensions in pixels
Method Detail

draw

public void draw()
Draws the plot title


setDim

public void setDim(float xDim,
                   float yDim)
Sets the plot box dimensions information

Parameters:
xDim - the new plot box x dimension
yDim - the new plot box y dimension

setDim

public void setDim(float[] newDim)
Sets the plot box dimensions information

Parameters:
newDim - the new plot box dimensions information

setRelativePos

public void setRelativePos(float newRelativePos)
Sets the title relative position in the plot

Parameters:
newRelativePos - the new relative position in the plot

setOffset

public void setOffset(float newOffset)
Sets the title offset

Parameters:
newOffset - the new title offset

setText

public void setText(String newText)
Sets the title text

Parameters:
newText - the new title text

setTextAlignment

public void setTextAlignment(int newTextAlignment)
Sets the title type of text alignment

Parameters:
newTextAlignment - the new type of text alignment

setFontName

public void setFontName(String newFontName)
Sets the font name

Parameters:
newFontName - the name of the new font

setFontColor

public void setFontColor(int newFontColor)
Sets the font color

Parameters:
newFontColor - the new font color

setFontSize

public void setFontSize(int newFontSize)
Sets the font size

Parameters:
newFontSize - the new font size

setFontProperties

public void setFontProperties(String newFontName,
                              int newFontColor,
                              int newFontSize)
Sets all the font properties at once

Parameters:
newFontName - the name of the new font
newFontColor - the new font color
newFontSize - the new font size


Processing library grafica by Javier Gracia Carpio. (c) 2013