public class TextGridContent extends Object implements Domable
TextGrid
objects.
It implements methods to set and retrieve individual characters on the grid, and to
serialize and de-serialize the content from/to XML objects. It also contains information
about the desired size and graphic properties (font, colors, etc.) of the grid.Modifier and Type | Field and Description |
---|---|
BoxBase |
bb |
boolean |
border |
static String |
BORDER |
static String |
CELL_HEIGHT |
static String |
CELL_WIDTH |
static String |
COLUMNS |
static String |
DEFAULT_RANDOM_CHARS |
static char |
DEFAULT_WILD |
static String |
ELEMENT_NAME |
double |
h |
int |
nch |
int |
ncw |
static String |
RANDOM_CHARS |
String |
randomChars |
static String |
ROW |
static String |
ROWS |
String[] |
text |
static String |
TEXT |
double |
w |
char |
wild |
static String |
WILD |
Constructor and Description |
---|
TextGridContent()
Creates new TextGridContent
|
Modifier and Type | Method and Description |
---|---|
void |
completeText() |
void |
copyStyleTo(TextGridContent tgc) |
int |
countWildChars() |
Element |
getJDomElement() |
int |
getNumChars() |
static TextGridContent |
getTextGridContent(Element e) |
static TextGridContent |
initNew(int ncw,
int nch,
char firstChar) |
void |
setCharAt(int x,
int y,
char ch) |
void |
setProperties(Element e,
Object aux) |
public static final char DEFAULT_WILD
public static final String DEFAULT_RANDOM_CHARS
public int ncw
public int nch
public double w
public double h
public boolean border
public BoxBase bb
public String[] text
public char wild
public String randomChars
public static final String ELEMENT_NAME
public static final String ROWS
public static final String COLUMNS
public static final String CELL_WIDTH
public static final String CELL_HEIGHT
public static final String BORDER
public static final String ROW
public static final String TEXT
public static final String WILD
public static final String RANDOM_CHARS
public static TextGridContent initNew(int ncw, int nch, char firstChar)
public Element getJDomElement()
getJDomElement
in interface Domable
public static TextGridContent getTextGridContent(Element e) throws Exception
Exception
public void setProperties(Element e, Object aux) throws Exception
setProperties
in interface Domable
Exception
public void completeText()
public int countWildChars()
public int getNumChars()
public void setCharAt(int x, int y, char ch)
public void copyStyleTo(TextGridContent tgc)
Copyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.