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, waitgetThisAndChildrenAt, onKeyPressgetDebugInfoasImmutable, 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, resizepublic 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()
IContainingElementIContainingElement.getChildElements() is added to, possibly last (so it might not be called after every
addition).calculateSizes in interface IContainingElementpublic void calculateMaxSize()
positionLedgerStartpublic void tick()
tick in interface IGuiElement@Deprecated public GuiRectangle getEnclosingRectangle()
public final boolean shouldDrawOpen()
public java.util.List<IGuiElement> getChildElements()
getChildElements in interface IContainingElementpublic IGuiPosition getChildElementPosition()
getChildElementPosition in interface IContainingElementpublic java.util.List<IGuiElement> getClosedElements()
public void drawBackground(float partialTicks)
drawBackground in interface IGuiElementpublic void drawForeground(float partialTicks)
drawForeground in interface IGuiElementpublic void onMouseClicked(int button)
IInteractionElementonMouseClicked in interface IContainingElementonMouseClicked in interface IInteractionElementpublic void onMouseDragged(int button,
long ticksSinceClick)
IInteractionElementonMouseDragged in interface IContainingElementonMouseDragged in interface IInteractionElementpublic void onMouseReleased(int button)
IInteractionElementonMouseReleased in interface IContainingElementonMouseReleased in interface IInteractionElementprotected void drawIcon(double x,
double y)
public double getX()
getX in interface IGuiPositionpublic double getY()
getY in interface IGuiPositionpublic java.lang.String getTitle()
public int getTitleColour()
public void addToolTips(java.util.List<ToolTip> tooltips)
IGuiElementThis is called EVEN IF the mouse is not inside your width and height!
addToolTips in interface IContainingElementaddToolTips in interface IGuiElementaddToolTips in interface ITooltipElementpublic void addHelpElements(java.util.List<ElementHelpInfo.HelpPosition> elements)
addHelpElements in interface IContainingElementaddHelpElements in interface IGuiElementaddHelpElements in interface IHelpElement