public class FPanel extends GComponent
GComponent.Z_Order
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 |
---|
FPanel(PApplet theApplet,
float p0,
float p1,
float p2,
float p3,
String text)
Create a Panel that comprises of 2 parts the tab which is used to
select and move the panel and the container window below the tab which
is used to hold other components.
|
Modifier and Type | Method and Description |
---|---|
void |
bringToFront()
Bring this panel to the front i.e.
|
void |
draw()
Draw the panel.
|
int |
getTabHeight() |
boolean |
isCollapsed()
Find out if the panel is collapsed
|
boolean |
isDragging()
This method is used to discover whether the panel is being
dragged to a new position on the screen.
|
boolean |
isOver(int ax,
int ay)
Determines whether the position ax, ay is over the tab
of this GPanel.
|
boolean |
isOverPanel(int ax,
int ay)
Determines whether the position ax, ay is over the panel, takimg
into account whether the panel is collapsed or not.
|
void |
mouseEvent(MouseEvent event)
All GUI components are registered for mouseEvents
|
void |
setAlpha(int alpha)
Controls the transparency of this panel and all the
components on it.
|
void |
setCollapsed(boolean collapse)
Collapse or open the panel
|
void |
setControlsEnabled(boolean enable) |
void |
setFont(String fontname,
int fontsize)
Set the font & size for the tab text changing the height (+/-)
of the tab if necessary to display text.
|
void |
setFText(String text) |
void |
setVisible(boolean visible)
If the panel is made invisible then disable the controls
|
add, addAbsoluteControl, addCompoundControl, addEventHandler, addEventHandler, addRelativeControl, addXXX, calcAbsPosition, changeWindow, compareTo, contains, ctrlMode, dispose, getAlpha, getBorder, getCtrlMode, getEventType, getFocusObject, getHeight, getOpaque, getPApplet, getParent, getStyledText, getText, getTransform, getWidth, getX, getY, hasFocus, hasKeyFocus, isEnabled, isVisible, keyPressed, pre, remove, setBorder, setColorScheme, setEnabled, setFocus, setFontNew, setFontNew, setHeight, setLocalColorScheme, setOpaque, setRotation, setText, setText, setTextAlign, setTextNew, setTextNew, setWidth, setX, setXY, setY, toString
public FPanel(PApplet theApplet, float p0, float p1, float p2, float p3, String text)
theApplet
- the PApplet referencex
- horizontal positiony
- vertical positionwidth
- width of the panelheight
- height of the panel (excl. tab)text
- to appear on tabpublic void setFText(String text)
public void setFont(String fontname, int fontsize)
setFont
in class GComponent
public void bringToFront()
public void draw()
draw
in class GComponent
public void mouseEvent(MouseEvent event)
mouseEvent
in class GComponent
public boolean isDragging()
public boolean isOver(int ax, int ay)
isOver
in class GComponent
ax
- x positionay
- y positionpublic boolean isOverPanel(int ax, int ay)
ax
- x positionay
- y positionpublic void setControlsEnabled(boolean enable)
public void setVisible(boolean visible)
setVisible
in class GComponent
visible
- the visible to setpublic void setAlpha(int alpha)
setAlpha
in class GComponent
alpha
- public void setCollapsed(boolean collapse)
collapse
- public boolean isCollapsed()
public int getTabHeight()
Processing library guicomponents by Peter Lager. (C) 2012