public class PaintBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
colorRainbow |
float |
runTimeSeconds |
java.lang.String |
stringRunTime |
float |
timeScale |
Constructor and Description |
---|
PaintBuilder(int x,
int y,
int width) |
Modifier and Type | Method and Description |
---|---|
void |
addRow(RowBuilder rowInfo)
Adds a row.
|
void |
addSpacerRow(int rowHeight)
Adds an empty row used to add a space between two rows.
|
void |
draw()
Draws the paint.
|
void |
drawPlaceholderPaint() |
int |
getHeight()
Get the paint's height
|
int |
getRowsY()
Get the paint's rowsY offset
|
int |
getWidth()
Get the paint's width
|
int |
getX()
Get the paint's top left X coordinate
|
int |
getY()
Get the paint's top left Y coordinate
|
void |
setBackgroundColor(int color,
int transparency)
Adds a background of a specified color and transparency
|
void |
setBorderColor(int color)
Adds a border box of a specified color
|
void |
setHeight(int newHeight)
Set the paint's height to a new value
|
void |
setRainbowSpeed(int speed)
Set the speed of colorRainbow cycling.
|
void |
setRowsY(int rowsY)
Y offset of where to start drawing rows relative to the paint's top border.
|
void |
setTitleCenteredSingleColor(java.lang.String string,
int color,
int yOffset)
Adds a centered title header with a single color
|
void |
setTitleMultipleColor(java.lang.String[] strings,
int[] colors,
int[] xOffsets,
int yOffset)
Adds a title header with a multiple colored strings
|
void |
setTitleSingleColor(java.lang.String string,
int color,
int xOffset,
int yOffset)
Adds a title header with a single color
|
void |
setWidth(int newWidth)
Set the paint's width to a new value
|
void |
setX(int x)
Set the paint's top left X coordinate to a new value
|
void |
setY(int y)
Set the paint's top left Y coordinate to a new value
|
void |
start(int x,
int y,
int width)
Starts the PaintBuilder.
|
java.lang.String |
stringAmountPerHour(int finished)
Returns a string for amount of something per hour
|
java.lang.String |
stringFormatInt(int amount)
Takes an int, shortens it, and returns it as a string.
|
public java.lang.String stringRunTime
public float runTimeSeconds
public float timeScale
public int colorRainbow
public PaintBuilder(int x, int y, int width)
width
- int -- Width of the paintx
- int -- X coordinate for the top left corner of the painty
- int -- Y coordinate for the top left corner of the paintpublic void start(int x, int y, int width)
width
- int -- Width of the paintx
- int -- X coordinate for the top left corner of the painty
- int -- Y coordinate for the top left corner of the paintpublic void setX(int x)
x
- int -- New X valuepublic void setY(int y)
y
- int -- New Y valuepublic void setRainbowSpeed(int speed)
speed
- int -- The speed at which colorRainbow updates. The default is speed 4.public void setRowsY(int rowsY)
rowsY
- int -- New Y valuepublic void setWidth(int newWidth)
newWidth
- int -- New width valuepublic void setHeight(int newHeight)
newHeight
- int -- New height valuepublic int getX()
public int getY()
public int getRowsY()
public int getWidth()
public int getHeight()
public void setBorderColor(int color)
color
- int -- Color of the border box. RGB "HTML" Color Example: 0x36E2D7public void setBackgroundColor(int color, int transparency)
color
- int -- Color of the background. RGB "HTML" Color Example: 0x36E2D7transparency
- int -- Transparency of the background. 0 to 255.public void setTitleSingleColor(java.lang.String string, int color, int xOffset, int yOffset)
string
- String -- Titlecolor
- int -- Title color RGB "HTML" Color Example: 0x36E2D7xOffset
- int -- X offset for the title from the paint's XyOffset
- int -- Y offset for the title from the paint's Ypublic void setTitleMultipleColor(java.lang.String[] strings, int[] colors, int[] xOffsets, int yOffset)
strings
- String[] -- Array of stringscolors
- int[] -- Array of colors for the title strings. RGB "HTML" Color Example:
0x36E2D7xOffsets
- int[] -- Array of offsets for each string's X from the previous string's X. The
first index is the amount offset from the paint's border.yOffset
- int -- Y offset for the title's string from the paint's Ypublic void setTitleCenteredSingleColor(java.lang.String string, int color, int yOffset)
string
- String -- Titlecolor
- int -- Title color RGB "HTML" Color Example: 0x36E2D7yOffset
- int -- Y offset for the title from the paint's Ypublic void addRow(RowBuilder rowInfo)
rowInfo
- RowBuilder -- Row information from controller.PaintBuilder.RowBuilderpublic void addSpacerRow(int rowHeight)
public java.lang.String stringAmountPerHour(int finished)
finished
- int -- Amount of actions/items gained in this sessionpublic java.lang.String stringFormatInt(int amount)
Example: 1230000 gets returned as 1.23M
amount
- int -- Amount to shortenpublic void drawPlaceholderPaint()
public void draw()