Class Button.FlatButtonRenderer
java.lang.Object
com.googlecode.lanterna.gui2.Button.FlatButtonRenderer
- All Implemented Interfaces:
Button.ButtonRenderer, ComponentRenderer<Button>, InteractableRenderer<Button>
- Enclosing class:
Button
Alternative button renderer that displays buttons with just the label and minimal decoration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawComponent(TextGUIGraphics graphics, Button button) Using the supplied graphics object, draws the component passed in.getCursorLocation(Button component) getPreferredSize(Button component) Given the supplied component, how large does this renderer want the component to be? Notice that this is the responsibility of the renderer and not the component itself, since the component has no idea what its visual representation looks like.
-
Constructor Details
-
FlatButtonRenderer
public FlatButtonRenderer()
-
-
Method Details
-
getCursorLocation
- Specified by:
getCursorLocationin interfaceInteractableRenderer<Button>
-
getPreferredSize
Description copied from interface:ComponentRendererGiven the supplied component, how large does this renderer want the component to be? Notice that this is the responsibility of the renderer and not the component itself, since the component has no idea what its visual representation looks like.- Specified by:
getPreferredSizein interfaceComponentRenderer<Button>- Parameters:
component- Component to calculate the preferred size of- Returns:
- The size this renderer would like the component to take up
-
drawComponent
Description copied from interface:ComponentRendererUsing the supplied graphics object, draws the component passed in.- Specified by:
drawComponentin interfaceComponentRenderer<Button>- Parameters:
graphics- Graphics object to use for drawingbutton- Component to draw
-