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
FieldsFields inherited from class org.rusherhack.client.api.ui.window.content.WindowContent
contextMenu, x, y -
Constructor Summary
ConstructorsConstructorDescriptionWindowView(String name, Window window, List<? extends WindowContent> contentList) WindowView(Window window, List<? extends WindowContent> contentList) -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(char character) protected WindowHandlerBasedoublegetName()protected WindowViewHandlerBasedoubledoubledoublegetWidth()booleankeyTyped(int key, int scanCode, int modifiers) booleanmouseClicked(double mouseX, double mouseY, int button) voidmouseReleased(double mouseX, double mouseY, int button) booleanmouseScrolled(double mouseX, double mouseY, double delta) voidrenderContent(double mouseX, double mouseY, WindowView parent) abstract voidrenderViewContent(double mouseX, double mouseY) voidsetContentList(List<? extends WindowContent> contentList) voidsetViewHeight(double viewHeight) voidsetViewWidth(double viewWidth) voidtick()voidunfocus()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, setYMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
renderContentin classWindowContent
-
unfocus
public void unfocus()Description copied from class:WindowContentCalled when the window loses focus. Should be used to unfocus things like text fields- Overrides:
unfocusin classWindowContent
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
mouseClickedin interfaceorg.rusherhack.core.interfaces.IClickable
-
mouseReleased
public void mouseReleased(double mouseX, double mouseY, int button) - Specified by:
mouseReleasedin interfaceorg.rusherhack.core.interfaces.IClickable
-
charTyped
public boolean charTyped(char character) - Specified by:
charTypedin interfaceorg.rusherhack.core.interfaces.ITypeable
-
keyTyped
public boolean keyTyped(int key, int scanCode, int modifiers) - Specified by:
keyTypedin interfaceorg.rusherhack.core.interfaces.ITypeable
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double delta) - Specified by:
mouseScrolledin interfaceorg.rusherhack.core.interfaces.IScrollable
-
tick
public void tick()- Specified by:
tickin interfaceorg.rusherhack.core.interfaces.ITickable
-
setViewWidth
public void setViewWidth(double viewWidth) -
setViewHeight
public void setViewHeight(double viewHeight) -
getWidth
public double getWidth()- Specified by:
getWidthin classWindowContent
-
getHeight
public double getHeight()- Specified by:
getHeightin classWindowContent
-
getViewWidth
public double getViewWidth() -
getViewHeight
public double getViewHeight() -
getName
- Specified by:
getNamein interfaceorg.rusherhack.core.interfaces.INamed
-
getContent
-
setContentList
-
getHandler
-
getViewHandler
-