public abstract class TComponent
extends java.lang.Object
Constructor and Description |
---|
TComponent(TVector size)
Instantiates a new Terminal component.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
deselect(TDisplayDrawer drawer,
TerminalScreen screen) |
abstract void |
draw(TDisplayDrawer drawer,
TerminalScreen screen) |
TVector |
getAbsoluteSize()
Gets absolute size.
|
BackgroundColor |
getBackgroundColor()
Gets background color.
|
TerminalScreen |
getCurrentDisplayingScreen()
Gets current displaying screen.
|
ForegroundColor |
getForegroundColor()
Gets foreground color.
|
TVector |
getMaximumSize()
Gets maximum size.
|
TVector |
getMinimumSize()
Gets minimum size.
|
TVector |
getSize()
Gets size.
|
boolean |
isDisplaying()
Is displaying boolean.
|
boolean |
isNoOutScreenMoving()
Is no out screen moving boolean.
|
boolean |
isPositionFixed()
Is position fixed.
|
boolean |
isSelectable()
Is selectable boolean.
|
boolean |
isSizeFixed()
Is size fixed boolean.
|
abstract boolean |
isStretchable()
Is stretchable boolean.
|
abstract void |
keyInput(TDisplayDrawer drawer,
TerminalScreen screen,
KeyInput keyInput,
Cancellable outKeyInputCancelling) |
void |
onResize(TDisplayDrawer drawer,
TerminalScreen screen,
TVector newSize,
TVector newPosition) |
abstract void |
select(TDisplayDrawer drawer,
TerminalScreen screen) |
void |
setAbsoluteSize(TVector aSize)
Deprecated.
|
void |
setBackgroundColor(BackgroundColor backgroundColor)
Sets background color.
|
void |
setDisplayingScreen(TerminalScreen screen)
Deprecated.
This function is only used in the screen
|
void |
setForegroundColor(ForegroundColor foregroundColor)
Sets foreground color.
|
void |
setMaximumSize(TVector maximumSize)
Sets maximum size.
|
void |
setMinimumSize(TVector minimumSize)
Sets minimum size.
|
void |
setNoOutScreenMoving(boolean noOutScreenMoving)
Sets no out screen moving.
|
void |
setPositionFixed(boolean fixedPosition)
Sets position fixed.
|
void |
setSelectable(boolean selectable)
Sets selectable.
|
protected void |
setSize(TVector s)
Sets size.
|
void |
setSizeFixed(boolean fixedSize)
Sets size fixed.
|
public TComponent(TVector size)
size
- the size of componentpublic TVector getMaximumSize()
public TVector getMinimumSize()
public void setMaximumSize(TVector maximumSize)
maximumSize
- the maximum sizepublic void setMinimumSize(TVector minimumSize)
minimumSize
- the minimum sizepublic void setNoOutScreenMoving(boolean noOutScreenMoving)
noOutScreenMoving
- the no out screen movingpublic boolean isNoOutScreenMoving()
public boolean isPositionFixed()
public boolean isSizeFixed()
public void setPositionFixed(boolean fixedPosition)
fixedPosition
- the fixed positionpublic void setSizeFixed(boolean fixedSize)
fixedSize
- the fixed sizepublic void setSelectable(boolean selectable)
selectable
- the selectablepublic boolean isSelectable()
public ForegroundColor getForegroundColor()
public BackgroundColor getBackgroundColor()
public void setForegroundColor(ForegroundColor foregroundColor)
foregroundColor
- the foreground colorpublic void setBackgroundColor(BackgroundColor backgroundColor)
backgroundColor
- the background colorpublic TVector getAbsoluteSize()
@Deprecated public void setAbsoluteSize(TVector aSize)
aSize
- the a sizepublic TVector getSize()
protected void setSize(TVector s)
s
- the spublic abstract void draw(TDisplayDrawer drawer, TerminalScreen screen)
drawer
- the drawerscreen
- the screenpublic abstract void select(TDisplayDrawer drawer, TerminalScreen screen)
drawer
- the drawerscreen
- the screenpublic abstract void deselect(TDisplayDrawer drawer, TerminalScreen screen)
drawer
- the drawerscreen
- the screenpublic abstract void keyInput(TDisplayDrawer drawer, TerminalScreen screen, KeyInput keyInput, Cancellable outKeyInputCancelling)
drawer
- the drawerscreen
- the screenkeyInput
- the key inputoutKeyInputCancelling
- the out key input cancellingpublic TerminalScreen getCurrentDisplayingScreen()
@Deprecated public void setDisplayingScreen(TerminalScreen screen)
screen
- the screenpublic void onResize(TDisplayDrawer drawer, TerminalScreen screen, TVector newSize, TVector newPosition)
drawer
- the drawerscreen
- the screennewSize
- the new sizenewPosition
- the new positionpublic abstract boolean isStretchable()
public boolean isDisplaying()