org.sikuli.api.visual.element
Class Element

java.lang.Object
  extended by org.sikuli.api.visual.element.Element
Direct Known Subclasses:
BoxElement, CircleElement, DotElement, ImageElement, LabelElement, RefreshableImageElement

public class Element
extends Object

Element is an abstraction for objects to be displayed on the screen.


Nested Class Summary
static class Element.HorizontalAlignment
          The horizontal alignment of the Element.
static interface Element.Listener
           
static class Element.VerticalAlignment
          The vertical alignment of the Element.
 
Field Summary
 int height
           
 Element.HorizontalAlignment horizontalAlignment
           
 Element.VerticalAlignment verticalAlignment
           
 int width
           
 int x
           
 int y
           
 
Constructor Summary
Element()
           
 
Method Summary
 void addListener(Element.Listener l)
           
 edu.umd.cs.piccolo.PNode createPNode()
          Creates a new PNode, the central abstraction in Piccolo.
 Color getBackgroundColor()
          Returns the background color of this Element.
 Color getColor()
          Returns the Color of this Element.
 float getFontSize()
          Returns the font size of this Element in points.
 Color getLineColor()
          Returns the line color of this Element.
 int getLineWidth()
          Returns the line width of this Element in points.
 float getTransparency()
          Returns the transparency (alpha component) value of this Element.
 void removeListener(Element.Listener l)
           
 void setBackgroundColor(Color backgroundColor)
          Sets the background color of this Element.
 void setColor(Color color)
          Sets the color of this Element
 void setFontSize(float fontSize)
          Sets the font size of this Elements in points.
 void setLineColor(Color lineColor)
          Sets the line color of this Element.
 void setLineWidth(int lineWidth)
          Sets the line width of this Element in points.
 void setLocation(int x, int y)
           
 void setTransparency(float transparency)
          Sets the transparency (alpha component) value of this Element.
 ElementStyleSetter styleWith()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public int x

y

public int y

width

public int width

height

public int height

verticalAlignment

public Element.VerticalAlignment verticalAlignment

horizontalAlignment

public Element.HorizontalAlignment horizontalAlignment
Constructor Detail

Element

public Element()
Method Detail

createPNode

public edu.umd.cs.piccolo.PNode createPNode()
Creates a new PNode, the central abstraction in Piccolo.

Returns:
a new PNode object.
See Also:
PNode

getColor

public Color getColor()
Returns the Color of this Element.

Returns:
the Color of this Element.

setColor

public void setColor(Color color)
Sets the color of this Element

Parameters:
color -

getLineColor

public Color getLineColor()
Returns the line color of this Element.

Returns:
the line color of this Element.

setLineColor

public void setLineColor(Color lineColor)
Sets the line color of this Element.

Parameters:
lineColor - the specified the line color.

getBackgroundColor

public Color getBackgroundColor()
Returns the background color of this Element.

Returns:
the background color of this Element.

setBackgroundColor

public void setBackgroundColor(Color backgroundColor)
Sets the background color of this Element.


getLineWidth

public int getLineWidth()
Returns the line width of this Element in points.

Returns:
the line width of this Element.

setLineWidth

public void setLineWidth(int lineWidth)
Sets the line width of this Element in points.

Parameters:
lineWidth - the specified line width in points.

getFontSize

public float getFontSize()
Returns the font size of this Element in points.

Returns:
the font size of this Element.

setFontSize

public void setFontSize(float fontSize)
Sets the font size of this Elements in points.

Parameters:
fontSize - the font size in points.

getTransparency

public float getTransparency()
Returns the transparency (alpha component) value of this Element.

Returns:
the transparency value of this Element.

setTransparency

public void setTransparency(float transparency)
Sets the transparency (alpha component) value of this Element.

Parameters:
transparency - the specified transparency value [0..1].

setLocation

public void setLocation(int x,
                        int y)

addListener

public void addListener(Element.Listener l)

removeListener

public void removeListener(Element.Listener l)

styleWith

public ElementStyleSetter styleWith()


Copyright © 2014. All rights reserved.