🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1152

Re: How to prevent MDI windows from being moved by user

#1152
From: John T. Dow
Date: Fri, 19 Mar 2004 05:01
53 lines
3539 bytes
John

Good question. If there's a better way to do what I want to do, I'm all 
ears. Here's what I want to do....

I have an application I'm converting to java. It has 24 tables. I want 
to have each table displayed in a "window" on a desktop area (under the 
one and only menu). While there are 24 tables/windows, there will be
at most about 8 in use at once. These are opened and closed under the
control of the software as the user works with the system. Each window 
has a specific size and placement on the desktop area, predetermined by 
the customer and the developer.

The user begins with one table, and depending on what he's doing, a 
second, then third, etc open up when appropriate, and then eventually 
they close up again automatically.

The windows are designed, sized, and placed such that critical 
information on existing windows is not covered when a new window is opened.

I am not aware of any of the layout managers that provide multiple 
panels simultaneously visible in a cascaded-type arrangement. (Maybe 
staggered is a better word, as "cascade" probably has a specific 
meaning?) The card  layout only shows one at a time. The overlay layout 
is intended to show you all at once, using transparency.

John



John McGrath [TeamB] wrote:
> On 3/18/2004 at 4:13:39 PM, John T. Dow wrote:
> 
> 
>>I've used internal frames to create an mdi application and have
>>everything working as I want it with one exception. I'd like to
>>prevent users from moving windows, as which windows are open at any
>>point in time, and their overlapping placement, is controlled by the
>>business logic. So far I can prevent the user from minimizing,
>>closing, or resizing the windows (panels).  I haven't found how to
>>prevent them from being moved.
>>
>>I posted this question in a jbuilder forum and have had two
>>suggestions for workarounds. 1) Monitor mouse events and prevent
>>moving. 2) Allow moving but provide an easy way to restore positions.
>>
>>Any other solutions, such as a setMovable(false) method?
> 
> 
> It seems strange to me that you are using a JInternalFrame and then you
> want to disable virtually all of the functionality that a
> JInternalFrame provides.  So why use a JInternalFrame?
> 
Technical Details
Message-ID: <405A7EAB.3080204@johntdow.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!washdc3-snh1.gtei.net!news.gtei.net!peer1.stngva01.us.to.verio.net!news.verio.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <405A1103.5040103@johntdow.com> <405a7912@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,7c722403acaaadbc
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-03-18 21:09:39 PST
Message-ID: <405A7EAB.3080204@johntdow.com>
Date: Fri, 19 Mar 2004 00:01:31 -0500
From: "John T. Dow" <john@johntdow.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: How to prevent MDI windows from being moved by user
References: <405A1103.5040103@johntdow.com> <405a7912@newsgroups.borland.com>
In-Reply-To: <405a7912@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 4.15.244.33
X-Trace: newsgroups.borland.com 1079672494 4.15.244.33 (18 Mar 2004 21:01:34 -0800)
Lines: 54
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!washdc3-snh1.gtei.net!news.gtei.net!peer1.stngva01.us.to.verio.net!news.verio.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail