Skip to content

Commit 7e0a14e

Browse files
committed
added hasTab and repaint()
1 parent bfe475c commit 7e0a14e

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Tutorial-o-Matic/src/main/groovy/TabPane.groovy

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import org.freeplane.core.util.MenuUtils as menuUtils
66
class TabPane{
77
def static tabPane = ui.freeplaneTabbedPanel
88

9+
910
def static removeTab(String tabName){
1011
def index = tabPane.indexOfTab(tabName)
1112
//eliminar
@@ -32,5 +33,22 @@ class TabPane{
3233
tabPane.addTab(tabName, componente)
3334
}
3435

36+
def static hasTab(String tabName){
37+
def index = tabPane.indexOfTab(tabName)
38+
return ( index >= 0 )
39+
}
40+
41+
def static getTab(String tabName){
42+
def index = tabPane.indexOfTab(tabName)
43+
if (index>=0) {
44+
return tabPane.getComponentAt(index)
45+
} else {
46+
return null
47+
}
48+
}
3549

50+
def static repaint(){
51+
tabPane.repaint()
52+
}
53+
3654
}

0 commit comments

Comments
 (0)