Microsoft Magnifier and Java Application

Hi Guys,

I am building a swing application and whenever a new screen shows up on the window, they tend to show up behind the Microsoft Magnifier. They are actually supposed to show up below the Magnifier itself. How can I make that happen?

I am aware that I can set the following in the accessibility.properties file:

screen_magnifier_present=true

What more can I do to ensure that new Frames will display below the Magnifier location?

-Sri :)

[488 byte] By [yreddy1] at [2007-9-26 2:16:22]
# 1

Hi Sri,

I am just beginning to run my application with Microsoft Magnifier, so I don't have too much to say yet but I did notice that if I maximize my JFrame then it correctly fills only the screen space not used by Microsoft Magnifier. Normally, however I start my application with frames that compute their dimensions from the screen parameters and these computations, as you observed, don't seem to take Microsoft Magnifier into account. More later, but in the mean time:

1) where did you find this?:

>>I am aware that I can set the following in the accessibility.properties file:

>>screen_magnifier_present=true

2) I observe a certain amount of flakiness even when running other Microsoft programs with Magnifier.

Regards,

Joe

joefk at 2007-6-29 9:14:44 > top of Java-index,Desktop,Core GUI APIs...
# 2

Hi Joe,

I have noticed the flakiness associated with Microsoft Magnifier as well.

I found "screen_magnifier_present=true" at the following web address:

http://java.sun.com/j2se/1.3/docs/guide/access/properties.html

Someone suggested that I try to get the available desktop space and then bring my frames in this space. I have not tried it yet. I will let you know soon.

-Sri :)

yreddy1@yahoo.com

yreddy1 at 2007-6-29 9:14:44 > top of Java-index,Desktop,Core GUI APIs...
# 3

Joe,

I have figured it out. I had to read the WIN32 API and then played around with JNI. I used C code and included <windows.h>

Here's some sample code:

JNIEXPORT jint JNICALL ... (JNIEnv *env, jobject obj)

{

RECT rect;

SystemParametersInfo(SPI_GETWORKAREA,0,&rect,0);

printf("TOPCoordinate==: %d\n", rect.top);

printf("BOTTOMCoordinate==: %d\n", rect.bottom);

printf("LEFTCoordinate==: %d\n", rect.left);

printf("RIGHTCoordinate==: %d\n", rect.right);

return rect.top;

}

It is quite simple actually. That's about it.

Best Regards,

-Sri :)

yreddy1 at 2007-6-29 9:14:44 > top of Java-index,Desktop,Core GUI APIs...
# 4

Hi Sri,

Nice solution. I was working on a truly ugly hack within java that involved maximizing an invisible JFrame and recording the resulting screen coordinates. Don't know if it would have worked anyway but your solution is clearly better.

It turns out that the accessibility development of our project is temporarily placed on the back burner in favor of completion of some multi-language internationalization stuff first. By the time I get back to the accessibility work, you'll probably have everything completely figured out. ;-)

Best regards,

Joe

joefk at 2007-6-29 9:14:44 > top of Java-index,Desktop,Core GUI APIs...