Class TSeparatorElement
java.lang.Object
com.thecsdev.common.scene.Node<TElement>
com.thecsdev.commonmc.api.client.gui.TElement
com.thecsdev.commonmc.api.client.gui.misc.TSeparatorElement
- All Implemented Interfaces:
INode<TElement>, INodeBounded<TElement,Bounds2i>, INodeRenderable<TElement, TGuiGraphics>, Iterable<TElement>, Collection<TElement>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe direction in whichTSeparatorElementwill draw its line. -
Field Summary
Fields inherited from class TElement
eInitialized -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal IntegerPropertyThe color of the separator line, in ARGB format.The direction in whichTSeparatorElementwill draw its line.static final @NotNull TSeparatorElementinit(@NotNull TPanelElement target, int size, @NotNull TSeparatorElement.Direction direction, int thickness, int color) Creates and initializes aTSeparatorElementelement and then adds it to a givenTPanelElementand returns it.static final @NotNull TSeparatorElementinitH(@NotNull TPanelElement target, int size, int thickness, int color) Same as#init, but withTSeparatorElement.Direction.HORIZONTAL.static final @NotNull TSeparatorElementinitV(@NotNull TPanelElement target, int size, int thickness, int color) Same as#init, but withTSeparatorElement.Direction.VERTICAL.voidrenderCallback(@NotNull TGuiGraphics pencil) Callback method that is invoked when thisNodeis being rendered.final IntegerPropertyThe thickness of the separator line, inScreen-space units.Methods inherited from class TElement
addRel, boundsProperty, clearAndInit, clipsDescendantsProperty, contextMenuProperty, dragEndCallback, dragStartCallback, findElementAt, focusableProperty, focusGainedCallback, focusLostCallback, forEachVisible, getBaseType, getBounds, getClient, getContentBounds, getCursor, getSelf, getTooltip, hoverableProperty, hoverGainedCallback, hoverLostCallback, initCallback, inputCallback, invalidateTooltipCache, isFocusable, isFocused, isHoverable, isHovered, isHoveredOrFocused, isVisible, move, moveChildren, moveTo, postRenderCallback, removeRel, screenProperty, setBounds, setBounds, setBounds, showContextMenu, tickCallback, tooltipProperty, toString, visiblePropertyMethods inherited from class Node
add, addAll, childAddedCallback, childRemovedCallback, clear, contains, containsAll, equals, findChild, findParent, findSibling, forEach, get, getFirst, getLast, getParent, hashCode, indexOf, isEmpty, iterator, parentProperty, remove, remove, remove, removeAll, retainAll, rootProperty, size, toArray, toArray
-
Constructor Details
-
TSeparatorElement
public TSeparatorElement()
-
-
Method Details
-
thicknessProperty
The thickness of the separator line, inScreen-space units. -
directionProperty
The direction in whichTSeparatorElementwill draw its line. -
colorProperty
The color of the separator line, in ARGB format. -
renderCallback
Description copied from interface:INodeRenderableCallback method that is invoked when thisNodeis being rendered.- Specified by:
renderCallbackin interfaceINodeRenderable<TElement, TGuiGraphics>- Overrides:
renderCallbackin classTElement- Parameters:
pencil- The rendering context.
-
init
@NotNull public static final @NotNull TSeparatorElement init(@NotNull @NotNull TPanelElement target, int size, @NotNull @NotNull TSeparatorElement.Direction direction, int thickness, int color) throws NullPointerException Creates and initializes aTSeparatorElementelement and then adds it to a givenTPanelElementand returns it.- Parameters:
target- TheTPanelElementto which the newTSeparatorElementwill be added.size- The width or height of the separator, depending on direction.direction- The direction in which the separator will be drawn.thickness- The thickness of the separator line, inScreen-space units.color- The color of the separator line, in ARGB format.- Returns:
- The created and initialized
TSeparatorElement. - Throws:
NullPointerException- If aNotNullargument isnull.
-
initH
@NotNull public static final @NotNull TSeparatorElement initH(@NotNull @NotNull TPanelElement target, int size, int thickness, int color) throws NullPointerException Same as#init, but withTSeparatorElement.Direction.HORIZONTAL.- Parameters:
target- TheTPanelElementto which the newTSeparatorElementwill be added.size- The width or height of the separator, depending on direction.thickness- The thickness of the separator line, inScreen-space units.color- The color of the separator line, in ARGB format.- Returns:
- The created and initialized
TSeparatorElement. - Throws:
NullPointerException- If aNotNullargument isnull.- See Also:
-
initV
@NotNull public static final @NotNull TSeparatorElement initV(@NotNull @NotNull TPanelElement target, int size, int thickness, int color) throws NullPointerException Same as#init, but withTSeparatorElement.Direction.VERTICAL.- Parameters:
target- TheTPanelElementto which the newTSeparatorElementwill be added.size- The width or height of the separator, depending on direction.thickness- The thickness of the separator line, inScreen-space units.color- The color of the separator line, in ARGB format.- Returns:
- The created and initialized
TSeparatorElement. - Throws:
NullPointerException- If aNotNullargument isnull.- See Also:
-