org.sikuli.api.visual.element
Class ElementStyleSetter

java.lang.Object
  extended by org.sikuli.api.visual.element.ElementStyleSetter

public class ElementStyleSetter
extends Object

A StyleBuilder is used to to ease style building the Canvas.


Constructor Summary
ElementStyleSetter(Element element)
          Constructs a new StyleBuilder whose Canvas and Element specified with the arguments of the same name.
 
Method Summary
 ElementStyleSetter backgroundColor(Color color)
          Sets the background color of this canvas element.
 ElementStyleSetter color(Color color)
          Sets the foreground color of this canvas element.
 ElementStyleSetter fontSize(float fontSize)
           
 ElementStyleSetter horizontalAlignmentCenter()
          Sets the horizontal alignment of this canvas element at the center.
 ElementStyleSetter horizontalAlignmentLeft()
          Sets the horizontal alignment of this canvas element on the left.
 ElementStyleSetter horizontalAlignmentRight()
          Sets the horizontal alignment of this canvas element on the right.
 ElementStyleSetter lineColor(Color color)
          Sets the line color of this canvas element.
 ElementStyleSetter lineWidth(int width)
          Sets the line width of this canvas element.
 ElementStyleSetter transparency(float f)
          Sets the transparency (alpha component) value of this canvas element.
 ElementStyleSetter verticalAlignmentBottom()
          Sets the vertical alignment of this canvas element at the bottom.
 ElementStyleSetter verticalAlignmentMiddle()
          Sets the vertical alignment of this canvas element in the middle.
 ElementStyleSetter verticalAlignmentTop()
          Sets the vertical alignment of this canvas element at the top.
 ElementStyleSetter withFontSize(int size)
          Sets the font size color of this canvas element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementStyleSetter

public ElementStyleSetter(Element element)
Constructs a new StyleBuilder whose Canvas and Element specified with the arguments of the same name.

Parameters:
canvas - the specified Canvas.
element - the specified Element.
Method Detail

lineColor

public ElementStyleSetter lineColor(Color color)
Sets the line color of this canvas element.

Parameters:
color - the specified color.
Returns:
this StyleBuilder.

color

public ElementStyleSetter color(Color color)
Sets the foreground color of this canvas element.

Parameters:
color - the specified color.
Returns:
this StyleBuilder.

fontSize

public ElementStyleSetter fontSize(float fontSize)

backgroundColor

public ElementStyleSetter backgroundColor(Color color)
Sets the background color of this canvas element.

Parameters:
color - the specified color.
Returns:
this StyleBuilder.

transparency

public ElementStyleSetter transparency(float f)
Sets the transparency (alpha component) value of this canvas element.

Parameters:
f - the specified transparency value [0..1].
Returns:
this StyleBuilder.

withFontSize

public ElementStyleSetter withFontSize(int size)
Sets the font size color of this canvas element.

Parameters:
size - the specified font size in points.
Returns:
this StyleBuilder.

lineWidth

public ElementStyleSetter lineWidth(int width)
Sets the line width of this canvas element.

Parameters:
width - the specified line width in points.
Returns:
this StyleBuilder.

verticalAlignmentMiddle

public ElementStyleSetter verticalAlignmentMiddle()
Sets the vertical alignment of this canvas element in the middle.

Returns:
this StyleBuilder.

verticalAlignmentTop

public ElementStyleSetter verticalAlignmentTop()
Sets the vertical alignment of this canvas element at the top.

Returns:
this StyleBuilder.

verticalAlignmentBottom

public ElementStyleSetter verticalAlignmentBottom()
Sets the vertical alignment of this canvas element at the bottom.

Returns:
this StyleBuilder.

horizontalAlignmentLeft

public ElementStyleSetter horizontalAlignmentLeft()
Sets the horizontal alignment of this canvas element on the left.

Returns:
this StyleBuilder.

horizontalAlignmentCenter

public ElementStyleSetter horizontalAlignmentCenter()
Sets the horizontal alignment of this canvas element at the center.

Returns:
this StyleBuilder.

horizontalAlignmentRight

public ElementStyleSetter horizontalAlignmentRight()
Sets the horizontal alignment of this canvas element on the right.

Returns:
this StyleBuilder.


Copyright © 2014. All rights reserved.