1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- = window
- :author:
- :revnumber:
- :revdate: 2016/03/17 20:48
- :relfileprefix: ../../../
- :imagesdir: ../../..
- ifdef::env-github,env-browser[:outfilesuffix: .adoc]
- == Window Class
- The window class provides a movable, resizable window with a Drag Bar.
- It provides the 3 standard constructors as shown in the <<jme3/contributions/tonegodgui/quickstart#,Quick Start Guide>>.
- *Constructor 1:*
- [source,java]
- ----
- /** Parameters:
- * Screen screen,
- * String UID,
- * Vector2f position
- */
-
- Window win = new Window(screen, “win”, new Vector2f(15, 15));
- ----
- *Constructor 2:*
- [source,java]
- ----
- /** Additional Parameter:
- * Vector2f dimensions */
-
- Window win = new Window(screen, “win”, new Vector2f(15, 15),
- new Vector2f(400, 300)
- );
- ----
- *Constructor 3:*
- [source,java]
- ----
- /** Additional Parameters:
- * Vector4f resizeBorders,
- * String defaultImg
- */
-
- Window win = new Window(screen, “win”, new Vector2f(15, 15), new Vector2f(400, 300),
- new Vector4f(14,14,14,14),
- “tonegod/gui/style/def/Window/panel_x.png”
- );
- ----
- [NOTE]
- ====
- Once again, default behaviors, such as moving, and resizing can be disabled calling the appropriate setters from the <<jme3/contributions/tonegodgui/element#,Element>> class.
- ====
- === Methods specific to the Window Class:
- [source,java]
- ----
- win.getDragBar(); // returns a pointer to the dragbar Element
- win.getDragBarHeight(); // returns the height of the dragbar
- win.setWindowTitle(String title); // Sets the title displayed in the dragbar
- ----
|