The plots within each tab (can display either one or four) can be
different sizes depending upon where the user drags the splitPane bar;
that appears to work ok for me as you tab between ones where the drag
bar has been moved. One of the display options is to "maximize" the
selected plot (of the four), which is accomplished by simply replacing
the 2x2 layout in the JPanel "container" with a single plot and then
appropriately repainting everything.
Two problems which I have which you should be aware of are 1)
potentially flaky OpenGL implementations/settings with the different
graphics cards we use which sometimes cause native code exceptions when
trying to manually resize/move the JFrame. And 2) sometimes I get
"bleed-through" in the left-hand tabbedPane used for the GUI widgets
depending upon when GUI repaints occur since the plot rendering, which
triggers the GUI widget creation, is done in a separate thread and not
the main one. While annoying, it goes away with a simple click on the
GUI which forces a repaint.
[mailto:owner-visad@xxxxxxxxxxxxxxxx]On Behalf Of Bruce Flynn
Sent: Thursday, March 31, 2005 3:24 PM
I like your interface. Are your plots always the same size and that's
why the 3D canvas is not a problem in the tabs? A feature that I would
like to be implement is the ability to "maximize" a plot. But, if I
make a plot take up the whole tab won't it interfere with the other
On Mar 31, 2005, at 3:16 PM, Flaggs, Don wrote:
> JTabbedPane's have worked fine for me to load/display multiple J3D
> within the same JFrame. My object containment hierarchy is
> JFrame/JTabbedPane/JSplitPane/(JTabbedPane/JPanel) where the JPanel
> contains either one or four DisplayImplJ3d.getComponent()'s. Attached
> is a .png image showing the GUI. The only light weight "problem" I
> really had was wrt the pull-down menu's where I had to use the
> JPopUpMenu.setDefaultLightWeightPopUpEnabled(false) option.
> ... dlf
> -----Original Message-----
> From: owner-visad@xxxxxxxxxxxxxxxx
> [mailto:owner-visad@xxxxxxxxxxxxxxxx]On Behalf Of Bruce Flynn
> Sent: Thursday, March 31, 2005 11:41 AM
> To: Curtis Rueden
> Cc: visad-list@xxxxxxxxxxxxx
> Subject: Re: VisAD Component "weight"
> That sounds like a pretty good idea. I didn't even think of a
> JTabbedPane. I also have to thank you for the link to j3d.org, it's a
> great resource that I didn't know existed.
> Thanks again for all your help
> On Mar 31, 2005, at 1:21 PM, Curtis Rueden wrote:
>> Hi Bruce,
>> Actually, I think it is the other way around with SDI/MDI:
>> SDI means one (single) document per frame
>> MDI means multiple documents in one master frame
>> The original idea was that with SDI, you spawned a separate instance
>> of the application for each document, hence "single document
>> interface." So I suppose technically, both the multiple JFrame and
>> single JInternalFrame approaches are "multiple document" approaches,
>> although MDI usually means "all documents in one master frame."
>> Given the number of windows you need to work with, my suggestion is
>> use tabs. I know JTabbedPane can be made to work with Java3D (others
>> on the VisAD list have mentioned it in the past). According to
>> J3D.org's article on Java3D and Swing --
>> http://www.j3d.org/tutorials/quick_fix/swing.html -- JTabbedPane will
>> work "as long as you only put J3D in the |JTabbedPane| and not any
>> Swing elements." But you can easily detect which tab is active and
>> toggle the states of various nearby Swing components to create the
>> same effect.
>> Good luck,
>> Bruce Flynn wrote:
>>> Hey Curtis,
>>> That's funny, I just got done having a discussion with co-workers
>>> debating MDI vs. SDI.
>>> Just for clarity, my understanding is as follows:
>>> SDI: All windows inside a main application window. ie.
>>> JDesktopPane with JInternalFrames
>>> MDI: As you described, all separate window controlled by a main
>>> window controller
>>> The problem with MDI is that we have any number of instruments each
>>> with a 6 window display. If you are displaying 3 instruments at
>>> you have 18 windows that look the same except for the title bar with
>>> the instrument name. Also, the application is a monitoring
>>> application and a MDI does not easily restrict the application to a
>>> small piece of screen real-estate.
>>> The other option being considered is a sudo-SDI where each of the 6
>>> components for an instrument would be in a scrollable/slideable
>>> in a single JFrame. One for each instrument. The problem with this
>>> approach is when a user wants to maximize a graph the handling of
>>> scroll/slider panes would be a mess.
>>> So we're juggling around MDI, SDI, or sudo-SDI, to accommodate the
>>> large amounts of windows. Any suggestions or comments are more than
>>> I'm going to tryout the 2D display just to test the feasibility of
>>> using the JInternalFrames and see if I can get that working.