XYLayout
is a JDeveloper custom layout manager.
XYLayout
puts components in a container at specific (x,y)
coordinates relative to the upper left corner of the container.
Regardless of the type of display, the container will always retain the
relative (x,y) positions of components. However, when you resize a
container with an XYLayout
, the components do not
reposition or resize.
You'll discover that XYLayout
is very convenient to use in
prototyping a user interface. When you design more complicated user
interfaces with multiple nested panels, XYLayout
can be
used for the initial layout of the panels and components, after which
you can choose from one of the standard layouts for the final design.
Note: XYLayout
uses absolute x,y values
when positioning objects on the screen, and does not adjust to different
screen resolutions. To ensure your layout adjusts to other resolutions,
don't leave any containers in XYLayout in your final design.
You can use the UI design tools to specify the container's size and its components' x,y coordinates.
XYLayout
, select
the XYLayout
object in the Structure window and enter the
pixel dimension for the height
and width
properties in the Property Inspector. This setting specifies the size
of the XYLayout
container.
Alignment Options for XYLayout
The following table explains the alignment options available from the context menu:
Select this | To do this |
---|---|
Move to first |
Moves the selected component to the top of the Z-order. |
Move to last |
Moves the selected component to the bottom of the Z-order. |
Align Left |
Lines up the left edges of the selected components with the left edge of the first selected component. |
Align Center |
Horizontally lines up the centers of the selected components with the center of the first selected component. |
Align Right |
Lines up the right edges of the selected components with the right edge of the first selected component. |
Align Top |
Lines up the top edges of the selected components with the top edge of the first selected component. |
Align Middle |
Vertically lines up the centers of the selected components with the middle of the first selected component. |
Align Bottom |
Lines up the bottom edges of the selected components with the bottom edge of the first selected component. |
Even Space Horizontal |
Evenly spaces the selected components horizontally between the first and last selected components. |
Even Space Vertical |
Evenly spaces the selected components vertically between the first and last selected components. |
Same Size Horizontal |
Makes all the selected components the same width as the first selected component. |
Same Size Vertical |
Makes all the selected components the same height as the first selected component. |
Layouts Provided with JDeveloper
Selecting a Final Layout Manager
Choosing Layout Manager Properties
Copyright © 1997, 2004, Oracle. All rights reserved.