浏览代码

Fixed #8653: addTab(index) should not throw if index is out of bounds

svn changeset:23503/svn branch:6.8
tags/7.0.0.alpha2
Johannes Dahlström 12 年前
父节点
当前提交
780c5d6be0
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6
    5
      src/com/vaadin/ui/TabSheet.java

+ 6
- 5
src/com/vaadin/ui/TabSheet.java 查看文件

@@ -569,14 +569,15 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
*
* @param position
* the position of the tab
* @return
* @return The tab in the given position, or null if the position is out of
* bounds.
*/
public Tab getTab(int position) {
Component c = components.get(position);
if (c != null) {
return tabs.get(c);
if (position >= 0 && position < getComponentCount()) {
return getTab(components.get(position));
} else {
return null;
}
return null;
}

/**

正在加载...
取消
保存