Class BasePopup
java.lang.Object
org.eclnt.jsfserver.defaultscreens.BasePopup
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ModalPopup
,ModelessPopup
Base class for
ModalPopup
and ModelessPopup
.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Listener interface for "popup openers".static interface
static interface
Interface for updating width/height/left/top after the persistence management has loaded the stored popup position and size. -
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected boolean
protected boolean
protected String
protected String
protected boolean
protected boolean
protected boolean
protected String
protected String
protected int
protected int
protected boolean
protected String
protected boolean
protected boolean
protected int
protected String
protected Trigger
protected Integer
protected boolean
protected boolean
protected BasePopup
protected String
protected boolean
protected String
protected BasePopup.IPopupListener
protected String
protected boolean
protected String
protected boolean
protected boolean
protected String
protected String
protected String
protected int
protected boolean
protected BasePopup.IUpdatePersistedPosition
protected boolean
protected int
protected int
protected boolean
protected boolean
protected boolean
static int
Special integer value that you can pass into left/top position for indicating that the popup is to be positioned within the center.static String
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close popup.When a dialog opens up then some animation might directly be triggered.boolean
boolean
boolean
boolean
If set to true then the popup is closed when the user moves the mouse somewhere within the dialogs of the application.boolean
If set to true then the popup is closed when the user leave the popup with the mouse.int
int
getId()
boolean
getImage()
final int
getIndex()
boolean
boolean
getIsnew()
int
getLeft()
Internal use only.boolean
boolean
getOwner()
getPage()
boolean
Expression of the page bean that is associated with the popup.Deprecated.long
boolean
When a dialog opens up then some size animation might be applied.boolean
boolean
By default style class "riscdialog_popup" is used for the dialog's background - but you can define a different style class to be used as well.By default style class "riscdialogdecoration" is used for the style defintion of the decoration - but you can define a different style class to be used as well.getTitle()
Text that is shown as title.int
getTop()
boolean
boolean
int
getWidth()
int
Only applicable for frame-dialogs!boolean
Not used anymore in the RISC client.boolean
boolean
void
By default a decorated dialog shows a close icon.void
By default a decorated dialog shows a maximize icon.void
When closing a popup via the close icon then by default the client side blocks the corresponding roundtrip if there is inconsistent user input (e.g. the user having ignroed a min/max value or a regular expression).static void
initialize
(String defaultBgpaint) Initialize popup look and feel settings - that are applied to all modal and modeless popup dialogs.static void
initializeHeightDeltaDecorated
(int value) When opening decorated popups then the height of the titlebar might change "over time".void
void
maximize
(boolean value) void
onPopupClosedByUser
(javax.faces.event.ActionEvent event) Internal use only.void
open
(String page, String title, int width, int height, BasePopup.IPopupListener popupListener) Open popup.void
void
void
setAnimationtype
(String animationtype) void
setAvoidfocussingofopener
(boolean avoidfocussingofopener) By default a popup re-focusses the component that opened up the popup.void
setAvoidfocussingofpopup
(boolean value) By default a popup dialog receives the focus when being opened.void
setBgpaint
(String bgpaint) By default the BGPAINT of the POPUP is defined by theinitialize(String)
method for all popups of the session.void
setClientname
(String value) The name that is used for identifying the client side popups for e.g. automated test software.void
setCloseonclickoutside
(boolean value) If set to true then the popup is closed when the user clicks outside the popup window.void
setCloseonmouseactivity
(boolean closeonmouseactivity) void
setCloseonmouseexit
(boolean closeonmouseexit) void
setContentReplace
(String value) void
setContentReplaceDrillDown
(String value) void
setHeight
(int height) Set the height in pixels.void
final void
setIndex
(int index) void
setLeft
(int left) Set the "left"-coordinate of the popup.void
Pass element id that is the base for the xy-position calculation on client side.void
Pass element id that is the base for the xy-position calculation on client side.void
Pass element id that is the base for the xy-position calculation on client side.void
setLeftTopMousePosition
(boolean asToolTip) Positions the popup at the current mouse position.void
setLefttopreference
(String value) Deprecated.void
The popup will be positioned on bottom of the component that triggered the opening of the popup.void
The popup will be opened in the center of the screen from which it was opened.void
Pass element id that is the base for the xy-position calculation on client side.void
Pass element id that is the base for the xy-position calculation on client side.void
Pass element id that is the base for the xy-position calculation on client side.void
Pass element id that is the base for the xy-position calculation on client side.void
The popup will be positioned on the left of the component that triggered the opening of the popup.void
The popup will be positioned on the right of the component that triggered the opening of the popup.void
The popup will be positioned on top of the component that triggered the opening of the popup.void
setLeftTopScreenBottom
(boolean sticky) Positions the popup at the very bottom of the screen.void
setLeftTopScreenLeft
(boolean sticky) Positions the popup at the very left of the screen.void
setLeftTopScreenRight
(boolean sticky) Positions the popup at the very right of the screen.void
setLeftTopScreenTop
(boolean sticky) Positions the popup at the very top of the screen.void
setOpacity
(Integer opacity) A dialog may be transparent so that the background of the popup shines through.void
setOpened
(boolean opened) void
void
void
setParentHotkeysActive
(boolean parentHotkeysActive) If set to true then popups of the dialog's parent are processed.void
setPersistid
(String persistid) void
setPopupListener
(BasePopup.IPopupListener popupListener) void
setPopupPageBeanExpression
(String popupPageBeanExpression) void
setPositionShift
(String positionshift) Deprecated.void
setSizeableIfUndecorated
(boolean sizeableIfUndecorated) Only supported in HTML-RISC-Client: if a popup is defined to be undecorated, then this by default means that the user cannot resize it.void
setSizeAnimationtype
(String sizeAnimationtype) void
setSkipBlockingOnClose
(boolean skipBlockingOnClose) Define that the round trip that triggers the closing the popup dialog is executed from the client side without blocking the client.void
setStartfromrootwindow
(boolean value) void
setStyleseq
(String styleseq) void
setStyleseqdecoration
(String styleseqdecoration) void
void
setTop
(int top) Set the "top"-coordinate of the popup.void
setUndecorated
(boolean value) Is set to true then the popup is rendered without border, titlebar and close button.void
setUpdatedPersistedPositionCallBack
(BasePopup.IUpdatePersistedPosition updatedPersistedPositionCallBack) Set interface instance to update the position after applying a persisted position information.void
setUpdateIsolation
(boolean updateisolation) Sets the "updateisolation" attribute in the ROWINCLUDE that is internally managed for the popup.void
setWidth
(int width) Set the width in pixels.void
The width and the height is set to the size that is required by the popup content.void
The width an the height is set to the size of the component that is the reference of this popup dialog.void
setWithanimation
(boolean withanimation) Not used anymore in the RISC client.toString()
-
Field Details
-
WINDOWSTATE_NORMAL
public static final int WINDOWSTATE_NORMAL- See Also:
-
WINDOWSTATE_ICONIFIED
public static final int WINDOWSTATE_ICONIFIED- See Also:
-
WINDOWSTATE_MAXIMIZED
public static final int WINDOWSTATE_MAXIMIZED- See Also:
-
s_defaultBgpaint
-
POS_CENTER
public static int POS_CENTERSpecial integer value that you can pass into left/top position for indicating that the popup is to be positioned within the center. -
m_id
protected int m_id -
m_opened
protected boolean m_opened -
m_undecorated
protected boolean m_undecorated -
m_sizeableIfUndecorated
protected boolean m_sizeableIfUndecorated -
m_page
-
m_title
-
m_left
protected int m_left -
m_top
protected int m_top -
m_width
protected int m_width -
m_height
protected int m_height -
m_windowstate
protected int m_windowstate -
m_lefttopreference
-
m_popupListener
-
m_contentReplace
-
m_contentReplaceDrillDown
-
m_isnew
protected boolean m_isnew -
m_ismaximized
protected boolean m_ismaximized -
m_closeonclickoutside
protected boolean m_closeonclickoutside -
m_closeonmouseexit
protected boolean m_closeonmouseexit -
m_closeonmouseactivity
protected boolean m_closeonmouseactivity -
m_startfromrootwindow
protected boolean m_startfromrootwindow -
m_owner
-
m_updateisolation
protected boolean m_updateisolation -
m_openasframe
protected boolean m_openasframe -
m_image
-
m_avoidfocussingofopener
protected boolean m_avoidfocussingofopener -
m_avoidfocussingofpopup
protected boolean m_avoidfocussingofpopup -
m_opacity
-
m_withanimation
protected boolean m_withanimation -
m_animationtype
-
m_sizeAnimationtype
-
m_bgpaint
-
m_positionshift
-
m_persistid
-
m_updatedPersistedPositionCallBack
-
m_clientname
-
m_styleseq
-
m_styleseqdecoration
-
m_skipBlockingOnClose
protected boolean m_skipBlockingOnClose -
m_withcloseicon
protected boolean m_withcloseicon -
m_withmaximizeicon
protected boolean m_withmaximizeicon -
m_ignoreroundtripvetosonclose
protected boolean m_ignoreroundtripvetosonclose -
m_maxmintrigger
-
m_parentHotkeysActive
protected boolean m_parentHotkeysActive
-
-
Constructor Details
-
BasePopup
public BasePopup()
-
-
Method Details
-
initialize
Initialize popup look and feel settings - that are applied to all modal and modeless popup dialogs. -
initializeHeightDeltaDecorated
public static void initializeHeightDeltaDecorated(int value) When opening decorated popups then the height of the titlebar might change "over time". Instead of having to adapt all popup callers you can centrally define a delta which is added to all heights by default. -
open
public void open(String page, String title, int width, int height, BasePopup.IPopupListener popupListener) Open popup. Call this method prio to any other setting of popup attributes (e.g. width, height, ...).- Parameters:
page
-title
-width
-height
-modalPopupListener
-
-
getId
public int getId() -
getPopupPageBeanExpression
Expression of the page bean that is associated with the popup. -
setPopupPageBeanExpression
-
setAvoidfocussingofopener
public void setAvoidfocussingofopener(boolean avoidfocussingofopener) By default a popup re-focusses the component that opened up the popup. E.g. if the popup was opened by a button then the button is focused when closing the popup. Sometimes you do not want the popup to actively re-focus the opener, e.g. if the opener is part of grid row (focussing a grid row automatically selects the corresponding grid item). -
getAvoidfocussingofopener
public boolean getAvoidfocussingofopener() -
setAvoidfocussingofpopup
public void setAvoidfocussingofpopup(boolean value) By default a popup dialog receives the focus when being opened. You may avoid this - as result the focus stays in the component that opens up the popup. -
getAvoidfocussingofpopup
public boolean getAvoidfocussingofpopup() -
setImage
-
getImage
-
setContentReplace
-
getContentReplace
-
setContentReplaceDrillDown
-
getContentReplaceDrillDown
-
getOpened
public boolean getOpened() -
setOpened
public void setOpened(boolean opened) -
getPage
-
setPage
-
getTitle
Text that is shown as title. -
setTitle
-
setLeft
public void setLeft(int left) Set the "left"-coordinate of the popup. The coordinate is relative to the screen/dialog on top of which the popup is opened. - If using "setLeftTopReference*"-methods then the coordinate is relative to this position. -
getLeft
public int getLeft() -
setTop
public void setTop(int top) Set the "top"-coordinate of the popup. The coordinate is relative to the screen/dialog on top of which the popup is opened. - If using "setLeftTopReference" then the coordinate is relateive to this position. -
getTop
public int getTop() -
setWidth
public void setWidth(int width) Set the width in pixels. If the popup should be sized by its content then do not set the width directly but usesetWidthHeightToDesiredSize()
. -
getWidth
public int getWidth() -
setWidthHeightToDesiredSize
public void setWidthHeightToDesiredSize()The width and the height is set to the size that is required by the popup content. -
setWidthHeightToSizeOfReference
public void setWidthHeightToSizeOfReference()The width an the height is set to the size of the component that is the reference of this popup dialog. The reference is the one that you may set by usingsetLefTopReferenceComponentId(String)
. -
setHeight
public void setHeight(int height) Set the height in pixels. If the popup should be sized by its content then do not set the height directly but usesetWidthHeightToDesiredSize()
. -
getHeight
public int getHeight() -
getWindowstate
public int getWindowstate()Only applicable for frame-dialogs! Otherwise: 0. -
getMaxmintrigger
Internal use only. -
getOwner
-
setOwner
-
setStartfromrootwindow
public void setStartfromrootwindow(boolean value) -
getStartfromrootwindow
public boolean getStartfromrootwindow() -
setOpacity
A dialog may be transparent so that the background of the popup shines through.- Parameters:
opacity
- Value between 0 (fully transparent) and 100 (fully shown).
-
getOpacity
-
getWithanimation
public boolean getWithanimation()Not used anymore in the RISC client. -
setWithanimation
public void setWithanimation(boolean withanimation) Not used anymore in the RISC client. -
getAnimationtype
When a dialog opens up then some animation might directly be triggered. Use the normal animation types, that are available with CaptainCasa. Default is null which means: "no animation".
The animation is executed as animation on top of the content of the dialog. There is a different animation which defines the size of the dialog, which you can defined by callingsetSizeAnimationtype(String)
. -
setAnimationtype
-
getSizeAnimationtype
When a dialog opens up then some size animation might be applied. This means: the popup does not show up immediately but e.g. grows from top to bottom, or it rotates. -
setSizeAnimationtype
-
setClientname
The name that is used for identifying the client side popups for e.g. automated test software. If not explicitly set then the name of the page will be used. -
getClientname
-
getLefttopreference
-
setLefttopreference
Deprecated.Internal use only! -
getIgnoreroundtripvetosonclose
public boolean getIgnoreroundtripvetosonclose() -
toString
-
setLefTopReferenceComponentId
Pass element id that is the base for the xy-position calculation on client side. -
setLeftTopReferenceComponentIdRight
Pass element id that is the base for the xy-position calculation on client side. The y-position is the top border of the refernced component, not the top as withsetLefTopReferenceComponentId(String)
. The x-position is the right border of the referenced component.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLeftTopReferenceRight
public void setLeftTopReferenceRight()The popup will be positioned on the right of the component that triggered the opening of the popup.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLeftTopReferenceComponentIdLeft
Pass element id that is the base for the xy-position calculation on client side. The popup is positioned on the left of the component.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLeftTopReferenceLeft
public void setLeftTopReferenceLeft()The popup will be positioned on the left of the component that triggered the opening of the popup.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLeftTopReferenceBottom
public void setLeftTopReferenceBottom()The popup will be positioned on bottom of the component that triggered the opening of the popup.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLefTopReferenceComponentIdBottom
Pass element id that is the base for the xy-position calculation on client side. The y-position is the bottom border of the refernced component, not the top as withsetLefTopReferenceComponentId(String)
.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLeftTopReferenceTop
public void setLeftTopReferenceTop()The popup will be positioned on top of the component that triggered the opening of the popup.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLefTopReferenceComponentIdTop
Pass element id that is the base for the xy-position calculation on client side. THe popup is positioned above the component.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLeftTopReferenceCentered
public void setLeftTopReferenceCentered()The popup will be opened in the center of the screen from which it was opened.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLeftTopReferenceComponentIdCentered
Pass element id that is the base for the xy-position calculation on client side. The popup is positioned on top of the center of the component.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLeftTopReferenceComponentIdOver
Pass element id that is the base for the xy-position calculation on client side. The popup is positioned directly over the xy-position of the component, so that the popup's left-top corner is directly positioned on top of the left-top-corner of the component.
Please note: you may always apply additional positioning information by usingsetLeft(int)
andsetTop(int)
. This additional information is then calculated on top of the basic positioning. -
setLeftTopScreenBottom
public void setLeftTopScreenBottom(boolean sticky) Positions the popup at the very bottom of the screen. -
setLeftTopScreenTop
public void setLeftTopScreenTop(boolean sticky) Positions the popup at the very top of the screen. -
setLeftTopScreenLeft
public void setLeftTopScreenLeft(boolean sticky) Positions the popup at the very left of the screen. -
setLeftTopScreenRight
public void setLeftTopScreenRight(boolean sticky) Positions the popup at the very right of the screen. -
setLeftTopMousePosition
public void setLeftTopMousePosition(boolean asToolTip) Positions the popup at the current mouse position. Only is useable in scenarios in which the popup is opened by mouse-operations! Example: popups that are opened as tooltip popups.- Parameters:
asToolTip
- Set to true if the popup is uses as tooltip popup. In this case the popup will be positioned a little bit away from the current mouse position. Otherwise the popup may immediately close because the mouse cursor is not on top of the requesting component anymore (but on top of the popup dialog).
-
setUndecorated
public void setUndecorated(boolean value) Is set to true then the popup is rendered without border, titlebar and close button. -
getUndecorated
public boolean getUndecorated() -
setSizeableIfUndecorated
public void setSizeableIfUndecorated(boolean sizeableIfUndecorated) Only supported in HTML-RISC-Client: if a popup is defined to be undecorated, then this by default means that the user cannot resize it. You may override this behavior by defining this attribute to be true. -
getSizeableIfUndecorated
public boolean getSizeableIfUndecorated() -
getUpdateIsolation
public boolean getUpdateIsolation() -
setUpdateIsolation
public void setUpdateIsolation(boolean updateisolation) Sets the "updateisolation" attribute in the ROWINCLUDE that is internally managed for the popup. By setting "updateisolation" to true all events within the popup will not affect the re-rendering of non-popup areas. This improves server side performance within the request processing. -
setCloseonclickoutside
public void setCloseonclickoutside(boolean value) If set to true then the popup is closed when the user clicks outside the popup window. Only valid for modeless popups! -
getCloseonclickoutside
public boolean getCloseonclickoutside() -
getCloseonmouseexit
public boolean getCloseonmouseexit()If set to true then the popup is closed when the user leave the popup with the mouse. Only valid for modeless popups! -
setCloseonmouseexit
public void setCloseonmouseexit(boolean closeonmouseexit) -
getCloseonmouseactivity
public boolean getCloseonmouseactivity()If set to true then the popup is closed when the user moves the mouse somewhere within the dialogs of the application. This is usable for light weight popups e.g. only showing some message, which should disappear by the user "shaking the mouse"... -
setCloseonmouseactivity
public void setCloseonmouseactivity(boolean closeonmouseactivity) -
getIsnew
public boolean getIsnew() -
getIsmaximized
public boolean getIsmaximized() -
getOpenasframe
public boolean getOpenasframe() -
getRequestFocus
public long getRequestFocus() -
requestFocus
public void requestFocus() -
getIndex
public final int getIndex() -
setIndex
public final void setIndex(int index) -
getStyleseq
By default style class "riscdialog_popup" is used for the dialog's background - but you can define a different style class to be used as well. -
setStyleseq
-
getStyleseqdecoration
By default style class "riscdialogdecoration" is used for the style defintion of the decoration - but you can define a different style class to be used as well. The style class should subclass from "riscdialogdecorationall". -
setStyleseqdecoration
-
getBgpaint
-
setBgpaint
By default the BGPAINT of the POPUP is defined by theinitialize(String)
method for all popups of the session. But you can explicitly define a BGPAINT for the current popup. -
setPositionShift
Deprecated.This function is not supported within the RISC client anymore, due to transparent dialogs being much easier and much more straight forward implemented than in the Java Swing/FX client. -
getPositionShift
Deprecated. -
setUpdatedPersistedPositionCallBack
public void setUpdatedPersistedPositionCallBack(BasePopup.IUpdatePersistedPosition updatedPersistedPositionCallBack) Set interface instance to update the position after applying a persisted position information. Only makes sense together with property "persistid"setPersistid(String)
. -
getUpdatedPersistedPositionCallBack
-
setSkipBlockingOnClose
public void setSkipBlockingOnClose(boolean skipBlockingOnClose) Define that the round trip that triggers the closing the popup dialog is executed from the client side without blocking the client. Default is false. - Handle with care and only set to true if the closing of the popup does not update other parts of the dialog - but just closes the dialog. -
getSkipBlockingOnClose
public boolean getSkipBlockingOnClose() -
hideCloseIcon
public void hideCloseIcon()By default a decorated dialog shows a close icon. You can avoid this by callinghideCloseIcon()
. -
getWithcloseicon
public boolean getWithcloseicon() -
hideMaximizeIcon
public void hideMaximizeIcon()By default a decorated dialog shows a maximize icon. You can avoid this by callinghideMaximizeIcon()
. -
getWithmaximizeicon
public boolean getWithmaximizeicon() -
close
public void close()Close popup. -
onPopupClosedByUser
public void onPopupClosedByUser(javax.faces.event.ActionEvent event) Internal use only. This is the method called by the client when the user closes the popup using the close-corner-button of the popup. -
maximize
public void maximize(boolean value) -
getPopupListener
-
setPopupListener
-
getPersistid
-
setPersistid
-
persistPosition
public void persistPosition() -
loadPersistedPosition
public void loadPersistedPosition() -
ignoreRoundtripVetosOnClose
public void ignoreRoundtripVetosOnClose()When closing a popup via the close icon then by default the client side blocks the corresponding roundtrip if there is inconsistent user input (e.g. the user having ignroed a min/max value or a regular expression). The value if the field is reset and the user is notified by some text message. - By calling this method this "veto-ing" of roundtrips is overruled. The resetting of field input is executed but does not veto the roundtrip that initiated it.
Please call this method with great care! It is only use-able for certain scenarios. Example: you want to close popup and the data values of the popup are ignored anyway. -
setParentHotkeysActive
public void setParentHotkeysActive(boolean parentHotkeysActive) If set to true then popups of the dialog's parent are processed. Otherwise (and by default) any hotkey processing is only done with reference to these hotkeys that are defined in the popup itself. The popup dialog by default some "hotkey barrier" - with setting this property you can explicitly open up this barrier. -
getParentHotkeysActive
public boolean getParentHotkeysActive()
-