Dialogs beyond the Desktop

I just stumbled across the fact that the Database chooser, Blog reader, and Graduated Colour chooser, are all dialogs that can be moved outside the bounds of the Desktop. It just surprised me, but maybe it is intended and/or harmless?

Presumably because JalviewDialog doesn’t extend JInternalFrame, although in

JalviewDialog.initDialogFrame()

frame = new JDialog(Desktop.instance, modal); // Desktop is the ‘owner’ of the JDialog

I expected this to constrain the dialog to the bounds of the Desktop, but it doesn’t.

mungo

The University of Dundee is a registered Scottish Charity, No: SC015096

···

Email signature

University of Dundee shield logo

Mungo Carstairs
Jalview Computational Scientist

The Barton Group
Division of Computational Biology

School of Life Sciences

University of Dundee, Dundee, Scotland, UK

www.jalview.org

www.compbio.dundee.ac.uk
g.m.carstairs@dundee.ac.uk

University of Dundee FacebookUniversity of Dundee TwitterUniversity of Dundee LinkedInUniversity of Dundee YouTubeUniversity of Dundee InstagramUniversity of Dundee Snapchat
We’re Scottish University of the Year again!
The Times / Sunday Times Good University Guide 2016 and 2017

Hi Mungo.

I just stumbled across the fact that the Database chooser, Blog reader, and Graduated Colour chooser, are all dialogs that can be moved outside the bounds of the Desktop. It just surprised me, but maybe it is intended and/or harmless?

Presumably because JalviewDialog doesn’t extend JInternalFrame, although in

JalviewDialog.initDialogFrame()

frame = new JDialog(Desktop.instance, modal); // Desktop is the ‘owner’ of the JDialog

I expected this to constrain the dialog to the bounds of the Desktop, but it doesn’t.

Modal dialogs are JFrames, and float above their parent by default. The blog reader is historically a JalviewDialog because we needed to route all popups through one dialog thread so we could avoid deadlocks with multiple threads raising modal dialogs (which caused a hang on Windows). The reader could become an internal frame, but it will need careful and thorough multiplatform testing.

j.

The University of Dundee is a registered Scottish Charity, No: SC015096

···

On 05/12/2017 11:16, Mungo Carstairs (Staff) wrote: