public class TerminalScreen
extends java.lang.Object
Constructor and Description |
---|
TerminalScreen(TerminalApplication application)
Instantiates a new Terminal screen.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponent(TComponent c,
TVector vector)
Add component.
|
void |
addKeyListener(KeyEventHandler eventHandler)
Add key listener.
|
protected void |
close()
Close action.
|
void |
display()
Display components.
|
TerminalApplication |
getApplication()
Gets application.
|
BackgroundColor |
getBackgroundColor()
Gets background color.
|
java.util.Set<TComponent> |
getComponents()
Gets components in screen.
|
TDisplayDrawer |
getDrawer(TComponent component)
Gets drawer.
|
ForegroundColor |
getForegroundColor()
Gets foreground color.
|
TLayout |
getLayout()
Gets current layout.
|
TComponent |
getSelectedComponent()
Gets selected component.
|
boolean |
hasComponent(TComponent component)
Has component.
|
boolean |
isDisplayed()
Is displayed boolean.
|
protected void |
open()
Open screen.
|
protected void |
preClose()
Preclose action.
|
void |
removeComponent(TComponent c)
Remove component.
|
void |
removeKeyListener(KeyEventHandler eventHandler)
Remove key listener.
|
void |
selectComponent(TComponent component)
Select component.
|
void |
setBackgroundColor(BackgroundColor backgroundColor)
Sets background color.
|
void |
setForegroundColor(ForegroundColor foregroundColor)
Sets foreground color.
|
void |
setFrame(ScreenFrame frame)
Sets frame.
|
void |
setFrame(java.lang.String title)
Sets frame.
|
void |
setLayout(TLayout layout)
Sets layout.
|
void |
updateComponent(TComponent component)
Update component.
|
void |
updateDrawer(TComponent component,
TDisplayDrawer drawer)
Update drawer.
|
public TerminalScreen(TerminalApplication application)
application
- the applicationTerminalApplication.openScreen(TerminalScreen)
public void setLayout(TLayout layout)
layout
- the layoutpublic void addComponent(TComponent c, TVector vector)
c
- the componentvector
- the vectorpublic void removeComponent(TComponent c)
c
- the componentpublic void updateComponent(TComponent component)
component
- the componentpublic java.util.Set<TComponent> getComponents()
public TDisplayDrawer getDrawer(TComponent component)
component
- the componentpublic void updateDrawer(TComponent component, TDisplayDrawer drawer)
component
- the componentdrawer
- the drawerpublic TComponent getSelectedComponent()
public void display()
protected void open()
protected void preClose()
protected void close()
public TLayout getLayout()
public BackgroundColor getBackgroundColor()
public ForegroundColor getForegroundColor()
public void setBackgroundColor(BackgroundColor backgroundColor)
backgroundColor
- the background colorpublic void setForegroundColor(ForegroundColor foregroundColor)
foregroundColor
- the foreground colorpublic boolean isDisplayed()
public void addKeyListener(KeyEventHandler eventHandler)
eventHandler
- the event handlerpublic void removeKeyListener(KeyEventHandler eventHandler)
eventHandler
- the event handlerpublic void selectComponent(TComponent component)
component
- the componentpublic boolean hasComponent(TComponent component)
component
- the componentpublic void setFrame(java.lang.String title)
title
- the title with default framepublic void setFrame(ScreenFrame frame)
frame
- the customized framepublic TerminalApplication getApplication()