Lines 81-98
Link Here
|
81 |
super.remove (aop); |
81 |
super.remove (aop); |
82 |
assert pane.getParent() != this; |
82 |
assert pane.getParent() != this; |
83 |
pane.add (aop); |
83 |
pane.add (aop); |
|
|
84 |
setTabIcon(aop, (Icon)aop.getClientProperty("ICON")); |
84 |
pane.add (c); |
85 |
pane.add (c); |
|
|
86 |
setTabIcon((AbstractOutputTab)c, (Icon)((AbstractOutputTab)c).getClientProperty("ICON")); |
85 |
|
87 |
|
86 |
super.addImpl (pane, constraints, idx); |
88 |
super.addImpl (pane, constraints, idx); |
87 |
updateSingletonName(null); |
89 |
updateSingletonName(null); |
88 |
revalidate(); |
90 |
revalidate(); |
89 |
} else if (pane.getParent() == this) { |
91 |
} else if (pane.getParent() == this) { |
90 |
pane.add (c); |
92 |
pane.add (c); |
|
|
93 |
setTabIcon((AbstractOutputTab) c, (Icon)((AbstractOutputTab)c).getClientProperty("ICON")); |
91 |
revalidate(); |
94 |
revalidate(); |
92 |
} else { |
95 |
} else { |
93 |
super.addImpl (c, constraints, idx); |
96 |
super.addImpl (c, constraints, idx); |
|
|
97 |
setTabIcon((AbstractOutputTab) c, (Icon)((AbstractOutputTab)c).getClientProperty("ICON")); |
94 |
//#48819 - a bit obscure usecase, but revalidate() is call in the if branches above as well.. |
98 |
//#48819 - a bit obscure usecase, but revalidate() is call in the if branches above as well.. |
95 |
revalidate(); |
99 |
revalidate(); |
|
|
100 |
|
96 |
} |
101 |
} |
97 |
if (hadFocus) { |
102 |
if (hadFocus) { |
98 |
//Do not call c.requestFocus() directly, it can be |
103 |
//Do not call c.requestFocus() directly, it can be |
Lines 211-216
Link Here
|
211 |
updateSingletonName(name); |
216 |
updateSingletonName(name); |
212 |
} |
217 |
} |
213 |
tab.setName(name); |
218 |
tab.setName(name); |
|
|
219 |
} |
220 |
|
221 |
public void setTabIcon(AbstractOutputTab tab, Icon icon) { |
222 |
if (icon != null) { |
223 |
tab.putClientProperty("ICON", icon); |
224 |
if (pane.indexOfComponent(tab) != -1) { |
225 |
pane.setIconAt(pane.indexOfComponent(tab), icon); |
226 |
pane.setDisabledIconAt(pane.indexOfComponent(tab), icon); |
227 |
} |
228 |
} |
214 |
} |
229 |
} |
215 |
|
230 |
|
216 |
public void requestFocus() { |
231 |
public void requestFocus() { |