Class WindowView
java.lang.Object
org.rusherhack.client.api.ui.window.content.WindowContent
org.rusherhack.client.api.ui.window.view.WindowView
- All Implemented Interfaces:
org.rusherhack.core.interfaces.IClickable
,org.rusherhack.core.interfaces.IHoverable
,org.rusherhack.core.interfaces.INamed
,org.rusherhack.core.interfaces.IScrollable
,org.rusherhack.core.interfaces.ITickable
,org.rusherhack.core.interfaces.ITypeable
- Direct Known Subclasses:
ListView
,SimpleView
public abstract class WindowView
extends WindowContent
implements org.rusherhack.core.interfaces.INamed
A WindowView is a WindowContent that is able to render a set of other WindowContents in a defined way.
WindowViews should also be sure to set the position of the WindowContent before rendering it so that it is aware of its position.
-
Field Summary
Fields inherited from class org.rusherhack.client.api.ui.window.content.WindowContent
contextMenu, x, y
-
Constructor Summary
ConstructorDescriptionWindowView
(String name, Window window, List<? extends WindowContent> contentList) WindowView
(Window window, List<? extends WindowContent> contentList) -
Method Summary
Modifier and TypeMethodDescriptionboolean
charTyped
(char character) protected WindowHandlerBase
double
getName()
protected WindowViewHandlerBase
double
double
double
getWidth()
boolean
keyTyped
(int key, int scanCode, int modifiers) boolean
mouseClicked
(double mouseX, double mouseY, int button) void
mouseReleased
(double mouseX, double mouseY, int button) boolean
mouseScrolled
(double mouseX, double mouseY, double delta) void
renderContent
(double mouseX, double mouseY, WindowView parent) abstract void
renderViewContent
(double mouseX, double mouseY) void
setContentList
(List<? extends WindowContent> contentList) void
setViewHeight
(double viewHeight) void
setViewWidth
(double viewWidth) void
tick()
void
unfocus()
Called when the window loses focus.Methods inherited from class org.rusherhack.client.api.ui.window.content.WindowContent
getContextMenu, getFontRenderer, getRenderer, getWindow, getX, getY, isHovered, setContextMenu, setX, setY
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.rusherhack.core.interfaces.INamed
getAliases, getDisplayName
-
Field Details
-
contentList
Content list
-
-
Constructor Details
-
WindowView
-
WindowView
-
-
Method Details
-
renderViewContent
public abstract void renderViewContent(double mouseX, double mouseY) -
renderContent
- Specified by:
renderContent
in classWindowContent
-
unfocus
public void unfocus()Description copied from class:WindowContent
Called when the window loses focus. Should be used to unfocus things like text fields- Overrides:
unfocus
in classWindowContent
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
mouseClicked
in interfaceorg.rusherhack.core.interfaces.IClickable
-
mouseReleased
public void mouseReleased(double mouseX, double mouseY, int button) - Specified by:
mouseReleased
in interfaceorg.rusherhack.core.interfaces.IClickable
-
charTyped
public boolean charTyped(char character) - Specified by:
charTyped
in interfaceorg.rusherhack.core.interfaces.ITypeable
-
keyTyped
public boolean keyTyped(int key, int scanCode, int modifiers) - Specified by:
keyTyped
in interfaceorg.rusherhack.core.interfaces.ITypeable
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double delta) - Specified by:
mouseScrolled
in interfaceorg.rusherhack.core.interfaces.IScrollable
-
tick
public void tick()- Specified by:
tick
in interfaceorg.rusherhack.core.interfaces.ITickable
-
setViewWidth
public void setViewWidth(double viewWidth) -
setViewHeight
public void setViewHeight(double viewHeight) -
getWidth
public double getWidth()- Specified by:
getWidth
in classWindowContent
-
getHeight
public double getHeight()- Specified by:
getHeight
in classWindowContent
-
getViewWidth
public double getViewWidth() -
getViewHeight
public double getViewHeight() -
getName
- Specified by:
getName
in interfaceorg.rusherhack.core.interfaces.INamed
-
getContent
-
setContentList
-
getHandler
-
getViewHandler
-