public class Visual extends JComponent implements Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
Visual.Layout |
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
Visual.Layout |
currentLayout |
static Color |
defColor |
static Color |
defColorBack |
static Color |
defColorFrame |
static Color |
defColorFront |
static Color |
defColorText |
static String |
defFont |
static int |
defFontSize |
static int |
defStroke |
boolean |
hasChanged |
Visual.Layout |
layout |
int |
PADDING_X |
int |
PADDING_Y |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
Visual() |
Modifier and Type | Method and Description |
---|---|
Visual |
above() |
Visual |
above(int y) |
void |
addAnimation(org.sikuli.guide.NewAnimator anim) |
void |
addAnimationListener(org.sikuli.guide.AnimationListener listener) |
void |
addCircleAnimation(Point origin,
float radius) |
void |
addFadeinAnimation() |
void |
addFadeoutAnimation() |
void |
addFollower(Visual sklComp) |
void |
addMoveAnimation(Point source,
Point destination) |
void |
addResizeAnimation(Dimension currentSize,
Dimension targetSize) |
void |
addSlideAnimation(Point destination,
Visual.Layout side) |
void |
animationCompleted() |
Visual |
below() |
Visual |
below(int y) |
Object |
clone() |
Animator |
createMoveAnimator(int dest_x,
int dest_y) |
Animator |
createSlidingAnimator(int offset_x,
int offset_y) |
Rectangle |
getActualBounds() |
int |
getActualHeight() |
Point |
getActualLocation() |
Dimension |
getActualSize() |
int |
getActualWidth() |
Point |
getCenter() |
static String |
getColorHex(Color col) |
Rectangle |
getFollowerBounds() |
ArrayList<Visual> |
getFollowers() |
Visual |
getLeader() |
Region |
getRegion() |
Region |
getTarget() |
String |
getText() |
boolean |
isAutoLayoutEnabled() |
boolean |
isAutoMoveEnabled() |
boolean |
isAutoResizeEnabled() |
boolean |
isAutoVisibilityEnabled() |
Visual |
left() |
Visual |
left(int x) |
void |
moveTo(Point targetLocation) |
void |
moveTo(Point targetLocation,
org.sikuli.guide.AnimationListener listener) |
void |
offsetLocation(int x,
int y) |
void |
paint(Graphics g) |
void |
paintPlain(Graphics g) |
void |
popin() |
void |
popout() |
void |
removeFollower(Visual comp) |
void |
removeFrom(Container container) |
void |
removeFromLeader() |
void |
resizeTo(Dimension targetSize) |
Visual |
right() |
Visual |
right(int x) |
void |
setActualBounds(Rectangle actualBounds) |
void |
setActualLocation(int x,
int y) |
void |
setActualLocation(Point location) |
void |
setActualSize(Dimension actualSize) |
void |
setActualSize(int width,
int height) |
void |
setAutoLayoutEnabled(boolean autoLayoutEnabled) |
void |
setAutoMoveEnabled(boolean autoMoveEnabled) |
void |
setAutoResizeEnabled(boolean autoResizeEnabled) |
void |
setAutoVisibilityEnabled(boolean autoVisibilityEnabled) |
Visual |
setColor(Color color)
set the front and back color
|
Visual |
setColor(int r,
int g,
int b)
set the front and back color as (r, g, b) integer array
|
Visual |
setColors(Color all,
Color front,
Color back,
Color frame,
Color text)
set a Java Color for the component
not all components have all color options |
Visual |
setColors(int[] front,
int[] back,
int[] frame,
int[] text)
mainly for Jython layer: colors given as (r, g, b) integer array
|
void |
setEmphasisAnimation(Animator anim) |
void |
setEntranceAnimation(Animator anim) |
Visual |
setFont(String font,
int fontSize) |
Visual |
setFontSize(int i) |
void |
setGuide(Guide g) |
void |
setHorizontalAlignmentWithRegion(Region region,
float f) |
Visual |
setLayout(Visual.Layout lo) |
Visual |
setLocationRelative(Visual.Layout side) |
void |
setLocationRelativeToComponent(Visual leader) |
void |
setLocationRelativeToComponent(Visual comp,
float relativeX,
float relativeY) |
void |
setLocationRelativeToComponent(Visual comp,
int offsetx,
int offsety) |
void |
setLocationRelativeToComponent(Visual comp,
Visual.Layout side) |
void |
setLocationRelativeToPoint(Point point,
Visual.Layout side) |
Visual |
setLocationRelativeToRegion(Region region,
Visual.Layout side) |
void |
setMargin(int top,
int left,
int bottom,
int right) |
Visual |
setMaxWidth(int w) |
void |
setMovable(boolean movable) |
void |
setOffset(int offsetx,
int offsety) |
void |
setOpacity(float opacity) |
Visual |
setScale(float scale) |
void |
setShadow(int shadowSize,
int shadowOffset) |
void |
setShadowDefault() |
Visual |
setStroke(int stk) |
<RCPS> Visual |
setTarget(RCPS target) |
Visual |
setText(String text) |
Visual |
setTextColor(Color color)
set the text color
|
Visual |
setTextColor(int r,
int g,
int b)
set text color as (r, g, b) integer array
|
void |
setVerticalAlignmentWithRegion(Region region,
float f) |
void |
setVisible(boolean visible) |
void |
setZoomLevel(float zoomLevel) |
void |
startAnimation() |
void |
stopAnimation() |
String |
toString() |
void |
updateComponent() |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public boolean hasChanged
public int PADDING_X
public int PADDING_Y
public Visual.Layout layout
public Visual.Layout currentLayout
public static Color defColor
public static Color defColorFront
public static Color defColorBack
public static Color defColorFrame
public static Color defColorText
public static int defStroke
public static String defFont
public static int defFontSize
public void setGuide(Guide g)
public Region getTarget()
public Visual setScale(float scale)
public Visual setLayout(Visual.Layout lo)
public Visual setColors(Color all, Color front, Color back, Color frame, Color text)
all
- sets the color for all options (which have to be null in this case)front
- sets the foreground colorback
- sets the background colorframe
- sets the color of the frametext
- sets the color of the textpublic Visual setColors(int[] front, int[] back, int[] frame, int[] text)
front
- sets the foreground colorback
- sets the background colorframe
- sets the color of the frametext
- sets the color of the textpublic Visual setColor(Color color)
color
- public Visual setColor(int r, int g, int b)
public Visual setTextColor(Color color)
color
- public Visual setTextColor(int r, int g, int b)
public Visual setStroke(int stk)
public Visual setFontSize(int i)
public Visual setMaxWidth(int w)
public String getText()
public void setAutoLayoutEnabled(boolean autoLayoutEnabled)
public boolean isAutoLayoutEnabled()
public void setAutoResizeEnabled(boolean autoResizeEnabled)
public boolean isAutoResizeEnabled()
public void setAutoMoveEnabled(boolean autoMoveEnabled)
public boolean isAutoMoveEnabled()
public void setAutoVisibilityEnabled(boolean autoVisibilityEnabled)
public boolean isAutoVisibilityEnabled()
public Rectangle getActualBounds()
public Region getRegion()
public void setActualBounds(Rectangle actualBounds)
public Point getCenter()
public Dimension getActualSize()
public void setActualSize(int width, int height)
public void setActualSize(Dimension actualSize)
public int getActualWidth()
public int getActualHeight()
public Point getActualLocation()
public void offsetLocation(int x, int y)
public void setActualLocation(Point location)
public void setActualLocation(int x, int y)
public void setMargin(int top, int left, int bottom, int right)
public void setOffset(int offsetx, int offsety)
public void setZoomLevel(float zoomLevel)
public void setMovable(boolean movable)
public void setOpacity(float opacity)
public void updateComponent()
public void paintPlain(Graphics g)
public void paint(Graphics g)
paint
in class JComponent
public void setShadowDefault()
public void setShadow(int shadowSize, int shadowOffset)
public void addAnimation(org.sikuli.guide.NewAnimator anim)
public void addCircleAnimation(Point origin, float radius)
public void addFadeinAnimation()
public void addFadeoutAnimation()
public void addSlideAnimation(Point destination, Visual.Layout side)
public void startAnimation()
public void stopAnimation()
public Animator createSlidingAnimator(int offset_x, int offset_y)
public Animator createMoveAnimator(int dest_x, int dest_y)
public void resizeTo(Dimension targetSize)
public void moveTo(Point targetLocation)
public void moveTo(Point targetLocation, org.sikuli.guide.AnimationListener listener)
public void popin()
public void popout()
public void setEntranceAnimation(Animator anim)
public void setEmphasisAnimation(Animator anim)
public void addAnimationListener(org.sikuli.guide.AnimationListener listener)
public void animationCompleted()
public Visual left()
public Visual left(int x)
public Visual right()
public Visual right(int x)
public Visual above()
public Visual above(int y)
public Visual below()
public Visual below(int y)
public <RCPS> Visual setTarget(RCPS target)
public Visual setLocationRelative(Visual.Layout side)
public void setLocationRelativeToComponent(Visual comp, Visual.Layout side)
public void setLocationRelativeToComponent(Visual comp, int offsetx, int offsety)
public void setLocationRelativeToComponent(Visual comp, float relativeX, float relativeY)
public void setLocationRelativeToComponent(Visual leader)
public void setLocationRelativeToPoint(Point point, Visual.Layout side)
public Visual setLocationRelativeToRegion(Region region, Visual.Layout side)
public void setHorizontalAlignmentWithRegion(Region region, float f)
public void setVerticalAlignmentWithRegion(Region region, float f)
public void removeFromLeader()
public void addFollower(Visual sklComp)
public void setVisible(boolean visible)
setVisible
in class JComponent
public Visual getLeader()
public void removeFollower(Visual comp)
public Rectangle getFollowerBounds()
public void removeFrom(Container container)