Re: [JAVA2D] Java2D DirectX Hardware Acceleration on Windows Server 2008?

2008-07-03 Thread java2d
 Every native DirectX application runs fine on my machine without making it 
 any unstable. Why should Java be an exception?

The 6u10 version may very well run just fine on your system. The older versions 
combined DirectX and GDI rendering to the same surface which is prohibited on 
Vista (something that used to work just fine on previous Windows versions).

Another thing to consider is that Java2D makes use of DirectX APIs in a 
slightly different way than the typical 3D applications like games, so we 
often hit less tested code paths of the drivers.

You can disable the hw/os check by setting J2D_D3D_NO_HWCHECK env variable to 
'true' prior to starting your application. I'm pretty sure it will work fine on 
your system (make sure you have the latest drivers).

Thanks,
   Dmitri
[Message sent by forum member 'trembovetski' (trembovetski)]

http://forums.java.net/jive/thread.jspa?messageID=284117

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


[JAVA2D] Querying paper sizes for a printer

2008-07-03 Thread ssinai
Given a print service from something like

PrintService defaultPrintService =
PrintServiceLookup.lookupDefaultPrintService()

is there a way to query the default print service to get the paper sizes
that print service (printer) can handle?  For example, I'd like to get a
list back containing things like Legal, Letter, A4, A5, B4, etc.

I'm fiddling around with the following code...

PrintService defaultPrintService =
PrintServiceLookup.lookupDefaultPrintService();
Object [] res = (Object
[])defaultPrintService.getSupportedAttributeValues(Media.class, null, null);
MediaRequested mr = (MediaRequested)res[0];
System.out.println(mr=+mr);

and the final result is mr=na-letter.

I was hoping I'd get a list of legal paper sizes.   Is this even possible?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Querying-paper-sizes-for-a-printer-tp18254676p18254676.html
Sent from the Sun - Java2D-Interest mailing list archive at Nabble.com.

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


Re: [JAVA2D] Querying paper sizes for a printer

2008-07-03 Thread Phil Race
You almost had it. For some reason you aren't properly using the answer 
(Object [] res)  you got from the service,
so you are only seeing the first of the list. And I'm not sure where you 
got MediaRequested from, that

should not compile as there's no such class.

That should be
Media[] res = (Media[])getSupportedAttributeValues(Media.class, null, 
null);


Then print each of the elements of res.

-phil.

ssinai wrote:

Given a print service from something like

PrintService defaultPrintService =
PrintServiceLookup.lookupDefaultPrintService()

is there a way to query the default print service to get the paper sizes
that print service (printer) can handle?  For example, I'd like to get a
list back containing things like Legal, Letter, A4, A5, B4, etc.

I'm fiddling around with the following code...

PrintService defaultPrintService =
PrintServiceLookup.lookupDefaultPrintService();
Object [] res = (Object
[])defaultPrintService.getSupportedAttributeValues(Media.class, null, null);
MediaRequested mr = (MediaRequested)res[0];
System.out.println(mr=+mr);

and the final result is mr=na-letter.

I was hoping I'd get a list of legal paper sizes.   Is this even possible?

Thanks.
  


===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


Re: [JAVA2D] Java2D DirectX Hardware Acceleration on Windows Server 2008?

2008-07-03 Thread java2d
 You can disable the hw/os check by setting
 J2D_D3D_NO_HWCHECK env variable to 'true' prior to
 starting your application. I'm pretty sure it will
 work fine on your system (make sure you have the
 latest drivers).

That was exactly what I was looking for :)
The point is that I don't need the hw acceleration to make things run, but 
rather to see how well they perform under real conditions. I've just tested it 
and it works fine, with latest NVidia drivers installed (ForceWare 175.16).

Thanks a lot, Dmitri!

-- smf68
[Message sent by forum member 'smf68' (smf68)]

http://forums.java.net/jive/thread.jspa?messageID=284200

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


Re: [JAVA2D] Querying paper sizes for a printer

2008-07-03 Thread ssinai
Thanks Phil.  Now it's working.  

(I stumbled upon a way to make this work about a year ago, but for some
reason, I couldn't remember how to do it.  Probably age.)

BTW - The MediaRequested reference was caused by me doing a little editing
in the original post, without compiling.  I was starting to get sleepy and
delirious, i.e, careless, when I posted.

Thanks again,
Steve Sinai


Phil Race wrote:
 
 You almost had it. For some reason you aren't properly using the answer 
 (Object [] res)  you got from the service,
 so you are only seeing the first of the list. And I'm not sure where you 
 got MediaRequested from, that
 should not compile as there's no such class.
 
 That should be
 Media[] res = (Media[])getSupportedAttributeValues(Media.class, null, 
 null);
 
 Then print each of the elements of res.
 
 -phil.
 
 ssinai wrote:
 Given a print service from something like

 PrintService defaultPrintService =
 PrintServiceLookup.lookupDefaultPrintService()

 is there a way to query the default print service to get the paper sizes
 that print service (printer) can handle?  For example, I'd like to get a
 list back containing things like Legal, Letter, A4, A5, B4,
 etc.

 I'm fiddling around with the following code...

 PrintService defaultPrintService =
 PrintServiceLookup.lookupDefaultPrintService();
 Object [] res = (Object
 [])defaultPrintService.getSupportedAttributeValues(Media.class, null,
 null);
 MediaRequested mr = (MediaRequested)res[0];
 System.out.println(mr=+mr);

 and the final result is mr=na-letter.

 I was hoping I'd get a list of legal paper sizes.   Is this even
 possible?

 Thanks.
   
 
 ===
 To unsubscribe, send email to [EMAIL PROTECTED] and include in the
 body
 of the message signoff JAVA2D-INTEREST.  For general help, send email to
 [EMAIL PROTECTED] and include in the body of the message help.
 
 

-- 
View this message in context: 
http://www.nabble.com/Querying-paper-sizes-for-a-printer-tp18254676p18266184.html
Sent from the Sun - Java2D-Interest mailing list archive at Nabble.com.

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.