public class ChuiWidgetFactory extends WidgetFactoryAdapter<ChuiOutputManager>
The return type for the create APIs is different from the WidgetFactory
versions because:
ChuiOutputManager type, i.e. instead
of using Label<ChuiOutputManager> as return type, LabelImpl
can be used directly, with the same effect. WidgetFactory
implementation classes: if the WidgetFactory implementation class is used
explicitly, it prevents accidental mixing of ChUI and GUI widgets (i.e. if used from
incorrect location). classMap| Constructor and Description |
|---|
ChuiWidgetFactory() |
| Modifier and Type | Method and Description |
|---|---|
AlertBoxImpl |
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<ChuiOutputManager> |
createBorderedPanel()
Creates new instance of
BorderedPanel with BorderLayout as
the layout manager and no border. |
BorderedPanel<ChuiOutputManager> |
createBorderedPanel(LayoutManager<ChuiOutputManager> mgr,
Border<ChuiOutputManager> border)
Creates new instance of
BorderedPanel with a specific layout
manager and border. |
ButtonImpl |
createButton(WidgetId id,
Container<ChuiOutputManager> container,
java.lang.String text)
Create new button for given container and text.
|
DropDownImpl |
createDropDown(ComboBox<ChuiOutputManager> 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.
|
LabelImpl |
createLabel(WidgetId id,
ClientDrivenLabel<ChuiOutputManager> labelInstance,
int frameId)
Create UI-specific
ClientDrivenLabel instance as a copy of given ClientDrivenLabel. |
ClientDrivenLabel |
createLabel(WidgetId id,
java.lang.String text,
int frameId)
Create new
ClientDrivenLabel instance for given text. |
LineBorder |
createLineBorder()
Creates new instance representing a default line border.
|
BorderedPanel<ChuiOutputManager> |
createLineBorderedPanel()
Creates new instance of
BorderedPanel with BorderLayout
layout manager and simple border of width 1 measured in native units. |
MessageAreaImpl |
createMessageArea(WidgetId id,
int lines)
Create UI-specific
MessageArea instance. |
MnemonicInfo |
createMnemonic()
Create an object accumulating prepared label and mnemonic info.
|
RadioButtonImpl |
createRadioButton(RadioSetConfig config,
java.lang.String label,
BaseDataType value)
Create UI-specific
RadioButton instance. |
RectangleImpl |
createRectangle(WidgetId id,
Container<ChuiOutputManager> container)
Create new rectangle for given container.
|
ScrollableListImpl |
createScrollableList(ComboBox<ChuiOutputManager> parent,
ListModel<java.lang.String> model)
Create UI-specific
ScrollableList implementation. |
SensitiveScrollContainer<ChuiOutputManager> |
createScrollContainer()
Create UI-specific
SensitiveScrollContainer implementation. |
ScrollPaneImpl |
createScrollPane(ScrollableWidget<ChuiOutputManager> widget)
Create UI-specific
ScrollPane implementation. |
ScrollPaneImpl |
createScrollPane(ScrollableWidget<ChuiOutputManager> widget,
java.util.function.Supplier<TopLevelWindow<ChuiOutputManager>> wnd)
Create UI-specific
ScrollPane instance. |
StatusLineImpl |
createStatusLine(WidgetId id)
Create UI-specific
StatusLine instance. |
ToggleBoxImpl |
createToggleBox(WidgetId id,
Container<ChuiOutputManager> container,
java.lang.String text)
Create new toggle-box for given container and text.
|
WindowChuiImpl |
createWindow(WidgetId id)
Create UI-specific
Window instance. |
addWidgetClass, create, createImage, createScrollBarpublic MnemonicInfo createMnemonic()
MnemonicInfo instance.public ClientDrivenLabel createLabel(WidgetId id, java.lang.String text, int frameId)
ClientDrivenLabel 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.ClientDrivenLabel instance.public ButtonImpl createButton(WidgetId id, Container<ChuiOutputManager> container, java.lang.String text)
id - The widget's ID.container - Container to which new instance will belong.text - Button text.Button instance.public ToggleBoxImpl createToggleBox(WidgetId id, Container<ChuiOutputManager> container, java.lang.String text)
createToggleBox in interface WidgetFactory<ChuiOutputManager>createToggleBox in class WidgetFactoryAdapter<ChuiOutputManager>id - The widget's ID.container - Container to which new instance will belong.text - Toggle Box text.ToggleBox instance.public RectangleImpl createRectangle(WidgetId id, Container<ChuiOutputManager> container)
createRectangle in interface WidgetFactory<ChuiOutputManager>createRectangle in class WidgetFactoryAdapter<ChuiOutputManager>id - The widget's ID.container - Container to which new instance will belong.Rect instance.public DropDownImpl createDropDown(ComboBox<ChuiOutputManager> parent)
DropDown implementation.public ScrollableListImpl createScrollableList(ComboBox<ChuiOutputManager> parent, ListModel<java.lang.String> model)
ScrollableList implementation.parent - Parent ComboBox widget.model - Scrollable list model.ScrollableList.public SensitiveScrollContainer<ChuiOutputManager> createScrollContainer()
SensitiveScrollContainer implementation.SensitiveScrollContainer.public ScrollPaneImpl createScrollPane(ScrollableWidget<ChuiOutputManager> widget)
ScrollPane implementation.widget - Widget which will be scrolled.ScrollPane.public ScrollPaneImpl createScrollPane(ScrollableWidget<ChuiOutputManager> widget, java.util.function.Supplier<TopLevelWindow<ChuiOutputManager>> wnd)
ScrollPane instance.widget - Widget which will be scrolled.wnd - TopLevelWindow supplierScrollPane.public LabelImpl createLabel(WidgetId id, ClientDrivenLabel<ChuiOutputManager> labelInstance, int frameId)
ClientDrivenLabel instance as a copy of given ClientDrivenLabel.id - The widget's ID.labelInstance - Source ClientDrivenLabel instance.frameId - The ID of the frame to which the label belongs, or -1 if unknown at the time of the
creation.ClientDrivenLabel.public RadioButtonImpl createRadioButton(RadioSetConfig config, java.lang.String label, BaseDataType value)
RadioButton instance.config - Parent config.label - Radio button label.value - Radio button data type.RadioButton.public WindowChuiImpl createWindow(WidgetId id)
Window instance.id - The widget's ID.Window.public StatusLineImpl createStatusLine(WidgetId id)
StatusLine instance.id - The widget's ID.StatusLine.public MessageAreaImpl createMessageArea(WidgetId id, int lines)
MessageArea instance.id - The widget's ID.lines - Number of visible lines in message area.MessageArea.public AlertBoxImpl 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.public BorderedPanel<ChuiOutputManager> createBorderedPanel()
BorderedPanel with BorderLayout as
the layout manager and no border.BorderedPanel.public BorderedPanel<ChuiOutputManager> createLineBorderedPanel()
BorderedPanel with BorderLayout
layout manager and simple border of width 1 measured in native units.BorderedPanel.public BorderedPanel<ChuiOutputManager> createBorderedPanel(LayoutManager<ChuiOutputManager> mgr, Border<ChuiOutputManager> border)
BorderedPanel with a specific layout
manager and border.mgr - Layout manager.border - Border for this widget.BorderedPanel.public LineBorder createLineBorder()
Border.public 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.