mpicbg-scicomp / halcyon

Halcyon is JavaFX framework for designing dockable multiple window applications
GNU General Public License v2.0
5 stars 1 forks source link

API for specifying the initial position of the main Halcyon window #34

Closed royerloic closed 8 years ago

royerloic commented 8 years ago

Right now the main Halcyon window has dimensions provided to the constructor and a random location. It would be great to be able to specify where on the screen we would like to position it:

It could look like this:

We would have a new constructor: new HalcyonFrame(double pMarginLeft, double pMarginRight, double pMarginTop, double pMarginBottom)

if all are zero (0, 0, 0, 0) then the window occupies the whole available screen. if the first is 0.5 and all others are 0 (0.5, 0, 0, 0) then it occupies the right half of the screen. similarly:

(0, 0.5, 0, 0) -> occupies left half side (0, 0, 0.2, 0) -> occupies the bottom 80% of the screen (0, 0, 0, 0.3) -> occupies the top 70% of the screen.

Of course: pMarginLeft+pMarginRight <1 and pMarginTop+pMarginBottom<1

:-)

hkmoon commented 8 years ago

My preference store/restore function might be helpful for figuring this out.

royerloic commented 8 years ago

Partly implemented, not yet with percentages...

royerloic commented 8 years ago

I think we are good with the current functionality. I will close this issue now.