@Beta public interface SGPane
Modifier and Type | Method and Description |
---|---|
void |
clearCell(int x,
int y)
Clears the cell at the location given with the default background color.
|
void |
clearCell(int x,
int y,
java.awt.Color color)
Clears the cell at the location given with the provided color.
|
int |
getCellHeight()
Returns the height of a single cell.
|
int |
getCellWidth()
Returns the width of a single cell.
|
int |
getGridHeight()
Returns the height of the grid.
|
int |
getGridWidth()
Returns the width of the grid.
|
void |
initialize(int gridWidth,
int gridHeight,
java.awt.Font font)
Initializes the component with the supplied number of rows and columns.
|
void |
initialize(int cellWidth,
int cellHeight,
int gridWidth,
int gridHeight,
java.awt.Font font)
Initializes the component with the supplied values.
|
void |
placeCharacter(int x,
int y,
char c)
Sets one specific block to the given character.
|
void |
placeCharacter(int x,
int y,
char c,
java.awt.Color fore)
Sets the block at the given coordinates to contain the passed in
character drawn with the given foreground color.
|
void |
placeCharacter(int x,
int y,
char c,
java.awt.Color fore,
java.awt.Color back)
Sets one specific block to the given character with the given foreground
and background colors.
|
void |
placeHorizontalString(int xOffset,
int yOffset,
java.lang.String string)
Prints out a string starting at the given offset position.
|
void |
placeHorizontalString(int xOffset,
int yOffset,
java.lang.String string,
java.awt.Color foreground,
java.awt.Color background)
Prints out a string vertically starting at the given offset position and
traveling down.
|
void |
placeImage(int x,
int y,
java.lang.String key)
Places the image associated with the provided key at the given
coordinates.
|
void |
placeImage(int x,
int y,
java.lang.String key,
java.awt.Color background)
Places the image associated with the provided key at the given
coordinates.
|
void |
placeText(int xOffset,
int yOffset,
char[][] chars)
Sets the contents of the component to reflect the two dimensional
character array, starting at the given offset position.
|
void |
placeText(int xOffset,
int yOffset,
char[][] chars,
java.awt.Color foreground,
java.awt.Color background)
Sets the contents of the component to reflect the two dimensional
character array, starting at the given offset position.
|
void |
placeVerticalString(int xOffset,
int yOffset,
java.lang.String string)
Prints out a string vertically starting at the given offset position and
traveling down.
|
void |
placeVerticalString(int xOffset,
int yOffset,
java.lang.String string,
java.awt.Color foreground,
java.awt.Color background)
Prints out a string starting at the given offset position.
|
void |
refresh()
Signals that this component should update its display image.
|
void |
setCellBackground(int x,
int y,
java.awt.Color color)
Sets the background to the provided color.
|
void |
setDefaultBackground(java.awt.Color defaultBackground)
Sets the background color which will be used on all text and transparent
tiles when not other color is specified.
|
void |
setDefaultForeground(java.awt.Color defaultForeground)
Sets the background color which will be used on all text and transparent
tiles when not other color is specified.
|
void |
setText(char[][] chars)
Sets the contents of the component to reflect the two dimensional
character array.
|
boolean |
willFit(char character)
Test if the given character will fit in the current cell dimension using
the current Font.
|
int getCellHeight()
int getCellWidth()
int getGridHeight()
int getGridWidth()
void initialize(int cellWidth, int cellHeight, int gridWidth, int gridHeight, java.awt.Font font)
cellWidth
- in pixelscellHeight
- in pixelsgridWidth
- in cellsgridHeight
- in cellsfont
- void initialize(int gridWidth, int gridHeight, java.awt.Font font)
gridWidth
- in cellsgridHeight
- in cellsfont
- void clearCell(int x, int y)
x
- y
- void clearCell(int x, int y, java.awt.Color color)
x
- y
- color
- void setCellBackground(int x, int y, java.awt.Color color)
x
- y
- color
- void placeCharacter(int x, int y, char c)
x
- The x coordinate to sety
- The y coordinate to setc
- The character to be displayedvoid placeCharacter(int x, int y, char c, java.awt.Color fore, java.awt.Color back)
x
- The x coordinate to sety
- The y coordinate to setc
- The character to be displayedfore
- The foreground colorback
- The background colorvoid placeCharacter(int x, int y, char c, java.awt.Color fore)
x
- y
- c
- fore
- void placeHorizontalString(int xOffset, int yOffset, java.lang.String string)
string
- xOffset
- yOffset
- void placeHorizontalString(int xOffset, int yOffset, java.lang.String string, java.awt.Color foreground, java.awt.Color background)
xOffset
- yOffset
- string
- foreground
- background
- void placeImage(int x, int y, java.lang.String key)
x
- y
- key
- void placeImage(int x, int y, java.lang.String key, java.awt.Color background)
x
- y
- key
- background
- void placeText(int xOffset, int yOffset, char[][] chars)
chars
- xOffset
- yOffset
- void placeText(int xOffset, int yOffset, char[][] chars, java.awt.Color foreground, java.awt.Color background)
xOffset
- yOffset
- chars
- foreground
- background
- void placeVerticalString(int xOffset, int yOffset, java.lang.String string, java.awt.Color foreground, java.awt.Color background)
xOffset
- yOffset
- string
- foreground
- background
- void placeVerticalString(int xOffset, int yOffset, java.lang.String string)
xOffset
- yOffset
- string
- void refresh()
void setDefaultBackground(java.awt.Color defaultBackground)
defaultBackground
- void setDefaultForeground(java.awt.Color defaultForeground)
defaultForeground
- void setText(char[][] chars)
chars
- boolean willFit(char character)
character
-