public class AbstractWindow extends AbstractFrame implements Window, Component.HasXmlDescriptor, Window.Wrapper, Component.SecuredActionsHolder
Window.BeforeCloseEvent, Window.BeforeCloseWithCloseButtonEvent, Window.BeforeCloseWithCloseButtonListener, Window.BeforeCloseWithShortcutEvent, Window.BeforeCloseWithShortcutListener, Window.CloseListener, Window.CloseWithCommitListener, Window.Committable, Window.ContentSwitchMode, Window.Editor, Window.HasFoldersPane, Window.HasUserIndicator, Window.HasWorkArea, Window.Lookup, Window.MainWindow, Window.TopLevelWindow, Window.WrapperFrame.MessageMode, Frame.MessageType, Frame.NotificationTypeExpandingLayout.ExpandDirectionComponent.ActionOwner, Component.ActionsHolder, Component.Alignment, Component.BelongToFrame, Component.Buffered, Component.ChildEditableController, Component.Collapsable, Component.Container, Component.Disposable, Component.Editable, Component.EditableChangeEvent, Component.EditableChangeListener, Component.EditableChangeNotifier, Component.ExpandedStateChangeEvent, Component.ExpandedStateChangeListener, Component.Focusable, Component.HasBorder, Component.HasButtonsPanel, Component.HasCaption, Component.HasFormatter, Component.HasIcon, Component.HasInputPrompt, Component.HasNamedComponents, Component.HasPresentations, Component.HasRowsCount, Component.HasSettings, Component.HasValue, Component.HasXmlDescriptor, Component.LayoutClickEvent, Component.LayoutClickListener, Component.LayoutClickNotifier, Component.Margin, Component.MouseEventDetails, Component.OrderedContainer, Component.OuterMargin, Component.SecuredActionsHolder, Component.ShortcutAction, Component.ShortcutNotifier, Component.ShortcutTriggeredEvent, Component.Spacing, Component.UiPermissionAware, Component.Validatable, Component.ValueChangeEvent, Component.ValueChangeListenerBROWSE_WINDOW_SUFFIX, CLOSE_ACTION_ID, COMMIT_ACTION_ID, CREATE_WINDOW_SUFFIX, EDITOR_WINDOW_SUFFIX, LOOKUP_WINDOW_SUFFIX, NAME, SELECT_ACTION_IDAUTO_SIZE, AUTO_SIZE_PX, UNITS_PERCENTAGE, UNITS_PIXELS| Constructor and Description |
|---|
AbstractWindow() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBeforeCloseWithCloseButtonListener(Window.BeforeCloseWithCloseButtonListener listener)
Register a new before close with close button listener.
|
void |
addBeforeCloseWithShortcutListener(Window.BeforeCloseWithShortcutListener listener)
Register a new before close with shortcut listener.
|
void |
addCloseListener(Window.CloseListener listener)
Add a listener that will be notified when this screen is closed.
|
void |
addCloseWithCommitListener(Window.CloseWithCommitListener listener)
Add a listener that will be notified when this screen is closed with actionId
Window.COMMIT_ACTION_ID. |
void |
addListener(Window.CloseListener listener)
Deprecated.
|
void |
addTimer(Timer timer)
Add a
Timer component to this screen. |
void |
applySettings(Settings settings)
This method is called when the screen is opened to restore settings saved in the database for the current user.
|
boolean |
close(java.lang.String actionId)
Close the screen.
|
boolean |
close(java.lang.String actionId,
boolean force)
Close the screen.
|
void |
closeAndRun(java.lang.String actionId,
java.lang.Runnable runnable)
INTERNAL.
|
void |
deleteSettings()
This method is called by the framework on reset to defaults action
|
ActionsPermissions |
getActionsPermissions() |
java.lang.String |
getCaption() |
Window.ContentSwitchMode |
getContentSwitchMode()
Returns how the managed main TabSheet switches a tab with this window: hides or unloads its content.
|
WindowContext |
getContext() |
java.lang.String |
getDescription()
Screen description is used by the framework to show some specified information, e.g.
|
DialogOptions |
getDialogOptions() |
DsContext |
getDsContext() |
java.lang.String |
getFocusComponent() |
java.lang.String |
getIcon() |
Settings |
getSettings() |
Timer |
getTimer(java.lang.String id)
Returns a
Timer added to this screen. |
WindowManager |
getWindowManager() |
Window |
getWrappedWindow()
INTERNAL.
|
org.dom4j.Element |
getXmlDescriptor() |
boolean |
isAttributeAccessControlEnabled()
Whether automatic applying of attribute access rules enabled.
|
void |
ready()
Hook to be implemented in subclasses.
|
void |
removeBeforeCloseWithCloseButtonListener(Window.BeforeCloseWithCloseButtonListener listener)
Removes a previously registered before close with close button listener.
|
void |
removeBeforeCloseWithShortcutListener(Window.BeforeCloseWithShortcutListener listener)
Removes a previously registered before close with shortcut listener.
|
void |
removeCloseListener(Window.CloseListener listener) |
void |
removeCloseWithCommitListener(Window.CloseWithCommitListener listener) |
void |
removeListener(Window.CloseListener listener)
Deprecated.
|
void |
saveSettings()
This method is called when the screen is closed to save the screen settings to the database.
|
void |
setCaption(java.lang.String caption)
Set the screen caption.
|
void |
setContentSwitchMode(Window.ContentSwitchMode mode)
Sets how the managed main TabSheet switches a tab with this window: hides or unloads its content.
|
void |
setDescription(java.lang.String description)
Screen description is used by the framework to show some specified information, e.g.
|
void |
setDsContext(DsContext dsContext)
INTERNAL.
|
void |
setFocusComponent(java.lang.String componentId)
Set a component to be focused after the screen is opened.
|
void |
setIcon(java.lang.String icon) |
void |
setWindowManager(WindowManager windowManager)
INTERNAL.
|
void |
setXmlDescriptor(org.dom4j.Element element) |
boolean |
validate(java.util.List<Component.Validatable> fields)
Check validity by invoking validators on specified components which support them
and show validation result notification.
|
boolean |
validateAll()
Check validity by invoking validators on all components which support them
and show validation result notification.
|
add, add, addAction, addAction, addStyleName, expand, expand, getAction, getActions, getAlignment, getCompanion, getComponent, getComponent, getComponent, getComponents, getComposition, getDebugId, getDialogParams, getExpandDirection, getFrame, getHeight, getHeightUnits, getId, getMargin, getMessagesPack, getOwnComponent, getOwnComponents, getParent, getRegisteredComponent, getSpacing, getStyleName, getUiEventListeners, getWidth, getWidthUnits, getWrappedFrame, indexOf, init, isEnabled, isEnabledItself, isExpanded, isResponsive, isValid, isVisible, isVisibleItself, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openFrame, openFrame, openLookup, openLookup, openLookup, openLookup, openWindow, openWindow, registerComponent, remove, removeAction, removeAction, removeAll, removeAllActions, removeStyleName, requestFocus, resetExpanded, setAlignment, setCompanion, setContext, setDebugId, setEnabled, setFrame, setHeight, setId, setMargin, setMessagesPack, setParent, setResponsive, setSpacing, setStyleName, setUiEventListeners, setVisible, setWidth, setWrappedFrame, showMessageDialog, showNotification, showNotification, showNotification, showOptionDialog, showOptionDialog, showValidationErrors, showWebPage, unregisterComponent, unwrap, unwrapComposition, validateequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDialogParams, getMessagesPack, getRegisteredComponent, isValid, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openFrame, openFrame, openLookup, openLookup, openLookup, openLookup, openWindow, openWindow, registerComponent, setContext, setMessagesPack, showMessageDialog, showNotification, showNotification, showNotification, showOptionDialog, showOptionDialog, showWebPage, unregisterComponent, validateexpand, expand, getExpandDirection, isExpanded, resetExpandedadd, getComponent, getComponentNN, indexOfadd, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, remove, removeAlladdStyleName, getAlignment, getDebugId, getHeight, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthUnits, isEnabled, isEnabledItself, isResponsive, isVisible, isVisibleItself, removeStyleName, requestFocus, setAlignment, setDebugId, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapCompositiongetFrame, setFramegetSpacing, setSpacinggetMargin, setMargin, setMargin, setMarginaddAction, addAction, getAction, getActionNN, getActions, removeAction, removeAction, removeAllActionspublic org.dom4j.Element getXmlDescriptor()
getXmlDescriptor in interface Component.HasXmlDescriptorpublic void setXmlDescriptor(org.dom4j.Element element)
setXmlDescriptor in interface Component.HasXmlDescriptorpublic WindowContext getContext()
getContext in interface FramegetContext in interface WindowgetContext in class AbstractFramepublic DsContext getDsContext()
getDsContext in interface FramegetDsContext in class AbstractFrameDsContext of the current frame or windowpublic void setDsContext(DsContext dsContext)
FramesetDsContext in interface FramesetDsContext in class AbstractFrame@Deprecated public void addListener(Window.CloseListener listener)
Window.addCloseListener(CloseListener)WindowaddListener in interface Windowlistener - listener instance@Deprecated public void removeListener(Window.CloseListener listener)
Window.removeCloseListener(CloseListener)removeListener in interface Windowpublic void addCloseListener(Window.CloseListener listener)
WindowaddCloseListener in interface Windowlistener - listener instancepublic void removeCloseListener(Window.CloseListener listener)
removeCloseListener in interface Windowpublic void addCloseWithCommitListener(Window.CloseWithCommitListener listener)
WindowWindow.COMMIT_ACTION_ID.addCloseWithCommitListener in interface Windowlistener - listener instancepublic void removeCloseWithCommitListener(Window.CloseWithCommitListener listener)
removeCloseWithCommitListener in interface Windowpublic java.lang.String getCaption()
getCaption in interface Component.HasCaptiongetCaption in class AbstractFramesetCaption(String)public void setCaption(java.lang.String caption)
AbstractFrame.init(java.util.Map), overrides the value from XML.setCaption in interface Component.HasCaptionsetCaption in class AbstractFramecaption - captionpublic java.lang.String getDescription()
getDescription in interface Component.HasCaptiongetDescription in class AbstractFramepublic void setDescription(java.lang.String description)
setDescription in interface Component.HasCaptionsetDescription in class AbstractFramepublic Window getWrappedWindow()
getWrappedWindow in interface Window.Wrapperpublic void applySettings(Settings settings)
You can override it to restore custom settings.
For example:
public void applySettings(Settings settings) {
super.applySettings(settings);
String visible = settings.get(hintBox.getId()).attributeValue("visible");
if (visible != null)
hintBox.setVisible(Boolean.valueOf(visible));
}
applySettings in interface Windowsettings - settings object loaded from the database for the current userpublic void saveSettings()
saveSettings in interface Windowpublic void deleteSettings()
WindowdeleteSettings in interface Windowpublic void setFocusComponent(java.lang.String componentId)
WindowsetFocusComponent in interface WindowcomponentId - component's ID in XML. If null, then first focusable component will be focusedpublic java.lang.String getFocusComponent()
getFocusComponent in interface Windowpublic Settings getSettings()
getSettings in interface Windowpublic void addTimer(Timer timer)
WindowTimer component to this screen.
ComponentsFactory.createTimer() method.
public Timer getTimer(java.lang.String id)
WindowTimer added to this screen.public boolean validate(java.util.List<Component.Validatable> fields)
Framepublic boolean validateAll()
postValidate(ValidationErrors) hook to
support additional validation.
You should override this method in subclasses ONLY if you want to completely replace the validation process,
otherwise use postValidate(ValidationErrors).
validateAll in interface FramevalidateAll in interface WindowvalidateAll in class AbstractFramepublic WindowManager getWindowManager()
getWindowManager in interface Windowpublic void setWindowManager(WindowManager windowManager)
WindowsetWindowManager in interface Windowpublic DialogOptions getDialogOptions()
getDialogOptions in interface WindowWindowManager.OpenMode.DIALOG.public boolean isAttributeAccessControlEnabled()
public void ready()
public boolean close(java.lang.String actionId)
DsContext,
the confirmation dialog will be shown.
preClose(String)close in interface WindowactionId - action ID that will be propagated to attached CloseListeners.
Use Window.COMMIT_ACTION_ID if some changes have just been committed, or
Window.CLOSE_ACTION_ID otherwise. These constants are recognized by various mechanisms of the
framework.public boolean close(java.lang.String actionId,
boolean force)
DsContext,
and force=false, the confirmation dialog will be shown.
preClose(String)close in interface WindowactionId - action ID that will be propagated to attached CloseListeners.
Use Window.COMMIT_ACTION_ID if some changes have just been committed, or
Window.CLOSE_ACTION_ID otherwise. These constants are recognized by various mechanisms of the
framework.force - if true, no confirmation dialog will be shown even if the screen has uncommitted changespublic void closeAndRun(java.lang.String actionId,
java.lang.Runnable runnable)
closeAndRun in interface Windowpublic ActionsPermissions getActionsPermissions()
getActionsPermissions in interface Component.SecuredActionsHolderpublic java.lang.String getIcon()
getIcon in interface Component.HasIcongetIcon in class AbstractFramepublic void setIcon(java.lang.String icon)
setIcon in interface Component.HasIconsetIcon in class AbstractFramepublic Window.ContentSwitchMode getContentSwitchMode()
WindowgetContentSwitchMode in interface WindowWindow.ContentSwitchMode enum valuespublic void setContentSwitchMode(Window.ContentSwitchMode mode)
WindowsetContentSwitchMode in interface Windowmode - one of the Window.ContentSwitchMode enum valuespublic void addBeforeCloseWithShortcutListener(Window.BeforeCloseWithShortcutListener listener)
WindowaddBeforeCloseWithShortcutListener in interface Windowlistener - the listener to registerpublic void removeBeforeCloseWithShortcutListener(Window.BeforeCloseWithShortcutListener listener)
WindowremoveBeforeCloseWithShortcutListener in interface Windowlistener - the listener to removepublic void addBeforeCloseWithCloseButtonListener(Window.BeforeCloseWithCloseButtonListener listener)
WindowaddBeforeCloseWithCloseButtonListener in interface Windowlistener - the listener to registerpublic void removeBeforeCloseWithCloseButtonListener(Window.BeforeCloseWithCloseButtonListener listener)
WindowremoveBeforeCloseWithCloseButtonListener in interface Windowlistener - the listener to remove