public interface WidgetFactory<O extends OutputManager<?>>
Modifier and Type | Method and Description |
---|---|
<T extends Widget<O>> |
create(java.lang.Class<T> clazz,
WidgetId id,
WidgetConfig cfg)
Instantiate UI-specific version of the specified widget class.
|
AlertBox<O> |
createAlertBox(int alertType,
java.lang.Object[] content,
int buttonSet,
logical var,
java.lang.String title,
Color color,
java.lang.String[] stack)
Create UI-specific
AlertBox instance. |
BorderedPanel<O> |
createBorderedPanel()
Creates new instance of
BorderedPanel with BorderLayout as
the layout manager and no border. |
BorderedPanel<O> |
createBorderedPanel(LayoutManager<O> mgr,
Border<O> border)
Creates new instance of
BorderedPanel with a specific layout
manager and border. |
Button<O> |
createButton(WidgetId id,
Container<O> container,
java.lang.String text)
Create new button for given container and text.
|
DropDown<O> |
createDropDown(ComboBox<O> parent)
Create UI-specific
DropDown implementation. |
AbstractFileChooserDialog |
createFileSystemChooserDialog(java.lang.String title,
int parentWindow,
boolean dir)
Creates a new instance of a dialog that allows the user to navigate and choose a
file-system entity.
|
Image<O> |
createImage(WidgetId id)
Create UI-specific
Image instance. |
Label<O> |
createLabel(WidgetId id,
Label<O> labelInstance,
int frameId)
|
Label<O> |
createLabel(WidgetId id,
java.lang.String text,
int frameId)
Create new
Label instance for given text. |
Border<O> |
createLineBorder()
Creates new instance representing a default line border.
|
BorderedPanel<O> |
createLineBorderedPanel()
Creates new instance of
BorderedPanel with BorderLayout
layout manager and simple border of width 1 measured in native units. |
MessageArea<O> |
createMessageArea(WidgetId id,
int lines)
Create UI-specific
MessageArea instance. |
MnemonicInfo |
createMnemonic()
Create an object accumulating prepared label and mnemonic info.
|
RadioButton<O> |
createRadioButton(RadioSetConfig config,
java.lang.String label,
BaseDataType value)
Create UI-specific
RadioButton instance. |
Rect<O> |
createRectangle(WidgetId id,
Container<O> container)
Create new rectangle for given container.
|
ScrollableList<O> |
createScrollableList(ComboBox<O> parent,
ListModel<java.lang.String> model)
Create UI-specific
ScrollableList implementation. |
SensitiveScrollContainer<O> |
createScrollContainer()
Create UI-specific
SensitiveScrollContainer implementation. |
ScrollPane<O> |
createScrollPane(ScrollableWidget<O> widget)
Create UI-specific
ScrollPane implementation. |
ScrollPane<O> |
createScrollPane(ScrollableWidget<O> widget,
java.util.function.Supplier<TopLevelWindow<O>> wnd)
Create UI-specific
ScrollPane implementation. |
StatusLine<O> |
createStatusLine(WidgetId id)
Create UI-specific
StatusLine instance. |
ToggleBox<O> |
createToggleBox(WidgetId id,
Container<O> container,
java.lang.String text)
Create new toggle-box for given container and text.
|
Window<O> |
createWindow(WidgetId id)
Create UI-specific
Window instance. |
MnemonicInfo createMnemonic()
MnemonicInfo
instance.Label<O> createLabel(WidgetId id, java.lang.String text, int frameId)
Label
instance for given text.id
- The widget's ID.text
- Label text.frameId
- The ID of the frame to which the label belongs, or -1 if unknown at the time of the
creation.Label
instance.Button<O> createButton(WidgetId id, Container<O> container, java.lang.String text)
id
- The widget's ID.container
- Container to which new instance will belong.text
- Button text.Button
instance.ToggleBox<O> createToggleBox(WidgetId id, Container<O> container, java.lang.String text)
id
- The widget's ID.container
- Container to which new instance will belong.text
- ToggleBox label text.ToggleBox
instance.Rect<O> createRectangle(WidgetId id, Container<O> container)
id
- The widget's ID.container
- Container to which new instance will belong.Rect
instance.<T extends Widget<O>> T create(java.lang.Class<T> clazz, WidgetId id, WidgetConfig cfg)
T
- Widget abstract class type.clazz
- Widget abstract class for which UI-specific implementation should
be instantiated.id
- The widget's ID.cfg
- Widget configuration container.ScrollableList<O> createScrollableList(ComboBox<O> parent, ListModel<java.lang.String> model)
ScrollableList
implementation.parent
- Parent ComboBox
widget.model
- Scrollable list model.ScrollableList
.DropDown<O> createDropDown(ComboBox<O> parent)
DropDown
implementation.SensitiveScrollContainer<O> createScrollContainer()
SensitiveScrollContainer
implementation.SensitiveScrollContainer
.ScrollPane<O> createScrollPane(ScrollableWidget<O> widget)
ScrollPane
implementation.widget
- Widget which will be scrolled.ScrollPane
.ScrollPane<O> createScrollPane(ScrollableWidget<O> widget, java.util.function.Supplier<TopLevelWindow<O>> wnd)
ScrollPane
implementation.widget
- Widget which will be scrolled.ScrollPane
.RadioButton<O> createRadioButton(RadioSetConfig config, java.lang.String label, BaseDataType value)
RadioButton
instance.config
- Parent config.label
- Radio button label.value
- Radio button data type.RadioButton
.Window<O> createWindow(WidgetId id)
Window
instance.id
- The widget's ID.Window
.MessageArea<O> createMessageArea(WidgetId id, int lines)
MessageArea
instance.id
- The widget's ID.lines
- Number of visible lines in message area.MessageArea
.StatusLine<O> createStatusLine(WidgetId id)
StatusLine
instance.id
- The widget's ID.StatusLine
.Image<O> createImage(WidgetId id)
Image
instance.id
- The widget's ID.Image
.AlertBox<O> createAlertBox(int alertType, java.lang.Object[] content, int buttonSet, logical var, java.lang.String title, Color color, java.lang.String[] stack)
AlertBox
instance.alertType
- One of the ALERT_* constants specifying message type.content
- The list of message text components.buttonSet
- One of the BTN_* constants specifying used button set.var
- The variable to update if not null
.title
- The dialog title.color
- Color scheme to use.stack
- Progress stack traceMessageArea
.BorderedPanel<O> createBorderedPanel()
BorderedPanel
with BorderLayout
as
the layout manager and no border.BorderedPanel
.BorderedPanel<O> createLineBorderedPanel()
BorderedPanel
with BorderLayout
layout manager and simple border of width 1 measured in native units.BorderedPanel
.BorderedPanel<O> createBorderedPanel(LayoutManager<O> mgr, Border<O> border)
BorderedPanel
with a specific layout
manager and border.mgr
- Layout manager.border
- Border for this widget.BorderedPanel
.Border<O> createLineBorder()
Border
.AbstractFileChooserDialog createFileSystemChooserDialog(java.lang.String title, int parentWindow, boolean dir)
title
- The title of the dialog. Optional. If null
the dialog will use its default
window title.parentWindow
- The id of the window to be parent of the newly created dialog.dir
- If true
the dialog returned will be able to select only directories,
otherwise the dialog will allow selection of files only.