usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/TabbedControl.java
equal
deleted
inserted
replaced
104 // |
104 // |
105 // Control methods |
105 // Control methods |
106 // |
106 // |
107 |
107 |
108 @Override |
108 @Override |
|
109 public void childStarted(Control child) { |
|
110 super.childStarted(child); |
|
111 |
|
112 int index = children.indexOf(child); |
|
113 if (index != -1) { |
|
114 // Set viewable tab directly without going through the Navigator |
|
115 tabSelModel.setSelectedIndexDirectly(index); |
|
116 } |
|
117 } |
|
118 |
|
119 @Override |
109 public Navigable[] getForwardingPath() { |
120 public Navigable[] getForwardingPath() { |
110 ensureChildrenCreated(); |
121 ensureChildrenCreated(); |
111 |
122 |
112 if (children.size() > 0) { |
123 if (children.size() > 0) { |
113 // Automatically view first tab |
124 // Automatically view first tab |
114 return new Navigable[] {children.get(0)}; |
125 return new Navigable[] {children.get(0)}; |
115 } |
126 } |
116 |
127 |
117 return null; |
128 return null; |
118 } |
|
119 |
|
120 // |
|
121 // DefaultControl methods |
|
122 // |
|
123 |
|
124 @Override |
|
125 public void childStarted(Control child) { |
|
126 super.childStarted(child); |
|
127 |
|
128 int index = children.indexOf(child); |
|
129 if (index != -1) { |
|
130 // Set viewable tab directly without going through the Navigator |
|
131 tabSelModel.setSelectedIndexDirectly(index); |
|
132 } |
|
133 } |
129 } |
134 |
130 |
135 // |
131 // |
136 // SwingControl methods |
132 // SwingControl methods |
137 // |
133 // |