Public Member Functions | |
PrintUtil () | |
boolean | printDialog () throws MissingPrintableObjectException |
void | print () throws SettingsNotCorrectException |
void | setPrintable (Printable painter) |
boolean | print (File printableFile, char fileType, String nameOfPrinter) |
Static Public Member Functions | |
String | getBuildingNumber () |
String[] | getPrintersInBuilding (String buildingNumber) throws Exception |
String[] | getPrintersInThisBuilding () throws Exception |
boolean | checkPrinter (String printerName) |
void | main (String[] args) |
Private Member Functions | |
File | createTempFile () throws IOException |
Static Private Member Functions | |
String | getSwitchIP (String ip) throws ArrayIndexOutOfBoundsException |
String | getSwitchName (String switchIP) |
boolean | waitForData (BufferedReader reader, int timeout) throws IOException |
Private Attributes | |
Printable | toPrint |
String | printerName |
int | numberOfCopies |
boolean | isTwoSidePrint |
boolean | isAllPagePrint |
boolean | isRangePagePrint |
int | rangeFrom |
int | rangeTo |
boolean | isPrintToFile |
File | fileToPrint |
boolean | isLandscape |
boolean | settingsOK |
int | sendStatus |
int | nextJob = 1 |
String | cfName |
String | dfName |
String | controlFile |
String | userName = "null" |
String | jobName = "null" |
int | printOptions = USE_DEFAULTS |
int | widthCode = -1 |
String | pagePosition = "twopage" |
String | rectoVerso = "rverso" |
Socket | sock = null |
int | nextPort = 721 |
final int | timeout = 30 |
Static Private Attributes | |
final int | USE_DEFAULTS = 1 |
final int | USE_FORM_CODES = 2 |
final int | USE_OPTIONS = 3 |
|
Creates a new instance of PrintUtil |
|
Checks if printer with given name exists in network
|
|
Method creates temporary file. It file is used later for storing Postscript file created before sending it to printer. It is created in temporary directory.
|
|
Method obtains building number on the basis of ip address
|
|
Method returns printers available in building with given number
|
|
Method returns printers available in client's building
|
|
Method obtains building number on the basis of ip address
|
|
Method returns host name of switch with a given IP
|
|
|
|
Sends a file to a printer to be printed. (method from cern.printing package)
|
|
method prints printable object on printer choosen in dialog with respecting settings from this dialog
|
|
Displays print dialog. When obtaining of printers from OS is successfull it displays regular print dialog. In other case it displays dialog which obtains printers on the base of building number from IT Print Support web script. Obtaining client's building number is automatic, as well.
|
|
sets reference to object which will be printed
|
|
Waits for data to become available from a reader, or a timeout. Returns true if some data is received before the timeout specified.
|
|
|
|
|
|
|
|
destination file for printing ( mode: printing to file in dialog ) |
|
if true all pages printing |
|
if true, printing in landscape mode |
|
if true, printing to file |
|
if true range printing |
|
if true two side printing |
|
|
|
|
|
|
|
number of copies |
|
|
|
name of printer (without suffix .print.cern.ch) |
|
|
|
first page to print |
|
last page to print |
|
|
|
status of printing |
|
id true, all properties needed for printing are correct |
|
|
|
|
|
printable object |
|
|
|
|
|
|
|
|
|
|