Package xyz.gmitch215.socketmc.screen
Interface Positionable
- All Superinterfaces:
 LayoutElement,Serializable
- All Known Implementing Classes:
 AbstractButton,AbstractTextWidget,AbstractWidget,CheckboxButton,CustomButton,CustomWidget,CycleButton,EditTextWidget,FocusedTextWidget,ImageButton,ImageWidget,LockButton,SendInstructionButton,TextButton,TextWidget
Represents an object that can be positioned and rendered on the screen.
- 
Method Summary
Modifier and TypeMethodDescriptionvoidClears all listeners from this widget.Gets an immutable copy of the listeners for this widget.Gets the tooltip for this widget.default booleaninSamePosition(@NotNull Positionable other) Checks if this object is in the same position as another object.voidonClick(@NotNull SerializableConsumer<Positionable> listener) Adds an on-click listener to this widget.voidsetTooltip(@Nullable Tooltip tooltip) Sets the tooltip for this widget.Methods inherited from interface xyz.gmitch215.socketmc.screen.layout.LayoutElement
getHeight, getWidth, getX, getY, setHeight, setPosition, setSize, setSize, setSize, setWidth, setX, setY, visitWidgets 
- 
Method Details
- 
getTooltip
Gets the tooltip for this widget.- Returns:
 - Widget Tooltip
 
 - 
setTooltip
Sets the tooltip for this widget.- Parameters:
 tooltip- Widget Tooltip
 - 
inSamePosition
Checks if this object is in the same position as another object.- Parameters:
 other- the other object- Returns:
 - true if the objects are in the same position
 
 - 
onClick
Adds an on-click listener to this widget.- Parameters:
 listener- the listener- See Also:
 
 - 
clearListeners
void clearListeners()Clears all listeners from this widget. - 
getListeners
Gets an immutable copy of the listeners for this widget.- Returns:
 - the listeners
 
 
 -