This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 36164 - [2003-10-26] TopComponent getParent() returns null even it is in the Tabbed container
Summary: [2003-10-26] TopComponent getParent() returns null even it is in the Tabbed c...
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC All
: P1 blocker (vote)
Assignee: David Simonek
URL:
Keywords: T9Y
: 36024 (view as bug list)
Depends on:
Blocks: 36145
  Show dependency tree
 
Reported: 2003-09-17 14:30 UTC by Peter Zavadsky
Modified: 2008-12-22 17:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Zavadsky 2003-09-17 14:30:22 UTC
The new Tabbed container
(tabControl.TabbedContainer) was implemented the
way it add into the AWT hierarchy just the
selected one component.
Beside the obvious problems with revalidating
(when switching) is causes also problem for tests,
which are unable traverse AWT hierarchy.
Comment 1 David Simonek 2003-09-18 14:46:46 UTC
*** Issue 36024 has been marked as a duplicate of this issue. ***
Comment 2 David Simonek 2003-10-17 14:07:59 UTC
date p[ostponed to the end of october. If this is problem please let
me know.
Comment 3 David Simonek 2003-10-24 20:18:45 UTC
fixed in brach. But repaint problems of editor toolbar remains it
seems, it has to be their wrong painting.

cvs log:
Removing
core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/ComponentContainer.java;
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/Attic/ComponentContainer.java,v
 <--  ComponentContainer.java
new revision: delete; previous revision: 1.1.2.4
done
Checking in
core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/ScrollableTabsUI.java;
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/Attic/ScrollableTabsUI.java,v
 <--  ScrollableTabsUI.java
new revision: 1.1.2.24; previous revision: 1.1.2.23
done
RCS file:
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/Attic/StackLayout.java,v
done
Checking in
core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/StackLayout.java;
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/Attic/StackLayout.java,v
 <--  StackLayout.java
new revision: 1.1.2.1; previous revision: 1.1
done
Checking in
core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/TabControl.java;
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/Attic/TabControl.java,v
 <--  TabControl.java
new revision: 1.1.2.10; previous revision: 1.1.2.9
done
Checking in
core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/TabbedContainer.java;
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/Attic/TabbedContainer.java,v
 <--  TabbedContainer.java
new revision: 1.1.2.22; previous revision: 1.1.2.21
done
cvs diff: StackLayout.java is a new entry, no comparison available
Comment 4 _ tboudreau 2003-10-26 19:49:26 UTC
I added some logging to StackLayout to try to solve the problem that
the editor disappears whenever I type or do almost anything (it really
isn't there, clicking does nothing).

ShowComponent is getting called for every component in the tabbed pane
during startup;  I added logging to the StackLayout and got the log
below.

TabControl offers the ability to add components in batches to avoid
exactly this type of thing - I recommend you use it.

If you're determined not to take advantage of it, you should at least
be able to call
Thread.holdsLock(getTreeLock()) 
and avoid doing any validation, layout or painting by grabbing the
AWT tree lock before adding a bunch of components en banc.

Loading of window system takes 641 ms
ShowComponent:
org.netbeans.modules.projects.CurrentProjectNode$ProjectsTab[Project De
fault,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=null,alignmentY=null,bor
der=,flags=256,maximumSize=,minimumSize=,preferredSize=]
  comp bounds: java.awt.Rectangle[x=0,y=0,width=0,height=0]
ShowComponent:
org.netbeans.modules.java.JavaEditor$JavaEditorComponent[StackLayout,0,
0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=null,alignmentY=null,border=,fla
gs=256,maximumSize=,minimumSize=,preferredSize=]
  comp bounds: java.awt.Rectangle[x=0,y=0,width=0,height=0]
ShowComponent: org.netbeans.core.NbSheet[No
Properties,0,0,0x0,invalid,layout=java.awt
.BorderLayout,alignmentX=null,alignmentY=null,border=,flags=256,maximumSize=,minimumSi
ze=,preferredSize=]
  comp bounds: java.awt.Rectangle[x=0,y=0,width=0,height=0]
ShowComponent:
org.netbeans.core.execution.ExecutionViewAction$ExecutionView[Execution
,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=null,alignmentY=null,border=,
flags=256,maximumSize=,minimumSize=,preferredSize=]
  comp bounds: java.awt.Rectangle[x=0,y=0,width=0,height=0]
ShowComponent:
  comp bounds: java.awt.Rectangle[x=0,y=0,width=0,height=0]
ShowComponent:
org.netbeans.modules.projects.CurrentProjectNode$ProjectsTab[Project De
fault,0,0,0x0,invalid,hidden,layout=java.awt.BorderLayout,alignmentX=null,alignmentY=n
ull,border=,flags=256,maximumSize=,minimumSize=,preferredSize=]
  comp bounds: java.awt.Rectangle[x=0,y=0,width=0,height=0]
ShowComponent:
org.netbeans.modules.java.JavaEditor$JavaEditorComponent[StackLayout,0,
0,0x0,invalid,hidden,layout=java.awt.BorderLayout,alignmentX=null,alignmentY=null,bord
er=,flags=256,maximumSize=,minimumSize=,preferredSize=]
  comp bounds: java.awt.Rectangle[x=0,y=0,width=0,height=0]
ShowComponent: org.netbeans.core.NbSheet[No
Properties,0,0,0x0,invalid,hidden,layout=j
ava.awt.BorderLayout,alignmentX=null,alignmentY=null,border=,flags=256,maximumSize=,mi
nimumSize=,preferredSize=]
  comp bounds: java.awt.Rectangle[x=0,y=0,width=0,height=0]
ShowComponent:
org.netbeans.core.execution.ExecutionViewAction$ExecutionView[Execution
,0,0,0x0,invalid,hidden,layout=java.awt.BorderLayout,alignmentX=null,alignmentY=null,b
order=,flags=256,maximumSize=,minimumSize=,preferredSize=]
  comp bounds: java.awt.Rectangle[x=0,y=0,width=0,height=0]
ShowComponent:
  comp bounds: java.awt.Rectangle[x=0,y=0,width=0,height=0]
ShowComponent:
org.netbeans.modules.java.JavaEditor$JavaEditorComponent[WindowsScrolla
bleTabsUI,0,0,805x676,invalid,hidden,layout=java.awt.BorderLayout,alignmentX=null,alig
nmentY=null,border=,flags=256,maximumSize=,minimumSize=,preferredSize=]
  comp bounds: java.awt.Rectangle[x=0,y=0,width=805,height=676]
ShowComponent:
org.netbeans.modules.java.JavaEditor$JavaEditorComponent[WindowsScrolla
bleTabsUI,0,0,805x676,layout=java.awt.BorderLayout,alignmentX=null,alignmentY=null,bor
der=,flags=256,maximumSize=,minimumSize=,preferredSize=]
  comp bounds: java.awt.Rectangle[x=0,y=0,width=805,height=676]
Comment 5 _ tboudreau 2003-10-26 19:56:06 UTC
FYI, what is broken in StackLayout is that layoutContainer keeps
getting called with visibleComponent set to null.

The meta-question is why simply typing in the editor should trigger a
call to layoutContainer.
Comment 6 Marian Mirilovic 2004-02-25 16:00:59 UTC
verified