AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YChart | YDAT | YWAIT | Byzgraf | FAQs
getScreenSize () yoix.swing
 
Returns Java's idea of your screen's size. The numbers may seem reasonable, but Java can be wrong about resolution, so they are not particularly helpful. In fact, there is no good reason to use getScreenSize in Yoix applications. Instead, work in the 72 dot per inch coordinate system that Yoix sets up for you, and use
VM.screen.height
and
VM.screen.width
when you need to know the size of your screen.
 
 Example:   The program,
import yoix.*.*;

JFrame f = {
    Dimension size = {
        double height = VM.screen.height/2;
        double width = VM.screen.width/2;
    };

    Point location = {
        double x = VM.screen.width/4;
        double y = VM.screen.height/4;
    };
};

f.visible = TRUE;
sleep(10);
exit(0);
shows a centered frame that is half the size of your screen for 10 seconds and then exits.
 
 Return:   Dimension
 
 See Also:   getScreenResolution
 
 Warning:   May not be supported in future releases.

 

Yoix is a registered trademark of AT&T Inc.