12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- = panel
- :author:
- :revnumber:
- :revdate: 2016/03/17 20:48
- :relfileprefix: ../../../
- :imagesdir: ../../..
- ifdef::env-github,env-browser[:outfilesuffix: .adoc]
- == Panel Class
- The Panel class extends Element and, like the Label class, it’s only purpose is to provide:
- . The 3 standard constructors as shown in the <<jme3/contributions/tonegodgui/quickstart#,Quick Start Guide>>
- . Default style information
- *Constructor 1:*
- [source,java]
- ----
- /** Parameters:
- * Screen screen,
- * String UID,
- * Vector2f position
- */
-
- Panel panel = new Panel(screen, “panel”, new Vector2f(15, 15));
- ----
- *Constructor 2:*
- [source,java]
- ----
- /** Additional Parameter:
- * Vector2f dimensions */
-
- Panel panel = new Panel(screen, “panel”, new Vector2f(15, 15),
- new Vector2f(400, 300)
- );
- ----
- *Constructor 3:*
- [source,java]
- ----
- /** Additional Parameters:
- * Vector4f resizeBorders,
- * String defaultImg
- */
-
- Panel panel = new Panel(screen, “panel”, new Vector2f(15, 15), new Vector2f(400, 300),
- new Vector4f(14,14,14,14),
- “tonegod/gui/style/def/Window/panel_x.png”
- );
- ----
- The Panel class creates a resizable, movable panel (<<jme3/contributions/tonegodgui/window#,Window>> without a dragbar). The entire panel is clickable for moving unless otherwise covered by added child Elements that have not called:
- [source,java]
- ----
- setIgnoreMouse(true);
- ----
- You can disable any of the default behaviors of the Panel class by using the methods described in the <<jme3/contributions/tonegodgui/element#,Element>> class.
|