Class AbstractBorder
- All Implemented Interfaces:
Border, Component, Composite, Container, TextGUIElement
- Direct Known Subclasses:
Borders.StandardBorder
Abstract implementation of
Border interface that has some of the methods filled out. If you want to create
your own Border implementation, should should probably extend from this.-
Nested Class Summary
Nested classes/interfaces inherited from interface Border
Border.BorderRenderer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the layout data associated with this component.Returns the renderer used to draw this component and measure its preferred size.private TerminalSizegetWrappedComponentSize(TerminalSize borderSize) private TerminalPositionvoidsetComponent(Component component) Sets the component which is inside this Composite.Sets optional layout data associated with this component.setSize(TerminalSize size) This method will be called by the layout manager when it has decided how large the component will be.toBasePane(TerminalPosition position) Translates a position local to the container to the base pane's coordinate space.toGlobal(TerminalPosition position) Translates a position local to the container to global coordinate space.Methods inherited from class AbstractComposite
containsComponent, getChildCount, getChildren, getChildrenList, getComponent, handleInput, invalidate, isInvalid, nextFocus, previousFocus, removeComponent, updateLookupMapMethods inherited from class AbstractComponent
addTo, calculatePreferredSize, createDefaultRenderer, draw, getBasePane, getGlobalPosition, getParent, getPosition, getPreferredSize, getSize, getTextGUI, getTheme, getThemeDefinition, hasParent, isInside, isVisible, onAdded, onAfterDrawing, onBeforeDrawing, onRemoved, runOnGUIThreadIfExistsOtherwiseRunDirect, self, setPosition, setPreferredSize, setRenderer, setTheme, setVisible, withBorderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
addTo, getBasePane, getGlobalPosition, getParent, getPosition, getPreferredSize, getSize, getTextGUI, getTheme, getThemeDefinition, hasParent, invalidate, isInside, isVisible, onAdded, onRemoved, setPosition, setPreferredSize, setTheme, setVisible, withBorderMethods inherited from interface Composite
getComponentMethods inherited from interface Container
containsComponent, getChildCount, getChildren, getChildrenList, handleInput, nextFocus, previousFocus, removeComponent, updateLookupMapMethods inherited from interface TextGUIElement
draw, isInvalid
-
Constructor Details
-
AbstractBorder
public AbstractBorder()
-
-
Method Details
-
setComponent
Description copied from interface:CompositeSets the component which is inside this Composite. If you call this method with null, it removes the component wrapped by this Composite.- Specified by:
setComponentin interfaceComposite- Overrides:
setComponentin classAbstractComposite<Border>- Parameters:
component- Component to wrap
-
getRenderer
Description copied from interface:ComponentReturns the renderer used to draw this component and measure its preferred size. You probably won't need to call this method unless you know exactly which ComponentRenderer implementation is used and you need to customize it.- Specified by:
getRendererin interfaceComponent- Overrides:
getRendererin classAbstractComponent<Border>- Returns:
- Renderer this component is using
-
setSize
Description copied from interface:ComponentThis method will be called by the layout manager when it has decided how large the component will be. If you call this method yourself, prepare for unexpected results.- Specified by:
setSizein interfaceComponent- Overrides:
setSizein classAbstractComponent<Border>- Parameters:
size- Current size of the component- Returns:
- Itself
-
getLayoutData
Description copied from interface:ComponentReturns the layout data associated with this component. This data will optionally be used by the layout manager, see the documentation for each layout manager for more details on valid values and their meaning.- Specified by:
getLayoutDatain interfaceComponent- Overrides:
getLayoutDatain classAbstractComponent<Border>- Returns:
- This component's layout data
-
setLayoutData
Description copied from interface:ComponentSets optional layout data associated with this component. This meaning of this data is up to the layout manager to figure out, see each layout manager for examples of how to use it.- Specified by:
setLayoutDatain interfaceComponent- Overrides:
setLayoutDatain classAbstractComponent<Border>- Parameters:
ld- Layout data associated with this component- Returns:
- Itself
-
toBasePane
Description copied from interface:ComponentTranslates a position local to the container to the base pane's coordinate space. For a window-based GUI, this be a coordinate in the window's coordinate space. If the component belongs to no base pane, it will returnnull.- Specified by:
toBasePanein interfaceComponent- Overrides:
toBasePanein classAbstractComponent<Border>- Parameters:
position- Position to translate (relative to the container's top-left corner)- Returns:
- Position in base pane space, or
nullif the component is an orphan
-
toGlobal
Description copied from interface:ComponentTranslates a position local to the container to global coordinate space. This should be the absolute coordinate in the terminal screen, taking no windows or containers into account. If the component belongs to no base pane, it will returnnull.- Specified by:
toGlobalin interfaceComponent- Overrides:
toGlobalin classAbstractComponent<Border>- Parameters:
position- Position to translate (relative to the container's top-left corner)- Returns:
- Position in global (or absolute) coordinates, or
nullif the component is an orphan
-
getWrappedComponentTopLeftOffset
-
getWrappedComponentSize
-