24 lines
628 B
Python
24 lines
628 B
Python
import ch.psi.utils.swing.Terminal as Terminal
|
|
import ch.psi.utils.swing.SwingUtils as SwingUtils
|
|
terminal=None
|
|
view=App.getInstance().getMainFrame()
|
|
tabStatus=view.getStatusTab()
|
|
|
|
def showTerminal():
|
|
global terminal
|
|
terminal = Terminal(".", 13)
|
|
tabStatus.addTab("T", terminal)
|
|
index = tabStatus.getTabCount() - 1
|
|
SwingUtils.setTabClosable(tabStatus, index)
|
|
tabStatus.setSelectedComponent(terminal)
|
|
|
|
def hideTerminal():
|
|
global terminal
|
|
if terminal is not None:
|
|
tabStatus.remove(terminal)
|
|
terminal = None
|
|
|
|
for i in range (100):
|
|
showTerminal()
|
|
hideTerminal()
|
|
|