|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--com.iproject.wbmpcreator.WBMPfile
|
+--com.iproject.wbmpcreator.WBMPTable
| Fields inherited from class com.iproject.wbmpcreator.WBMPfile |
ALIGN_CENTER,
ALIGN_HORIZONTAL_CENTER,
ALIGN_HORIZONTAL_LEFT,
ALIGN_HORIZONTAL_RIGHT,
ALIGN_VERTICAL_BOTTOM,
ALIGN_VERTICAL_CENTER,
ALIGN_VERTICAL_TOP,
APPEND_MODE_CONTINUOUS,
APPEND_MODE_DIVISION,
LINE_CHAIN3_1,
LINE_CHAIN3_2,
LINE_INT2_1,
LINE_INT2_2,
LINE_INT3_2,
LINE_POINT1,
LINE_POINT2,
LINE_POINT3,
MIX_MODE_AND,
MIX_MODE_NOT,
MIX_MODE_OR,
MIX_MODE_XOR |
| Constructor Summary | |
WBMPTable()
Empty constructor of a WBMPTable. |
|
WBMPTable(java.lang.String newColumnNames,
java.util.Vector newColumnData)
Constructor of a WBMPTable. |
|
| Method Summary | |
java.util.Vector |
getColumnData()
Gets all data from WBMPTable. |
java.lang.String |
getColumnNames()
Gets the header. |
java.awt.Font |
getDataFont()
Gets the font of data in a table. |
java.awt.Font |
getHeaderFont()
Gets the font of the header. |
WBMPDimension |
getTableSize()
Gets desired dimension of a resulting image. |
static WBMPfile |
getWBMPCustomTable(CustomFont userFont,
WBMPDimension tableSize,
java.util.Vector colWidth,
java.util.Vector header,
java.util.Vector body,
boolean isHeaderOnEveryPage)
Method to get the WBMP representation of a table using Custom Font. |
void |
saveWBMPTable(java.lang.String filename,
boolean headerOnEachPiece)
Saves WBMPTable to file(s) with the given filename mask. This method saves table to one or several *.wbmp files depending on table size. |
void |
setColumnData(java.util.Vector newColumnData)
Fills WBMPTable with data. |
void |
setColumnNames(java.lang.String newColumnNames)
Sets the header. |
void |
setDataFont(java.awt.Font newDataFont)
Sets the font of data in a table. |
void |
setHeaderFont(java.awt.Font newHeaderFont)
Sets the font of the header. |
void |
setTableSize(WBMPDimension newTableSize)
Sets the desired resolution of resulting WBMP image. |
| Methods inherited from class com.iproject.wbmpcreator.WBMPfile |
align,
convert2WBMPfile,
convert2WBMPfile,
createWBMPFile,
destroyWBMPFile,
draw3DRect,
drawArc,
drawCircle,
drawCustomString,
drawLine,
drawOval,
drawPoint,
drawRect,
drawSpecialLine,
drawString,
drawTTFString,
executeSequence,
getByteArray,
getElementAt,
getRectArea,
getString,
getWBMPLength,
getWBMPpic,
getWBMPWidth,
invertWBMPImage,
mix,
mix,
openEWBMPFile,
openWBMPFile,
printWBMPImage,
reduce,
rotate,
saveEWBMP2File,
saveWBMPFile,
setElementAt,
setWBMPLength,
setWBMPWidth,
writeWBMPFile |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public WBMPTable()
1. setColumnNames() - to set header (names of the columns)
2. setColumnData() - to insert data into table
public WBMPTable(java.lang.String newColumnNames,
java.util.Vector newColumnData)
newColumnNames - the names of the columns in a string.newColumnData - the Vector of data in the same format.| Method Detail |
public void setColumnNames(java.lang.String newColumnNames)
newColumnNames - new headerpublic java.lang.String getColumnNames()
public void setColumnData(java.util.Vector newColumnData)
newColumnData - new data Vector for a tablepublic java.util.Vector getColumnData()
public void setHeaderFont(java.awt.Font newHeaderFont)
newHeaderFont - new fontpublic java.awt.Font getHeaderFont()
public void setDataFont(java.awt.Font newDataFont)
newDataFont - new fontpublic java.awt.Font getDataFont()
public void setTableSize(WBMPDimension newTableSize)
newTableSize - dimension of a resulting image.public WBMPDimension getTableSize()
public void saveWBMPTable(java.lang.String filename,
boolean headerOnEachPiece)
filename - file name WITHOUT extension.headerOnEachPiece - a flag to show/not show the header in 2..inf image
public static WBMPfile getWBMPCustomTable(CustomFont userFont,
WBMPDimension tableSize,
java.util.Vector colWidth,
java.util.Vector header,
java.util.Vector body,
boolean isHeaderOnEveryPage)
throws java.lang.Exception
userFont - the CustomFont instance. If the WBMPCustomFont.getDefaultFont()
font is specified - the default 4x6 font is used.tableSize - the size of each part of the tablecolWidth - the size of columns in percents. NOTE that all numeric values are added as Strings!header - the header of a tablebody - the body of a tableisHeaderOnEveryPage - a flag representing existance of a header on every page
How to use it? See the sample:
Vector v=new Vector();
v.add("20"); // 1 column size
v.add("30"); // 2 column size
v.add("50"); // 3 column size
Vector v1=new Vector(); // header columns names
v1.add("COL1");
v1.add("COL2");
v1.add("COL3");
Vector v2=new Vector(); //body - a Vector of Vectors.
Vector s=new Vector();
s.add("COLUMN DATA 1");
s.add("COLUMN DATA 2");
s.add("COLUMN DATA 3");
v2.add(s);
WBMPTable.getWBMPCustomTable(WBMPCustomFont.getDefaultFont(),
new WBMPDimension(0,0,95,60),v,v1,v2,false).saveWBMP2File("c:\\test.wbmp");
WBMPfile instance
contains several images which can be obtained by the WBMPfile.getRectArea() method.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||