Panel Groups

If more than a single panel shall be displayed, their layout needs to be calculated accordingly. All Panels containing others should extend PanelGroup.

Lists

PanelList is an abstract class for all kinds of PanelGroups, which have a list for storing their children. The most obvious entries are PanelListX and PanelListY, which align their children on the x-axis and y-axis respectively. A more involved type is PanelList2D, which is a group that aligns their children linearly along the x-axis until it is full, and then uses the next line.

No PanelList manages overflow scenarios (window is too small) themselves. To handle it, you can use ScrollPanels. There are ScrollPanelX, ScrollPanelY and ScrollPanelXY for scrolling along their respective axis.

Nine Tiles

Layouts along the bottom center, top left, and similar are popular for games. The NineTilePanel will use their children's "alignmentX" and "alignmentY" properties to place them accordingly.

2D Maps

Sometimes you want to display a zoomable, scrollable map. To not have to implement that feature the 10th time, there is the MapPanel that does it for you. All remaining work is drawing your layout, and clamping the users position if necessary.

Tables

Other times, you might want to display data in a nice layout, or need to align elements of InputPanels neatly. This is the purpose of the TablePanel. It will align its children in rows and columns. Its set(x,y,panel) method lets you set children to their respective column and row indices.

Created: 14:04, 26. Mar 2023; Most recent change: 08:09, 18. Sep 2023