Record Class EditorContextImpl
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.client.impl.editor.EditorContextImpl
- All Implemented Interfaces:
EditorContext
public record EditorContextImpl(PDLButton createButton, ResearchScreen parentScreen, @Nullable PopupWidget parentPopupWidget, int widgetWidth, int widgetHeight, int innerWidth, int innerHeight, int padding)
extends Record
implements EditorContext
-
Constructor Summary
ConstructorsConstructorDescriptionEditorContextImpl(PDLButton createButton, ResearchScreen parentScreen, @Nullable PopupWidget parentPopupWidget, int widgetWidth, int widgetHeight, int innerWidth, int innerHeight, int padding) Creates an instance of aEditorContextImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreateButtonrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theinnerHeightrecord component.intReturns the value of theinnerWidthrecord component.booleanintpadding()Returns the value of thepaddingrecord component.@Nullable PopupWidgetReturns the value of theparentPopupWidgetrecord component.Returns the value of theparentScreenrecord component.voidsetCreateButtonActive(boolean active) voidsetCreateButtonTooltip(net.minecraft.client.gui.components.Tooltip tooltip) final StringtoString()Returns a string representation of this record class.intReturns the value of thewidgetHeightrecord component.intReturns the value of thewidgetWidthrecord component.
-
Constructor Details
-
EditorContextImpl
public EditorContextImpl(PDLButton createButton, ResearchScreen parentScreen, @Nullable @Nullable PopupWidget parentPopupWidget, int widgetWidth, int widgetHeight, int innerWidth, int innerHeight, int padding) Creates an instance of aEditorContextImplrecord class.- Parameters:
createButton- the value for thecreateButtonrecord componentparentScreen- the value for theparentScreenrecord componentparentPopupWidget- the value for theparentPopupWidgetrecord componentwidgetWidth- the value for thewidgetWidthrecord componentwidgetHeight- the value for thewidgetHeightrecord componentinnerWidth- the value for theinnerWidthrecord componentinnerHeight- the value for theinnerHeightrecord componentpadding- the value for thepaddingrecord component
-
-
Method Details
-
isCreateButtonActive
public boolean isCreateButtonActive()- Specified by:
isCreateButtonActivein interfaceEditorContext
-
setCreateButtonActive
public void setCreateButtonActive(boolean active) - Specified by:
setCreateButtonActivein interfaceEditorContext
-
setCreateButtonTooltip
public void setCreateButtonTooltip(net.minecraft.client.gui.components.Tooltip tooltip) - Specified by:
setCreateButtonTooltipin interfaceEditorContext
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
createButton
Returns the value of thecreateButtonrecord component.- Returns:
- the value of the
createButtonrecord component
-
parentScreen
Returns the value of theparentScreenrecord component.- Specified by:
parentScreenin interfaceEditorContext- Returns:
- the value of the
parentScreenrecord component
-
parentPopupWidget
Returns the value of theparentPopupWidgetrecord component.- Specified by:
parentPopupWidgetin interfaceEditorContext- Returns:
- the value of the
parentPopupWidgetrecord component
-
widgetWidth
public int widgetWidth()Returns the value of thewidgetWidthrecord component.- Specified by:
widgetWidthin interfaceEditorContext- Returns:
- the value of the
widgetWidthrecord component
-
widgetHeight
public int widgetHeight()Returns the value of thewidgetHeightrecord component.- Specified by:
widgetHeightin interfaceEditorContext- Returns:
- the value of the
widgetHeightrecord component
-
innerWidth
public int innerWidth()Returns the value of theinnerWidthrecord component.- Specified by:
innerWidthin interfaceEditorContext- Returns:
- the value of the
innerWidthrecord component
-
innerHeight
public int innerHeight()Returns the value of theinnerHeightrecord component.- Specified by:
innerHeightin interfaceEditorContext- Returns:
- the value of the
innerHeightrecord component
-
padding
public int padding()Returns the value of thepaddingrecord component.- Specified by:
paddingin interfaceEditorContext- Returns:
- the value of the
paddingrecord component
-