public class Report extends Object implements NetPhantomConstants
Modifier and Type | Field and Description |
---|---|
static int |
REPOBJTYPE_CONTJOB |
static int |
REPOBJTYPE_ENDJOB |
static int |
REPOBJTYPE_STARTJOB |
static int |
USE_ON_ALL
Constant indicating that a header or footer should be used on all pages.
|
static int |
USE_ON_PREC
Constant indicating that a footer should be used on all pages except the last page.
|
static int |
USE_ON_TRAIL
Constant indicating that a header should be used on all pages except the first page.
|
ACTION_CLOSEWINDOW, ACTION_CONTROL, ACTION_HOSTKEY, ACTION_MENU, ACTION_NONE, ACTION_NOTEBOOKPAGE, ACTION_POPUPMENU, CC_BACKGROUND, CC_BOTH, CC_FOREGROUND, CC_NONE, CLIPBOARD_GET, CLIPBOARD_SET, DATEF_DMY, DATEF_MDY, DATEF_SYSTEM, DATEF_YMD, DDE_ADVISE, DDE_EXECUTE, DDE_INITIATE, DDE_POKE, DDE_REQUEST, DDE_TERMINATE, DDE_UNADVISE, DDE_UPDATE, DDEVAR_DISABLE, DDEVAR_ENABLE, DDEVAR_REQUEST, DDEVAR_SET, DDEVAR_VALIDATE, EFT_AMOUNT, EFT_DATE, EFT_DATEAMOUNT, EFT_NORMAL, EFT_PASSWORD, EVENT_CHAR, EVENT_CHECK, EVENT_CLICK, EVENT_COMMAND, EVENT_DBLCLICK, EVENT_DDECONNECTION, EVENT_DDEDATA, EVENT_DDEERROR, EVENT_DDEEXECUTE, EVENT_DDEINVALIDATE, EVENT_DDEPOKE, EVENT_DDEREQUEST, EVENT_DEFOCUS, EVENT_FOCUS, EVENT_PAGEDOWN, EVENT_PAGEUP, EVENT_SELECT, EVENT_UNKNOWN, EVENT_USERCHANGE, EXTENDEDINFO_IDS_TO_CLIENT, FOCUSTYPE_CLIENTTARGET, FOCUSTYPE_CONTROL, FOCUSTYPE_NONE, ICON_CRITICAL, ICON_INFORMATION, ICON_NOICON, ICON_QUERY, ICON_WARNING, J_AUTO, J_BOTTOM, J_BOTTOMLEFT, J_BOTTOMRIGHT, J_CENTER, J_LEFT, J_RIGHT, J_TOP, J_TOPLEFT, J_TOPRIGHT, MAX_PANELS_PER_SESSION, MAX_SESSIONS, MB_ABORTRETRYIGNORE, MB_CANCEL, MB_ENTER, MB_ENTERCANCEL, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL, MBID_CANCEL, MBID_DEFAULT, MBID_ENTER, MBID_IGNORE, MBID_NO, MBID_OK, MBID_RETRY, MBID_YES, MS_MOVE, MS_NONE, MS_SIZE, NETPHANTOM_COPYRIGHT, NETPHANTOM_COPYRIGHT2, NETPHANTOM_VERSION, OBJEVENT_CHECK, OBJEVENT_CLICK, OBJEVENT_DBLCLICK, OBJEVENT_DEFOCUS, OBJEVENT_FOCUS, OBJEVENT_SELECT, OBJEVENT_USERCHANGE, PANELCREATE_APPPANEL, PANELCREATE_DANGLINGPANEL, PANELCREATE_DLGFRAME, PANELCREATE_EXTENDEDINFO, PANELCREATE_ICON, PANELCREATE_INDIVIDUALSIZE, PANELCREATE_POPUP, REPLYTYPE_CLIENTEXECUTE, REPLYTYPE_CLIPBOARD, REPLYTYPE_DDE, REPLYTYPE_FFONTLIST, REPLYTYPE_MESSAGEBOX, REPLYTYPE_REPORT, REPLYTYPE_SAVEPROPS, REPLYTYPE_TERMMARK, RPRT_CANCELPRINTJOB, RPRT_CLOSEPRINTJOB, RPRT_CONTPRINTJOB, RPRT_OPENPRINTJOB, RPRT_PRINTJOBCANCLD, RPRT_PRINTJOBCLOSED, RPRT_PRINTJOBCONT, RPRT_PRINTJOBOPENED, RPRT_PRINTJOBSTARTED, RPRT_STARTPRINTJOB, SELMODE_NORMAL, SELMODE_NOTALLOWED, SELMODE_REQUIRED, SELTYPE_MULTIPLE, SELTYPE_SINGLE, SEPARATOR, SEPARATORCHAR, TRANS_APPLICATIONCHANGE, TRANS_CALLOBJECT, TRANS_CANCELEXIT, TRANS_CLEARLOCK, TRANS_CLIENTEXECUTE, TRANS_CLIENTJARS, TRANS_CLIENTTEXTTABLE, TRANS_CLIENTUPDATED, TRANS_CLIENTUPDATEDNOLOCK, TRANS_CLIPBOARD, TRANS_CLIPBOARDCOMPONENT, TRANS_CLOSETERMINALWINDOW, TRANS_CONNECTIONREFUSED, TRANS_COUNTRYINFO, TRANS_CREATEPANEL, TRANS_CREATESESSION, TRANS_DDE, TRANS_DDEEVENT, TRANS_DDEEVENTREPLY, TRANS_DDEVAREVENT, TRANS_DISPLAYHELP, TRANS_DISPLAYTERMINAL, TRANS_DISPLAYTOOLTIPS, TRANS_ENDCONVERSATION, TRANS_EXIT, TRANS_FONTSUBSTITUTION, TRANS_HOSTCOLORTABLE, TRANS_HOSTPRINT, TRANS_HWND, TRANS_INACTIVESESSION, TRANS_INITIATE, TRANS_KEEPALIVE, TRANS_LOCALE, TRANS_LOGEVENT, TRANS_MESSAGEBOX, TRANS_MESSAGEBOXWITHREPLY, TRANS_MODALREPLY, TRANS_MULTTERM, TRANS_PING, TRANS_PRINTCOMPONENT, TRANS_PRINTPANEL, TRANS_PRINTREPORT, TRANS_PRTWINKEY, TRANS_RECONNECT, TRANS_REDIRECTION, TRANS_REMOVEPANELATLEVEL, TRANS_REMOVETERMINAL, TRANS_RENEGOTIATESSL, TRANS_REQUESTHELP, TRANS_RESOURCEURL, TRANS_SELECTSESSION, TRANS_SESSIONACTIVE, TRANS_SESSIONSELECTED, TRANS_SETCOLORS, TRANS_SETFOCUS, TRANS_SETLOCK, TRANS_SETPANELNESTLEVEL, TRANS_SETUPPARAMS, TRANS_SHOWDOCUMENT, TRANS_SOCKET, TRANS_SOUNDALARM, TRANS_STARTUPINFO, TRANS_STOPSESSION, TRANS_TERMINALDATA, TRANS_TERMINALUPDATE, TRANS_TERMINALWINDOW, TRANS_TERMWINTEXT, TRANS_UPDATEAPPLICATION, TRANS_UPDATEPANEL, TRANS_USEREXITPRTKEY, TRANSACTION_VERSION, TS_CLOSE, TS_DATA, TS_ERROR, TS_OPEN, VSIGN_MINUS, VSIGN_NONE, VSIGN_PLUSMINUS, YEARF_6DIG, YEARF_8DIG, YEARF_EXP8
Constructor and Description |
---|
Report(ReportGenerator rg)
Creates a new report.
|
Modifier and Type | Method and Description |
---|---|
boolean |
appendPages(PhantomWorker worker)
Appends pages to a transaction.
|
boolean |
bindFile(String repeatblock,
String filename)
Binds a file to a repeat block.
|
boolean |
bindList(String repeatblock,
String listbox)
Binds a list to a repeat block.
|
boolean |
build()
Builds up the pages in the report.
|
void |
dispose()
Disposes of all the different objects belonging to this report.
|
void |
doCreatePages(boolean doCreatePage) |
boolean |
drawLine(String area,
int x1,
int y1,
int x2,
int y2)
Draw a line.
|
boolean |
drawRect(String area,
int x1,
int y1,
int x2,
int y2)
Draw a rectangle.
|
boolean |
fillRect(String area,
int x1,
int y1,
int x2,
int y2)
Fill a rectangle.
|
String |
getFontSubstitution(String reqFont) |
int |
getLeftMargin()
Gets the left margin.
|
int |
getTotPages()
Gets the total number of pages.
|
boolean |
newPage()
Adds a page break.
|
boolean |
printText(String area,
int x,
int y,
String data)
Print a text.
|
boolean |
printVar(String area,
int x,
int y,
String var)
Print a variable.
|
void |
setAdjustment(int adj)
Sets the adjustment to be used on subsequent print items.
|
boolean |
setBackground(int r,
int g,
int b)
Sets the background color.
|
void |
setFont(String fontname)
Sets the font to be used on subsequent print items.
|
boolean |
setFontSize(int size)
Sets the font size to be used on subsequent print items.
|
boolean |
setFontStyle(int style)
Sets the font style to be used on subsequent print items.
|
boolean |
setFontSubstitution(String replFont,
String reqFont)
Sets font substitution list.
|
boolean |
setMargins(int topMargin,
int bottomMargin,
int leftMargin,
int rightMargin)
Sets the margins for the report page, after checking that the sums of opposing margins are less than the page size.
|
boolean |
setPageFooter(int useon,
int height)
Sets the page footer on the report.
|
boolean |
setPageHeader(int useon,
int height)
Sets the page header on the report.
|
boolean |
setRepeatBlock(String name,
int height,
int x,
int y)
Creates a new repeat block and sets its name and height.
|
boolean |
setRepeatField(String name,
int x,
int y,
int startcol,
int endcol)
Sets a repeat field in a repeat block.
|
boolean |
setReportFooter(int height)
Sets the report footer.
|
boolean |
setReportHeader(int height)
Sets the report header.
|
boolean |
setSize(int width,
int height)
Sets the page size for the report.
|
boolean |
setThickness(int thickness)
Sets the thickness to be used on subsequent draw items.
|
public static final int REPOBJTYPE_STARTJOB
public static final int REPOBJTYPE_CONTJOB
public static final int REPOBJTYPE_ENDJOB
public static final int USE_ON_ALL
public static final int USE_ON_TRAIL
public static final int USE_ON_PREC
public Report(ReportGenerator rg)
rg
- The report generator that created this report.public void dispose()
public boolean bindFile(String repeatblock, String filename)
repeatblock
- The name of the repeat block to bind the file to.filename
- The name of the file.true
if the file could be binded to the repeat block, false
otherwise.public boolean bindList(String repeatblock, String listbox)
repeatblock
- The name of the repeat block to bind the file to.listbox
- The name of the listbox.true
if the listbox could be binded to the repeat block, false
otherwise.public boolean drawLine(String area, int x1, int y1, int x2, int y2)
area
- The area on which to draw the line.x1
- The x-position for the lines starting point.y1
- The y-position for the lines starting point.x2
- The x-position for the lines end point.y2
- The y-position for the lines end point.true
if the line was added successfully, false
otherwise.public boolean drawRect(String area, int x1, int y1, int x2, int y2)
area
- The area on which to draw the rectangle.x1
- The x-position for the rectangles starting point.y1
- The y-position for the rectangles starting point.x2
- The x-position for the rectangles end point.y2
- The y-position for the rectangles end point.true
if the rectangle was added successfully, false
otherwise.public boolean fillRect(String area, int x1, int y1, int x2, int y2)
area
- The area on which to fill the rectangle.x1
- The x-position for the rectangles starting point.y1
- The y-position for the rectangles starting point.x2
- The x-position for the rectangles end point.y2
- The y-position for the rectangles end point.true
if the filled rectangle was added successfully, false
otherwise.public boolean newPage()
true
if the new page report object was added successfully, false
otherwise.public boolean printText(String area, int x, int y, String data)
area
- The area on which to print the text.x
- The x-position for the text.y
- The y-position for the text.data
- The text to print.true
if print text item was added successfully, false
otherwise.public boolean printVar(String area, int x, int y, String var)
area
- The area on which to print the variable.x
- The x-position for the variable.y
- The y-position for the variable.var
- The name of the variable.true
if print variable item was added successfully, false
otherwise.public void setAdjustment(int adj)
adj
- The new adjustment value.public boolean setBackground(int r, int g, int b)
r
- The red component for the new background.g
- The green component for the new background.b
- The blue component for the new background.public void setFont(String fontname)
fontname
- The new font.public boolean setFontSize(int size)
size
- The new font size.public boolean setFontStyle(int style)
style
- The style to be used;public boolean setFontSubstitution(String replFont, String reqFont)
replFont
- The font that will be used as a replacement.reqFont
- A list of fonts that will be replaced with this font.public boolean setMargins(int topMargin, int bottomMargin, int leftMargin, int rightMargin)
topMargin
- The top margin.bottomMargin
- The bottom margin.leftMargin
- The left margin.rightMargin
- The right margin.true
if margins fit inside page, false
otherwise.public boolean setPageFooter(int useon, int height)
useon
- Flag indicating on which pages the page footer should be used on.height
- The height of the page footer in pixels.true
if the page footer could be set, false
otherwise.public boolean setPageHeader(int useon, int height)
useon
- Flag indicating on which pages the page header should be used on.height
- The height of the page header in pixels.true
if the page header could be set, false
otherwise.public boolean setRepeatBlock(String name, int height, int x, int y)
name
- The repeat blocks name.height
- The repeat blocks height.x
- The repeat blocks x-position.y
- The y-position of the first instance of the repeat block.true
if the repeat block was created, false
otherwise.public boolean setRepeatField(String name, int x, int y, int startcol, int endcol)
name
- The name of the repeat block.x
- The x-position of the repeat field within the repeat block.y
- The y-position of the repeat field within the repeat block.startcol
- The first column from the bind source to include in this repeat field.endcol
- The last column from the bind source to include in this repeat field.true
if the repeat block was found, false
otherwise.public boolean setReportFooter(int height)
height
- The height of the footer.true
if the footer could be set, false
otherwise.public boolean setReportHeader(int height)
height
- The height of the header.true
if the header could be set, false
otherwise.public boolean setSize(int width, int height)
width
- The width of the page.height
- The height of the page.true
if the width and height are valid, false
otherwise.public boolean setThickness(int thickness)
thickness
- The thickness.true
if the setting of the thickness.public boolean build()
public void doCreatePages(boolean doCreatePage)
public boolean appendPages(PhantomWorker worker)
public int getTotPages()
public int getLeftMargin()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.