class SxText extends Visual {

  JLabel label;

  public SxText(String text) {
    super();
    init(text);
  }

  private void init(String text) {
    this.text = text;
    label = new JLabel();
    add(label);
    fontSize = 12;
    label.setFont(new Font("SansSerif", Font.PLAIN, 36));
  }

  @Override
  public void updateComponent() {<FILL_FUNCTION_BODY>}

  @Override
  public void paintComponent(Graphics g) {
    Dimension originalSize = label.getPreferredSize();
    Dimension actualSize = getActualSize();
    float scalex = 1f * actualSize.width / originalSize.width;
    float scaley = 1f * actualSize.height / originalSize.height;
    ((Graphics2D) g).scale(scalex, scaley);
    super.paintComponent(g);
  }

  //<editor-fold defaultstate="collapsed" desc="TODO make text editable??">
  /*  TextPropertyEditor ed = null;
   *
   * public void setEditable(boolean editable) {
   * if (editable) {
   * } else {
   * }
   * }*/  //</editor-fold>
}

    String htmltxt = "<html><div style='" + getStyleString() + "'>"
            + text + "</div></html>";
    label.setText(htmltxt);
    Dimension size = label.getPreferredSize();
    if (size.width > maxWidth) {
      // hack to limit the width of the text to width
      htmltxt = "<html><div style='width:" + maxWidth + ";" + getStyleString() + "'>"
                + text + "</div></html>";
      label.setText(htmltxt);
      size = label.getPreferredSize();
    }
    label.setSize(size);
    setActualSize(size);
  
