Module com.googlecode.lanterna
Package com.googlecode.lanterna.gui2
Interface WindowDecorationRenderer
-
- All Known Implementing Classes:
DefaultWindowDecorationRenderer
,EmptyWindowDecorationRenderer
,FatWindowDecorationRenderer
public interface WindowDecorationRenderer
Interface that defines a class that draws window decorations, i.e. a surrounding layer around the window that usually looks like a border to make it easier for a user to visually separate the windows.- See Also:
DefaultWindowDecorationRenderer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TextGUIGraphics
draw(WindowBasedTextGUI textGUI, TextGUIGraphics graphics, Window window)
Draws the window decorations for a particular window and returns a new TextGraphics that is locked to the area inside of the window decorations where the content of the window should be drawnTerminalSize
getDecoratedSize(Window window, TerminalSize contentAreaSize)
Retrieves the full size of the window, including all window decorations, given all components inside the window.TerminalPosition
getOffset(Window window)
Returns how much to step right and down from the top left position of the window decorations to the top left position of the actual windowdefault TerminalRectangle
getTitleBarRectangle(Window window)
-
-
-
Method Detail
-
draw
TextGUIGraphics draw(WindowBasedTextGUI textGUI, TextGUIGraphics graphics, Window window)
Draws the window decorations for a particular window and returns a new TextGraphics that is locked to the area inside of the window decorations where the content of the window should be drawn- Parameters:
textGUI
- Which TextGUI is callinggraphics
- Graphics to use for drawingwindow
- Window to draw- Returns:
- A new TextGraphics that is limited to the area inside the decorations just drawn
-
getDecoratedSize
TerminalSize getDecoratedSize(Window window, TerminalSize contentAreaSize)
Retrieves the full size of the window, including all window decorations, given all components inside the window.- Parameters:
window
- Window to calculate size forcontentAreaSize
- Size of the content area in the window- Returns:
- Full size of the window, including decorations
-
getOffset
TerminalPosition getOffset(Window window)
Returns how much to step right and down from the top left position of the window decorations to the top left position of the actual window- Parameters:
window
- Window to get the offset for- Returns:
- Position of the top left corner of the window, relative to the top left corner of the window decoration
-
getTitleBarRectangle
default TerminalRectangle getTitleBarRectangle(Window window)
-
-