Class NodePrefab
java.lang.Object
dev.prozilla.pine.core.entity.prefab.Prefab
dev.prozilla.pine.core.entity.prefab.ui.NodePrefab
- Direct Known Subclasses:
FramePrefab,ImagePrefab,LayoutPrefab,TextPrefab
Prefab for UI elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected GridAlignmentbooleanprotected Colorprotected Dimensionprotected Colorprotected TextureBaseprotected Vector4fprotected booleanprotected Colorprotected Stringprotected DualDimensionprotected DualDimensionprotected booleanprotected DualDimensionprotected StyleSheetintprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a class to this node.voidaddClasses(String... classNames) Adds multiple classes to this node.protected voidAdds this prefab's predefined components to a given entity and copies values from this prefab.voidsetAbsolutePosition(boolean absolutePosition) IfabsolutePositionis true, this node will not be affected by layout nodes.voidsetAnchor(GridAlignment anchor) Sets the anchor point of this node.voidsetAutoFocus(boolean autoFocus) voidsetBackgroundColor(VariableProperty<Color> color) Sets the background color of this node.voidsetBackgroundColor(Color color) Sets the background color of this node.voidvoidsetBorderColor(Color color) voidsetBorderImage(TextureBase borderImage, Vector4f slice, boolean fill) voidsetBorderImage(String borderImagePath, Vector4f slice, boolean fill) voidsetColor(VariableProperty<Color> color) Sets the foreground color of this node.voidSets the foreground color of this node.protected <T> voidsetDefaultPropertyValue(StyledPropertyKey<T> propertyName, AdaptiveProperty<T> value) voidsetHTMLTag(String htmlTag) voidvoidsetMargin(DualDimension margin) voidsetMargin(VariableProperty<DualDimension> margin) voidSets the padding around the content of this node.voidsetPadding(DualDimension padding) Sets the padding around the content of this node.voidsetPadding(VariableProperty<DualDimension> padding) Sets the padding around the content of this node.voidsetPassThrough(boolean passThrough) IfpassThroughis true, the cursor will not interact with this node.voidSets the size of this node.voidsetSize(DualDimension size) Sets the size of this node.voidsetSize(VariableProperty<DualDimension> size) Sets the size of this node.voidsetStyleSheet(StyleSheet styleSheet) Sets the style sheet that is applied to this node.voidsetStyleSheet(String filePath) Sets the style sheet that is applied to this node by loading it from a CSS file.voidsetTabIndex(int tabIndex) voidsetTooltipText(String tooltipText) Sets the text that appears in a tooltip when the cursor hovers over this node.Methods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
addChild, addChildren, addChildren, instantiate, instantiate, removeChild, setActive, setName, setTag
-
Field Details
-
size
-
padding
-
margin
-
border
-
borderImage
-
borderImageSlice
-
borderImageSliceFill
protected boolean borderImageSliceFill -
color
-
backgroundColor
-
borderColor
-
anchor
-
absolutePosition
protected boolean absolutePosition -
passThrough
protected boolean passThrough -
tooltipText
-
tabIndex
public int tabIndex -
autoFocus
public boolean autoFocus -
htmlTag
-
classes
-
styleSheet
-
-
Constructor Details
-
NodePrefab
public NodePrefab()
-
-
Method Details
-
setStyleSheet
Sets the style sheet that is applied to this node by loading it from a CSS file. -
setStyleSheet
Sets the style sheet that is applied to this node. -
setSize
Sets the size of this node. -
setSize
Sets the size of this node. -
setSize
Sets the size of this node. -
setPadding
Sets the padding around the content of this node. -
setPadding
Sets the padding around the content of this node. -
setPadding
Sets the padding around the content of this node. -
setMargin
-
setMargin
-
setMargin
-
setColor
Sets the foreground color of this node. -
setColor
Sets the foreground color of this node. -
setBackgroundColor
Sets the background color of this node. -
setBackgroundColor
Sets the background color of this node. -
setBorderColor
-
setAnchor
Sets the anchor point of this node. -
setAbsolutePosition
public void setAbsolutePosition(boolean absolutePosition) IfabsolutePositionis true, this node will not be affected by layout nodes. -
setPassThrough
public void setPassThrough(boolean passThrough) IfpassThroughis true, the cursor will not interact with this node. -
setTooltipText
Sets the text that appears in a tooltip when the cursor hovers over this node. -
setBorder
-
setBorderImage
-
setBorderImage
-
addClasses
Adds multiple classes to this node. -
addClass
Adds a class to this node. -
setTabIndex
public void setTabIndex(int tabIndex) -
setAutoFocus
public void setAutoFocus(boolean autoFocus) -
setHTMLTag
-
setDefaultPropertyValue
protected <T> void setDefaultPropertyValue(StyledPropertyKey<T> propertyName, AdaptiveProperty<T> value) -
apply
Description copied from class:PrefabAdds this prefab's predefined components to a given entity and copies values from this prefab.
-