Login  Register

Re: open images in separate graphical device

Posted by Stefan Hanssen on Mar 16, 2007; 9:14am
URL: http://imagej.273.s1.nabble.com/open-images-in-separate-graphical-device-tp3700052p3700054.html

Hi Oliver (and Albert),

Many thanks for your reply. I was already looking into modifying a bunch of
classes, so that ultimately one could open an image in a predefined
GraphicsConfiguration.

Your solution is much easier to implement (no overkill).

Thanks also to Albert Cardona for the quick reply!

-Stefan


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Oliver
S. Lazar
Sent: 16. maaliskuuta 2007 8:37
To: [hidden email]
Subject: Re: open images in separate graphical device

Hi Stefan,

You can use the following code:
//************************************************************
// gets the whole graphics area for the machine
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
               
// gets an array of individual Graphics devices
// ie if you have two video cards length = 2
GraphicsDevice[] gd = ge.getScreenDevices();
               
gc = gd[<here write index>].getDefaultConfiguration();

// in the class ImageWindow/StackWindow You can set the location
this.setLocation(gc.getBounds().x,gc.getBounds().y);

//*************************************************************

Kind regards

Oliver


Stefan Hanssen wrote:

>
> Hi,
>
>  
>
> Is it possible to have ImageJ automatically open up images on a secondary
> graphic device?
>
> Are there any plug-ins available for handling such requests?
>
> I haven't been able to find any documentation about this at all.
>
>  
>
> Thanks,
>
> Stefan Hanssen
>
>  
>
>

--
View this message in context:
http://www.nabble.com/open-images-in-separate-graphical-device-tf3401658.htm
l#a9509505
Sent from the ImageJ mailing list archive at Nabble.com.