craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > Printing issues Post New Topic   Post A Reply
new PrintProperties( PrintProperties.LANDSCAPE ) still print... printer friendly version
next newest post | next oldest post
Author Messages
Ron Troyer
Private First Class

Gender: Unspecified
Location:
Registered: Oct 2004
Status: Offline
Posts: 12

Click here to see the profile for Ron Troyer Send email to Ron Troyer Find more posts by Ron Troyer Edit or delete this message Reply w/Quote
Posted Wednesday, October 13, 2004 @ 14:48:19  

Hi

I am trying to get my table to print in landscape mode. I am using the LANDSCAPE mode in my instantiation of PrintProperties. However, both the print preview and the print output are still in Portrait mode.

// IO Variables
protected TablePrintProp printProp;
.
.
.

// Set up the print properties
public class TablePrintProp extends PrintProperties {
String title;
int borderHeight = 30;
int borderWidth = 30;

public TablePrintProp( String passTitle, int mode ) {
super( mode );
title = passTitle;
}

public int getBorderHeight() {
return borderHeight;
}

public int getBorderWidth() {
return borderWidth;
}
public String getHeader() {
return title + "\nDate: " + new java.util.Date() + "\n ";
}

public String getFooter() {
return "Page: %1% - %2%";
}

public int getHeaderAlign() {
return SwingUtilities.CENTER;
}

public int getFooterAlign() {
return SwingUtilities.LEFT;
}

public Color getHeaderColor() {
return Color.red;
}

public void setTitle( String passTitle ) {
title = passTitle;
}

public void setBorderHeight( int height ) {
borderHeight = height;
}

public void setBorderWidth( int width ) {
borderWidth = width;
}
}
.
.
.

// Setup the default print Properties
printProp = new TablePrintProp( "Lookup Table Listing", TablePrintProp.LANDSCAPE );
.
.
.

public void actionPerformed(ActionEvent e) {
if( e.getSource() == printButton) {
//print the contents in quicktable using the printProperties
dBTable1.print(printProp);
}
else if( e.getSource() == previewButton) {
//show the print preview window using the given printProperties
dBTable1.printPreview(printProp);
}

Do you have any ideas?
Regards
Ron Troyer

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Wednesday, October 13, 2004 @ 22:42:21  

There is a minor bug with the value for the LANDSCAPE constant in QuickTable. We have fixed this. Soon we will release this version.

Until then , please use

printProp = new TablePrintProp( "Lookup Table Listing", 1 )

instead of

printProp = new TablePrintProp( "Lookup Table Listing", TablePrintProp.LANDSCAPE )

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios