Internal Panels
Displaying background images
The Scrollable definition
Often you can realize a layout only by creating internal panels. You drop a JPanel onto a grid cell and what you get is a grid inside a grid.
|
|
An internal panel Example 16
|
|
Tip: You can create internal panels from any contiguous selection by choosing 'Apply Panel to Selection'. This command replaces the current selection with an internal panel containing the selection.
|
|
|
With 'Show Internal Grids' deselected, the internal panel acts like any other container: To select components inside the panel, you need to double-click it in order to switch to its hierarchy level.
|
|
|
With 'Show Internal Grids' selected, the internal grid shines through and components can be selected directly. (Because this can be confusing for beginners, the flag is deselected by default.)
|
|
Note: With 'Show Internal Grids' selected, you cannot select the internal panel with a mouse click. You can select it either by Ctrl-Alt-clicking it or by choosing 'Select Panel' from the panel's context menu.
|
Displaying background images Top of page
You specify a background image with the bgImage property. All other settings are optional.
|
bgImageDoubleBuffered: Deselect this to save memory. The default is true .
|
|
bgImageHorizontalAlignment: One of LEFT , CENTER or RIGHT .The default is CENTER .
|
|
bgImageScaleMode: One of SCALE_NONE , SCALE_HORIZONTAL , SCALE_VERTICAL , SCALE_BOTH , SCALE_TO_FIT , SCALE_TO_FILL , REPEAT_HORIZONTAL , REPEAT_VERTICAL or REPEAT_BOTH . The default is SCALE_NONE .
|
|
bgImageVerticalAlignment: One of TOP , CENTER or BOTTOM . The default is CENTER .
|
|
|
Panel with background image Example 17
|
The Scrollable definition Top of page
Every RadiPanel has a scrollableDefinition property:
A ScrollableDefinition has the following settings:
With Fill horizontal deselected, the panel will not fill the viewport horizontally if its width is less than the viewport's width.
With Fill vertical deselected, the panel will not fill the viewport vertically if its height is less than the viewport's height.
|