public class Element<T extends IElementGUI>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static ColorScheme |
DEFAULT |
protected T |
gui |
| Constructor and Description |
|---|
Element(T gui,
float posX,
float posY,
int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Called when this element is removed or its parent gui is closed
|
protected void |
drawOutline(double x,
double y,
double width,
double height,
int color,
double outlineSize) |
protected void |
drawOutline(java.awt.geom.RectangularShape rectangle,
int color,
double outlineSize) |
protected void |
drawRectangle(double x,
double y,
double width,
double height,
int color) |
protected void |
drawRectangle(java.awt.geom.RectangularShape rectangle,
int color) |
protected void |
drawTexturedRectangle(double x,
double y,
double width,
double height,
int color) |
protected void |
drawTexturedRectangle(java.awt.geom.RectangularShape rectangle,
int color) |
protected void |
endScissor() |
java.util.List<Element<T>> |
getChildren() |
ColorScheme |
getColorScheme() |
int |
getHeight() |
Element<T> |
getParent() |
float |
getPosX() |
float |
getPosY() |
int |
getWidth() |
void |
init() |
boolean |
isEnabled() |
protected boolean |
isSelected(float mouseX,
float mouseY) |
protected boolean |
isSelected(java.awt.geom.RectangularShape rectangle,
float mouseX,
float mouseY) |
boolean |
isVisible() |
boolean |
keyPressed(char character,
int key) |
boolean |
mouseClicked(float mouseX,
float mouseY,
int button) |
boolean |
mouseDragged(float mouseX,
float mouseY,
int button,
long timeSinceClick) |
boolean |
mouseReleased(float mouseX,
float mouseY,
int button) |
boolean |
mouseScrolled(float mouseX,
float mouseY,
int amount) |
void |
render(float mouseX,
float mouseY,
float partialTicks) |
void |
renderChildren(float mouseX,
float mouseY,
float partialTicks) |
Element<T> |
setEnabled(boolean enabled) |
Element<T> |
setHeight(int height) |
Element<T> |
setPosX(float posX) |
Element<T> |
setPosY(float posY) |
Element<T> |
setVisible(boolean visible) |
Element<T> |
setWidth(int width) |
protected void |
startScissor() |
void |
update() |
Element<T> |
withColorScheme(ColorScheme colorScheme) |
Element<T> |
withParent(Element<T> parent) |
public static final ColorScheme DEFAULT
protected final T extends IElementGUI gui
public Element(T gui, float posX, float posY, int width, int height)
public void init()
public void update()
public void render(float mouseX,
float mouseY,
float partialTicks)
public void dispose()
public boolean mouseClicked(float mouseX,
float mouseY,
int button)
public boolean mouseDragged(float mouseX,
float mouseY,
int button,
long timeSinceClick)
public boolean mouseReleased(float mouseX,
float mouseY,
int button)
public boolean keyPressed(char character,
int key)
public boolean mouseScrolled(float mouseX,
float mouseY,
int amount)
protected boolean isSelected(float mouseX,
float mouseY)
protected boolean isSelected(java.awt.geom.RectangularShape rectangle,
float mouseX,
float mouseY)
public Element<T> withColorScheme(ColorScheme colorScheme)
public ColorScheme getColorScheme()
public float getPosX()
public float getPosY()
public int getWidth()
public int getHeight()
public boolean isEnabled()
public boolean isVisible()
public void renderChildren(float mouseX,
float mouseY,
float partialTicks)
protected void drawRectangle(double x,
double y,
double width,
double height,
int color)
protected void drawRectangle(java.awt.geom.RectangularShape rectangle,
int color)
protected void drawTexturedRectangle(double x,
double y,
double width,
double height,
int color)
protected void drawTexturedRectangle(java.awt.geom.RectangularShape rectangle,
int color)
protected void drawOutline(double x,
double y,
double width,
double height,
int color,
double outlineSize)
protected void drawOutline(java.awt.geom.RectangularShape rectangle,
int color,
double outlineSize)
protected void startScissor()
protected void endScissor()