org.stellarium.ui.components
Class Painter

java.lang.Object
  extended by org.stellarium.ui.components.Painter

public class Painter
extends java.lang.Object

Class used to manage all the drawings for a component. Stores informations like colors or used textures. Performs the primitives drawing.


Field Summary
private  SColor baseColor
           
private  SFontIfc font
           
private  boolean opaque
           
private  STexture tex1
           
private  SColor textColor
           
 
Constructor Summary
Painter(Painter p)
           
Painter(STexture someTex1, SFontIfc someFont, SColor someBaseColor, SColor someTextColor)
           
 
Method Summary
 void drawCross(Vector2i pos, Vector2i sz)
          Draw a cross with the default base color
 void drawLine(Vector2i pos1, Vector2i pos2)
           
 void drawLine(Vector2i pos1, Vector2i pos2, SColor c)
           
 void drawSquareEdge(Vector2i pos, Vector2i sz)
          Draw the edges of the defined square with the default base color
 void drawSquareEdge(Vector2i pos, Vector2i sz, SColor c)
          Draw the edges of the defined square with the given color
 void drawSquareFill(Vector2i pos, Vector2i sz)
          Fill the defined square with the default texture and default base color
 void drawSquareFill(Vector2i pos, Vector2i sz, SColor c)
          Fill the defined square with the default texture and given color
 void drawSquareFill(Vector2i pos, Vector2i sz, SColor c, STexture t)
          Fill the defined square with the given texture and given color
 SColor getBaseColor()
           
 SFontIfc getFont()
           
 SColor getTextColor()
           
 void print(int x, int y, java.lang.String str)
          Print the text with the default font and default text color
 void print(int x, int y, java.lang.String str, SColor c)
          Print the text with the default font and given text color
 void setBaseColor(SColor c)
           
 void setFont(SFontIfc f)
           
 void setOpaque(boolean opaque)
           
 void setTextColor(SColor c)
           
 void setTexture(STexture tex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tex1

private STexture tex1

font

private SFontIfc font

baseColor

private SColor baseColor

textColor

private SColor textColor

opaque

private boolean opaque
Constructor Detail

Painter

public Painter(Painter p)

Painter

public Painter(STexture someTex1,
               SFontIfc someFont,
               SColor someBaseColor,
               SColor someTextColor)
Method Detail

drawSquareEdge

public void drawSquareEdge(Vector2i pos,
                           Vector2i sz)
Draw the edges of the defined square with the default base color


drawSquareEdge

public void drawSquareEdge(Vector2i pos,
                           Vector2i sz,
                           SColor c)
Draw the edges of the defined square with the given color


drawSquareFill

public void drawSquareFill(Vector2i pos,
                           Vector2i sz)
Fill the defined square with the default texture and default base color


drawSquareFill

public void drawSquareFill(Vector2i pos,
                           Vector2i sz,
                           SColor c)
Fill the defined square with the default texture and given color


drawSquareFill

public void drawSquareFill(Vector2i pos,
                           Vector2i sz,
                           SColor c,
                           STexture t)
Fill the defined square with the given texture and given color


drawCross

public void drawCross(Vector2i pos,
                      Vector2i sz)
Draw a cross with the default base color


print

public void print(int x,
                  int y,
                  java.lang.String str)
Print the text with the default font and default text color


print

public void print(int x,
                  int y,
                  java.lang.String str,
                  SColor c)
Print the text with the default font and given text color


drawLine

public void drawLine(Vector2i pos1,
                     Vector2i pos2)

drawLine

public void drawLine(Vector2i pos1,
                     Vector2i pos2,
                     SColor c)

setTexture

public void setTexture(STexture tex)

setFont

public void setFont(SFontIfc f)

setTextColor

public void setTextColor(SColor c)

setBaseColor

public void setBaseColor(SColor c)

getBaseColor

public SColor getBaseColor()

getTextColor

public SColor getTextColor()

getFont

public SFontIfc getFont()

setOpaque

public void setOpaque(boolean opaque)