public class Ledger_Neptune extends java.lang.Object implements IInteractionElement, IContainingElement
Modifier and Type | Field and Description |
---|---|
static int |
CLOSED_HEIGHT |
static int |
CLOSED_WIDTH |
protected java.util.List<IGuiElement> |
closedElements |
int |
colour |
protected double |
currentHeight |
protected double |
currentWidth |
boolean |
expandPositive |
BuildCraftGui |
gui |
protected double |
interpHeight |
protected double |
interpWidth |
protected double |
lastHeight |
protected double |
lastWidth |
static int |
LEDGER_CHANGE_DIFF |
static int |
LEDGER_GAP |
protected double |
maxHeight |
protected double |
maxWidth |
protected java.util.List<IGuiElement> |
openElements |
protected IGuiPosition |
positionAppending |
IGuiPosition |
positionLedgerIconStart |
IGuiPosition |
positionLedgerInnerStart |
IGuiPosition |
positionLedgerStart |
static ISprite |
SPRITE_EXP_NEG |
static ISprite |
SPRITE_EXP_POS |
static SpriteNineSliced |
SPRITE_SPLIT_NEG |
static SpriteNineSliced |
SPRITE_SPLIT_POS |
protected java.lang.String |
title |
Constructor and Description |
---|
Ledger_Neptune(BuildCraftGui gui,
int colour,
boolean expandPositive) |
Modifier and Type | Method and Description |
---|---|
void |
addHelpElements(java.util.List<ElementHelpInfo.HelpPosition> elements) |
void |
addToolTips(java.util.List<ToolTip> tooltips)
Called to add tooltips to the list of existing tool tips.
|
protected <T extends IGuiElement> |
append(T element) |
protected GuiElementText |
appendText(java.lang.String text,
int colour) |
protected GuiElementText |
appendText(java.util.function.Supplier<java.lang.String> text,
int colour) |
protected GuiElementText |
appendText(java.util.function.Supplier<java.lang.String> text,
java.util.function.IntSupplier colour) |
void |
calculateMaxSize()
The default implementation only works if all the elements are based around
positionLedgerStart |
void |
calculateSizes()
Called after
IContainingElement.getChildElements() is added to, possibly last (so it might not be called after every
addition). |
void |
drawBackground(float partialTicks) |
void |
drawForeground(float partialTicks) |
protected void |
drawIcon(double x,
double y) |
IGuiPosition |
getChildElementPosition() |
java.util.List<IGuiElement> |
getChildElements() |
java.util.List<IGuiElement> |
getClosedElements() |
GuiRectangle |
getEnclosingRectangle()
Deprecated.
|
double |
getHeight() |
java.lang.String |
getTitle() |
int |
getTitleColour() |
double |
getWidth() |
double |
getX() |
double |
getY() |
void |
onMouseClicked(int button)
This is called EVEN IF the mouse is not inside your width and height!
|
void |
onMouseDragged(int button,
long ticksSinceClick)
This is called EVEN IF the mouse is not inside your width and height!
|
void |
onMouseReleased(int button)
This is called EVEN IF the mouse is not inside your width and height!
|
void |
setOpenProperty(IVariableNode.IVariableNodeBoolean prop) |
void |
setTitle(java.lang.String title) |
boolean |
shouldDrawOpen() |
void |
tick() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getThisAndChildrenAt, onKeyPress
getDebugInfo
asImmutable, contains, contains, contains, create, create, create, expand, expand, expand, expand, getCenter, getCenterTop, getCenterX, getCenterY, getEnd, getEndX, getEndY, getPosition, offset, offset, offset, offset, offset, offsetToOrigin, rectangleToString, resize, resize
public static final ISprite SPRITE_EXP_NEG
public static final ISprite SPRITE_EXP_POS
public static final SpriteNineSliced SPRITE_SPLIT_NEG
public static final SpriteNineSliced SPRITE_SPLIT_POS
public static final int LEDGER_CHANGE_DIFF
public static final int LEDGER_GAP
public static final int CLOSED_WIDTH
public static final int CLOSED_HEIGHT
public final BuildCraftGui gui
public final int colour
public final boolean expandPositive
public final IGuiPosition positionLedgerStart
public final IGuiPosition positionLedgerIconStart
public final IGuiPosition positionLedgerInnerStart
protected double maxWidth
protected double maxHeight
protected double currentWidth
protected double currentHeight
protected double lastWidth
protected double lastHeight
protected double interpWidth
protected double interpHeight
protected final java.util.List<IGuiElement> closedElements
protected final java.util.List<IGuiElement> openElements
protected IGuiPosition positionAppending
protected java.lang.String title
public Ledger_Neptune(BuildCraftGui gui, int colour, boolean expandPositive)
protected GuiElementText appendText(java.lang.String text, int colour)
protected GuiElementText appendText(java.util.function.Supplier<java.lang.String> text, int colour)
protected GuiElementText appendText(java.util.function.Supplier<java.lang.String> text, java.util.function.IntSupplier colour)
protected <T extends IGuiElement> T append(T element)
public void setTitle(java.lang.String title)
public void setOpenProperty(IVariableNode.IVariableNodeBoolean prop)
public void calculateSizes()
IContainingElement
IContainingElement.getChildElements()
is added to, possibly last (so it might not be called after every
addition).calculateSizes
in interface IContainingElement
public void calculateMaxSize()
positionLedgerStart
public void tick()
tick
in interface IGuiElement
@Deprecated public GuiRectangle getEnclosingRectangle()
public final boolean shouldDrawOpen()
public java.util.List<IGuiElement> getChildElements()
getChildElements
in interface IContainingElement
public IGuiPosition getChildElementPosition()
getChildElementPosition
in interface IContainingElement
public java.util.List<IGuiElement> getClosedElements()
public void drawBackground(float partialTicks)
drawBackground
in interface IGuiElement
public void drawForeground(float partialTicks)
drawForeground
in interface IGuiElement
public void onMouseClicked(int button)
IInteractionElement
onMouseClicked
in interface IContainingElement
onMouseClicked
in interface IInteractionElement
public void onMouseDragged(int button, long ticksSinceClick)
IInteractionElement
onMouseDragged
in interface IContainingElement
onMouseDragged
in interface IInteractionElement
public void onMouseReleased(int button)
IInteractionElement
onMouseReleased
in interface IContainingElement
onMouseReleased
in interface IInteractionElement
protected void drawIcon(double x, double y)
public double getX()
getX
in interface IGuiPosition
public double getY()
getY
in interface IGuiPosition
public java.lang.String getTitle()
public int getTitleColour()
public void addToolTips(java.util.List<ToolTip> tooltips)
IGuiElement
This is called EVEN IF the mouse is not inside your width and height!
addToolTips
in interface IContainingElement
addToolTips
in interface IGuiElement
addToolTips
in interface ITooltipElement
public void addHelpElements(java.util.List<ElementHelpInfo.HelpPosition> elements)
addHelpElements
in interface IContainingElement
addHelpElements
in interface IGuiElement
addHelpElements
in interface IHelpElement