Creates a new TabPane container.
Zero or more controls to be added to the pane.
This property affects how a container will be added to a
component editor when calling addToEditor
. If true,
then the container will be wrapped in a scroll pane that enables vertical
scrolling. If the editor is not tall enough to display all of the
controls in a tab, a scroll bar will automatically appear to allow the
user to scroll to unreachable controls. If false (the default),
then the controls will be clipped to the bottom of their tab.
This property affects how a container will be added to a
component editor when calling addToEditor
. If true
(the default), then the container will be nested inside of a
panel. The panel will be laid out with BorderLayout and the
container will be placed in the NORTH
position. This produces
a more consistent layout by preventing the container from expanding to
cover the entire extent of the tab.
This read-only property is true
if this container was previously
realized, which means that realizing it again will throw an exception.
If true, the tab pane will feature tabs of smaller than standard size.
This property defines a title for the container. If a title is set, the realized UI panel will be placed in a border titled using this text. Some types of container may ignore this setting.
Wraps the panel
in a titled border (or not, dependinging on the title property of the container).
Concrete subclasses may call this to implement the standard realize()
behaviour.
the panel to wrap
the panel
Converts an object into a corresponding UI component. If the control is already a UI component, it is returned unchanged. If it is an icon, it is wrapped in a label. If it is an image, the image is converted into an icon and treated as above. Other objects are converted into strings and then returned as labels. Subclasses may override this to perform other kinds of conversions.
Converts an array of controls to a Java Object[]
. Some container subclasses
use this internally as a stage in realizing a container.
the controls to convert, by default the controls in this container are used
a Java array of converted controls
Adds zero or more control objects to this container. The added objects will all be given a default hint value that allows this container to lay the control out as it sees fit.
controls to be added to the container
this container
Realizes this container as a user interface control and adds it to a component editor as a new tab.
the editor to add this layout to
an optional title for the tab that will be added
an optional function that is called every update heartbeat
an optional function that is called when the controls should be populated with data from the component
an optional index at which to insert the new layout in the list of tabs
the UI container that holds the converted controls
Realizes this container and places the resulting component in a dialog box.
The returned dialog box can be displayed by calling its showDialog()
method.
an optional title for the dialog window
optional text to use for the OK button; use null for default text, ""
to hide button
optional text to use for the Cancel button; use null for default text, ""
to hide button
an optional icon that will be placed next to the content (null for no icon)
if true, the script stops running until the dialog is closed
the new dialog box
Returns the control added at position index
in the list of controls
maintained by this container.
the index of the control, counting from 0 in the order they were added
the requested control
Returns the number of controls in this container.
Returns the hint added at position index
in the list of hint
maintained by this container.
the index of the hint, counting from 0 in the order controls were added
the requested hint
Adds zero or more control objects to this container, using hints to
control the layout. Not all containers use hints, so these may be ignored.
The arguments are declared in pairs: a control followed by its hint:
place(control1, "hint1", control2, "hint2", ...)
.
pairs of controls and hints
this container
Convert this container into a user interface component that groups together
the controls that have been added to it. Typically the returned object
is a swing.JPanel
, but this is not required.
This abstract method is not defined in AbstractContainer
and will
throw an exception if called. Sublasses must override this method.
This method can only be called once. See realized.
the realized container
Tests the layout of the container by realizing it and displaying the result in a simple dialog.
Returns the tab pane that houses the primary editing controls for an editor.
the editor to search for a tab pane
the tab pane that houses editing controls, or null if none was found
A new TabPane organizes controls into a set of tabs with mutually exclusive visibility. Each control added will be shown on a separate tab. For this reason, the added controls are usually other containers. The hint supplied for each added control will be used as the label for the tab. If no hint is given, a series of dummy names (
"Tab 1"
,"Tab 2"
, etc.), will be used.