B
- Concrete builder typepublic static interface Dialog.Builder<B extends Dialog.Builder<B>> extends ComponentBuilder<Dialog,B>
ComponentConfigurator.BaseComponentConfigurator
Modifier and Type | Method and Description |
---|---|
B |
closable(boolean closable)
Set whether the dialog is closable (i.e. a close button is show in the dialog caption).
|
B |
content(com.vaadin.ui.Component content)
Sets the content of the dialog.
|
B |
draggable(boolean draggable)
Set whether the dialog is draggable.
|
B |
htmlContentAllowed(boolean htmlContentAllowed)
Set whether the dialog messages allow HTML content.
|
B |
message(com.holonplatform.core.i18n.Localizable message)
Sets the
Localizable dialog message. |
default B |
message(String message)
Sets the dialog message.
|
default B |
message(String defaultMessage,
String messageCode,
Object... arguments)
Sets the localizable dialog message.
|
B |
messageDescriptionStyleName(String messageDescriptionStyleName)
Set the dialog message description style name
|
B |
messageStyleName(String messageStyleName)
Set the dialog message style name
|
B |
modal(boolean modal)
Set whether the dialog is modal.
|
default Dialog |
open()
Build and open the dialog window using given current
UI . |
Dialog |
open(com.vaadin.ui.UI ui)
Build and open the dialog window using given
UI . |
B |
position(int x,
int y)
Sets the position of the dialog window on the screen.
|
B |
resizable(boolean resizable)
Set whether the dialog is resizable.
|
B |
withCloseListener(Dialog.CloseListener closeListener)
Add a
Dialog.CloseListener to be notified when dialog is closed |
B |
withCloseShortcut(int keyCode,
int... modifiers)
Adds a close shortcut - pressing this key while holding down all (if any) modifiers specified while the
dialog window is in focus will close the window.
|
build, deferLocalization, dragSource, dropTarget
caption, caption, caption, captionAsHtml, description, description, description, disabled, errorHandler, fullHeight, fullSize, fullWidth, height, height, heightUndefined, hidden, icon, id, notVisible, primaryStyleName, replaceStyleName, responsive, sizeUndefined, styleName, width, width, widthUndefined, withAttachListener, withContextClickListener, withData, withDetachListener, withShortcutListener
default B message(String message)
message
- The dialog messagedefault B message(String defaultMessage, String messageCode, Object... arguments)
For dialog message localization, a LocalizationContext
must be available and localized as
Context
resource when dialog is displayed.
defaultMessage
- Default dialog message if no translation is available for given
messageCode
for current Locale, or no LocalizationContext
is available at allmessageCode
- Dialog message translation message keyarguments
- Optional Dialog message translation argumentsB message(com.holonplatform.core.i18n.Localizable message)
Localizable
dialog message.
For message localization, a LocalizationContext
must be available and localized as Context
resource when dialog is displayed.
message
- Localizable
dialog messageB messageStyleName(String messageStyleName)
messageStyleName
- the dialog message style name to setB messageDescriptionStyleName(String messageDescriptionStyleName)
messageDescriptionStyleName
- the dialog message description style name to setB modal(boolean modal)
true
.modal
- whether the dialog is modalB closable(boolean closable)
false
.closable
- whether the dialog is closableB resizable(boolean resizable)
false
.resizable
- whether the dialog is resizableB draggable(boolean draggable)
false
.draggable
- whether the dialog is draggableB htmlContentAllowed(boolean htmlContentAllowed)
htmlContentAllowed
- true
to allow HTML content for dialog messagesB withCloseListener(Dialog.CloseListener closeListener)
Dialog.CloseListener
to be notified when dialog is closedcloseListener
- The close listener to add (not null)B content(com.vaadin.ui.Component content)
null
, the default dialog content will be replaced by the
given content.content
- The component to use as dialog contentB position(int x, int y)
x
- The x coordinate for the windowy
- The y coordinate for the windowB withCloseShortcut(int keyCode, int... modifiers)
keyCode
- the keycode for invoking the shortcutmodifiers
- the (optional) modifiers for invoking the shortcut. Can be set to null to be explicit about
not having modifiers.Dialog open(com.vaadin.ui.UI ui)
UI
.ui
- UI to which to attach the dialog windowDialog
instanceCopyright © 2018 The Holon Platform. All rights reserved.