<methods>public void <init>() ,public org.sikuli.guide.Visual above() ,public org.sikuli.guide.Visual above(int) ,public void addAnimation(org.sikuli.guide.NewAnimator) ,public void addAnimationListener(org.sikuli.guide.AnimationListener) ,public void addCircleAnimation(java.awt.Point, float) ,public void addFadeinAnimation() ,public void addFadeoutAnimation() ,public void addFollower(org.sikuli.guide.Visual) ,public void addMoveAnimation(java.awt.Point, java.awt.Point) ,public void addResizeAnimation(java.awt.Dimension, java.awt.Dimension) ,public void addSlideAnimation(java.awt.Point, org.sikuli.guide.Visual.Layout) ,public void animationCompleted() ,public org.sikuli.guide.Visual below() ,public org.sikuli.guide.Visual below(int) ,public java.lang.Object clone() ,public org.sikuli.guide.Animator createMoveAnimator(int, int) ,public org.sikuli.guide.Animator createSlidingAnimator(int, int) ,public java.awt.Rectangle getActualBounds() ,public int getActualHeight() ,public java.awt.Point getActualLocation() ,public java.awt.Dimension getActualSize() ,public int getActualWidth() ,public java.awt.Point getCenter() ,public static java.lang.String getColorHex(java.awt.Color) ,public java.awt.Rectangle getFollowerBounds() ,public ArrayList<org.sikuli.guide.Visual> getFollowers() ,public org.sikuli.guide.Visual getLeader() ,public org.sikuli.script.Region getRegion() ,public org.sikuli.script.Region getTarget() ,public java.lang.String getText() ,public boolean isAutoLayoutEnabled() ,public boolean isAutoMoveEnabled() ,public boolean isAutoResizeEnabled() ,public boolean isAutoVisibilityEnabled() ,public org.sikuli.guide.Visual left() ,public org.sikuli.guide.Visual left(int) ,public void moveTo(java.awt.Point) ,public void moveTo(java.awt.Point, org.sikuli.guide.AnimationListener) ,public void offsetLocation(int, int) ,public void paint(java.awt.Graphics) ,public void paintPlain(java.awt.Graphics) ,public void popin() ,public void popout() ,public void removeFollower(org.sikuli.guide.Visual) ,public void removeFrom(java.awt.Container) ,public void removeFromLeader() ,public void resizeTo(java.awt.Dimension) ,public org.sikuli.guide.Visual right() ,public org.sikuli.guide.Visual right(int) ,public void setActualBounds(java.awt.Rectangle) ,public void setActualLocation(java.awt.Point) ,public void setActualLocation(int, int) ,public void setActualSize(int, int) ,public void setActualSize(java.awt.Dimension) ,public void setAutoLayoutEnabled(boolean) ,public void setAutoMoveEnabled(boolean) ,public void setAutoResizeEnabled(boolean) ,public void setAutoVisibilityEnabled(boolean) ,public org.sikuli.guide.Visual setColor(java.awt.Color) ,public org.sikuli.guide.Visual setColor(int, int, int) ,public org.sikuli.guide.Visual setColors(java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) ,public org.sikuli.guide.Visual setColors(int[], int[], int[], int[]) ,public void setEmphasisAnimation(org.sikuli.guide.Animator) ,public void setEntranceAnimation(org.sikuli.guide.Animator) ,public org.sikuli.guide.Visual setFont(java.lang.String, int) ,public org.sikuli.guide.Visual setFontSize(int) ,public void setGuide(org.sikuli.guide.Guide) ,public void setHorizontalAlignmentWithRegion(org.sikuli.script.Region, float) ,public org.sikuli.guide.Visual setLayout(org.sikuli.guide.Visual.Layout) ,public org.sikuli.guide.Visual setLocationRelative(org.sikuli.guide.Visual.Layout) ,public void setLocationRelativeToComponent(org.sikuli.guide.Visual, org.sikuli.guide.Visual.Layout) ,public void setLocationRelativeToComponent(org.sikuli.guide.Visual, int, int) ,public void setLocationRelativeToComponent(org.sikuli.guide.Visual, float, float) ,public void setLocationRelativeToComponent(org.sikuli.guide.Visual) ,public void setLocationRelativeToPoint(java.awt.Point, org.sikuli.guide.Visual.Layout) ,public org.sikuli.guide.Visual setLocationRelativeToRegion(org.sikuli.script.Region, org.sikuli.guide.Visual.Layout) ,public void setMargin(int, int, int, int) ,public org.sikuli.guide.Visual setMaxWidth(int) ,public void setMovable(boolean) ,public void setOffset(int, int) ,public void setOpacity(float) ,public org.sikuli.guide.Visual setScale(float) ,public void setShadow(int, int) ,public void setShadowDefault() ,public org.sikuli.guide.Visual setStroke(int) ,public org.sikuli.guide.Visual setTarget(RCPS) ,public org.sikuli.guide.Visual setText(java.lang.String) ,public org.sikuli.guide.Visual setTextColor(java.awt.Color) ,public org.sikuli.guide.Visual setTextColor(int, int, int) ,public void setVerticalAlignmentWithRegion(org.sikuli.script.Region, float) ,public void setVisible(boolean) ,public void setZoomLevel(float) ,public void startAnimation() ,public void stopAnimation() ,public java.lang.String toString() ,public void updateComponent() <variables>public int PADDING_X,public int PADDING_Y,private java.awt.Rectangle actualBounds,org.sikuli.guide.AnimationListener animationListener,boolean animationRunning,org.sikuli.guide.Visual.AnimationSequence animationSequence,private boolean autoLayoutEnabled,private boolean autoMoveEnabled,private boolean autoResizeEnabled,private boolean autoVisibilityEnabled,org.sikuli.guide.Visual.AutoLayout autolayout,org.sikuli.guide.ComponentMover cm,java.awt.Color color,java.awt.Color colorBack,java.awt.Color colorFrame,java.awt.Color colorFront,java.awt.Color colorText,org.sikuli.guide.Guide currentGuide,public org.sikuli.guide.Visual.Layout currentLayout,public static java.awt.Color defColor,public static java.awt.Color defColorBack,public static java.awt.Color defColorFrame,public static java.awt.Color defColorFront,public static java.awt.Color defColorText,public static java.lang.String defFont,public static int defFontSize,static int defMaxWidth,private int defShadowOffset,private int defShadowSize,public static int defStroke,org.sikuli.guide.Animator emphasis_anim,org.sikuli.guide.Animator entrance_anim,private ArrayList<org.sikuli.guide.Visual> followers,java.lang.String fontName,int fontSize,public boolean hasChanged,public org.sikuli.guide.Visual.Layout layout,org.sikuli.guide.Visual leader,org.sikuli.guide.Visual.Margin margin,int maxWidth,int offsetx,int offsety,float opacity,int shadowOffset,org.sikuli.guide.ShadowRenderer shadowRenderer,int shadowSize,int stroke,org.sikuli.guide.Visual targetComponent,org.sikuli.script.Pattern targetPattern,org.sikuli.script.Region targetRegion,java.lang.String text,float zoomLevel