public class Icon extends Controller<Icon>
Modifier and Type | Field and Description |
---|---|
static int |
autoHeight |
static int |
autoWidth |
autoSpacing
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DOUBLE_PRESS, ACTION_DRAG, ACTION_END_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASE_OUTSIDE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_START_DRAG, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, delimiter, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, JSON, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, pathdelimiter, PI, PRESS, PRESSED, PRINT, PURPLE, RED, RELEASE, RELEASED, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SERIALIZED, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_GREY, THEME_RED, THEME_RETRO, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description |
---|
Icon(ControlP5 theControlP5,
java.lang.String theName) |
Modifier and Type | Method and Description |
---|---|
Icon |
activateBy(int theValue)
A Icon can be activated by a mouse PRESSED or mouse
RELEASE.
|
boolean |
getBooleanValue()
Returns true or false and indicates the switch state
of the Icon.
|
int |
getFontIcon(int theState) |
java.lang.String |
getInfo() |
Icon |
hideBackground() |
boolean |
isOn() |
boolean |
isPressed() |
boolean |
isSwitch() |
void |
mousePressed() |
void |
mouseReleased() |
void |
mouseReleasedOutside() |
Icon |
setFill(boolean theBoolean) |
Icon |
setFont(processing.core.PFont thePFont) |
Icon |
setFont(processing.core.PFont thePFont,
int theSize) |
Icon |
setFontIcon(int theId) |
Icon |
setFontIcon(int theId,
int theState) |
Icon |
setFontIconOff(int theStateOff) |
Icon |
setFontIconOn(int theStateOn) |
Icon |
setFontIcons(int... theIds) |
Icon |
setFontIcons(int theStateOff,
int theStateOn) |
Icon |
setFontIconSize(int theSize) |
Icon |
setFontIndex(int theIndex) |
Icon |
setOff()
If the Icon acts as a switch, setOff will turn off
the switch.
|
Icon |
setOn()
If the Icon acts as a switch, setOn will turn on
the switch.
|
Icon |
setRoundedCorners(int theRadius) |
Icon |
setScale(float theScalePressed,
float theScaleReleased) |
Icon |
setStroke(boolean theBoolean) |
Icon |
setStrokeWeight(float theStrokeWeight) |
Icon |
setSwitch(boolean theFlag)
Turns an icon into a switch.
|
Icon |
setValue(float theValue) |
Icon |
showBackground() |
java.lang.String |
toString() |
Icon |
update()
updates the value of the controller without having to set the value explicitly.
|
Icon |
updateDisplayMode(int theMode) |
Icon |
updateViewMode(int theMode) |
add, addCallback, addListener, addListenerFor, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, onChange, onClick, onDoublePress, onDrag, onDraw, onEndDrag, onEnter, onLeave, onMove, onPress, onRelease, onReleaseOutside, onStartDrag, onWheel, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeListenerFor, removeListenersFor, removeProperty, removeProperty, set, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorLabel, setColorValue, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabel, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize, x, y
public Icon(ControlP5 theControlP5, java.lang.String theName)
public Icon activateBy(int theValue)
public boolean getBooleanValue()
setSwitch
should have been set before.public int getFontIcon(int theState)
public java.lang.String getInfo()
getInfo
in class Controller<Icon>
public Icon hideBackground()
public boolean isOn()
public boolean isPressed()
public boolean isSwitch()
public void mousePressed()
public void mouseReleased()
public void mouseReleasedOutside()
public Icon setFill(boolean theBoolean)
public Icon setFont(processing.core.PFont thePFont)
public Icon setFont(processing.core.PFont thePFont, int theSize)
public Icon setFontIcon(int theId)
public Icon setFontIcon(int theId, int theState)
theImage
- theState
- use Controller.DEFAULT (background) Controller.OVER (foreground) Controller.ACTIVE (active)public Icon setFontIconOff(int theStateOff)
public Icon setFontIconOn(int theStateOn)
public Icon setFontIcons(int... theIds)
public Icon setFontIcons(int theStateOff, int theStateOn)
public Icon setFontIconSize(int theSize)
public Icon setFontIndex(int theIndex)
public Icon setOff()
setSwitch
to turn a Icon into a Switch.public Icon setOn()
setSwitch
to turn a Icon into a Switch.public Icon setRoundedCorners(int theRadius)
public Icon setScale(float theScalePressed, float theScaleReleased)
public Icon setStroke(boolean theBoolean)
public Icon setStrokeWeight(float theStrokeWeight)
public Icon setSwitch(boolean theFlag)
public Icon setValue(float theValue)
setValue
in interface ControllerInterface<Icon>
setValue
in class Controller<Icon>
theValue
- floatpublic Icon showBackground()
public java.lang.String toString()
toString
in class Controller<Icon>
public Icon update()
Controller
update
in interface ControllerInterface<Icon>
update
in class Controller<Icon>
Controller.setUpdate(boolean)
,
Controller.isUpdate()
public Icon updateDisplayMode(int theMode)
public Icon updateViewMode(int theMode)
processing library controlP5 by Andreas Schlegel. (c) 2006-2015