Class BasePopup

java.lang.Object
org.eclnt.jsfserver.defaultscreens.BasePopup
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ModalPopup, ModelessPopup

public abstract class BasePopup extends Object implements Serializable
Base class for ModalPopup and ModelessPopup.
See Also:
  • 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

      public static String s_defaultBgpaint
    • POS_CENTER

      public static int POS_CENTER
      Special 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

      protected String m_page
    • m_title

      protected String 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

      protected String m_lefttopreference
    • m_popupListener

      protected BasePopup.IPopupListener m_popupListener
    • m_contentReplace

      protected String m_contentReplace
    • m_contentReplaceDrillDown

      protected String 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

      protected BasePopup m_owner
    • m_updateisolation

      protected boolean m_updateisolation
    • m_openasframe

      protected boolean m_openasframe
    • m_image

      protected String m_image
    • m_avoidfocussingofopener

      protected boolean m_avoidfocussingofopener
    • m_avoidfocussingofpopup

      protected boolean m_avoidfocussingofpopup
    • m_opacity

      protected Integer m_opacity
    • m_withanimation

      protected boolean m_withanimation
    • m_animationtype

      protected String m_animationtype
    • m_sizeAnimationtype

      protected String m_sizeAnimationtype
    • m_bgpaint

      protected String m_bgpaint
    • m_positionshift

      protected String m_positionshift
    • m_persistid

      protected String m_persistid
    • m_updatedPersistedPositionCallBack

      protected BasePopup.IUpdatePersistedPosition m_updatedPersistedPositionCallBack
    • m_clientname

      protected String m_clientname
    • m_styleseq

      protected String m_styleseq
    • m_styleseqdecoration

      protected String 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

      protected Trigger m_maxmintrigger
    • m_parentHotkeysActive

      protected boolean m_parentHotkeysActive
  • Constructor Details

    • BasePopup

      public BasePopup()
  • Method Details

    • initialize

      public static void initialize(String defaultBgpaint)
      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

      public String getPopupPageBeanExpression()
      Expression of the page bean that is associated with the popup.
    • setPopupPageBeanExpression

      public void setPopupPageBeanExpression(String popupPageBeanExpression)
    • 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

      public void setImage(String value)
    • getImage

      public String getImage()
    • setContentReplace

      public void setContentReplace(String value)
    • getContentReplace

      public String getContentReplace()
    • setContentReplaceDrillDown

      public void setContentReplaceDrillDown(String value)
    • getContentReplaceDrillDown

      public String getContentReplaceDrillDown()
    • getOpened

      public boolean getOpened()
    • setOpened

      public void setOpened(boolean opened)
    • getPage

      public String getPage()
    • setPage

      public void setPage(String page)
    • getTitle

      public String getTitle()
      Text that is shown as title.
    • setTitle

      public void setTitle(String title)
    • 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 use setWidthHeightToDesiredSize().
    • 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 using setLefTopReferenceComponentId(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 use setWidthHeightToDesiredSize().
    • getHeight

      public int getHeight()
    • getWindowstate

      public int getWindowstate()
      Only applicable for frame-dialogs! Otherwise: 0.
    • getMaxmintrigger

      public Trigger getMaxmintrigger()
      Internal use only.
    • getOwner

      public BasePopup getOwner()
    • setOwner

      public void setOwner(BasePopup value)
    • setStartfromrootwindow

      public void setStartfromrootwindow(boolean value)
    • getStartfromrootwindow

      public boolean getStartfromrootwindow()
    • setOpacity

      public void setOpacity(Integer opacity)
      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

      public Integer 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

      public String 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 calling setSizeAnimationtype(String).
    • setAnimationtype

      public void setAnimationtype(String animationtype)
    • getSizeAnimationtype

      public String 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

      public void setSizeAnimationtype(String sizeAnimationtype)
    • setClientname

      public void setClientname(String value)
      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

      public String getClientname()
    • getLefttopreference

      public String getLefttopreference()
    • setLefttopreference

      @Deprecated public void setLefttopreference(String value)
      Deprecated.
      Internal use only!
    • getIgnoreroundtripvetosonclose

      public boolean getIgnoreroundtripvetosonclose()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setLefTopReferenceComponentId

      public void setLefTopReferenceComponentId(String value)
      Pass element id that is the base for the xy-position calculation on client side.
    • setLeftTopReferenceComponentIdRight

      public void setLeftTopReferenceComponentIdRight(String value)
      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 with setLefTopReferenceComponentId(String). The x-position is the right border of the referenced component.

      Please note: you may always apply additional positioning information by using setLeft(int) and setTop(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 using setLeft(int) and setTop(int). This additional information is then calculated on top of the basic positioning.
    • setLeftTopReferenceComponentIdLeft

      public void setLeftTopReferenceComponentIdLeft(String value)
      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 using setLeft(int) and setTop(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 using setLeft(int) and setTop(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 using setLeft(int) and setTop(int). This additional information is then calculated on top of the basic positioning.
    • setLefTopReferenceComponentIdBottom

      public void setLefTopReferenceComponentIdBottom(String value)
      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 with setLefTopReferenceComponentId(String).

      Please note: you may always apply additional positioning information by using setLeft(int) and setTop(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 using setLeft(int) and setTop(int). This additional information is then calculated on top of the basic positioning.
    • setLefTopReferenceComponentIdTop

      public void setLefTopReferenceComponentIdTop(String value)
      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 using setLeft(int) and setTop(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 using setLeft(int) and setTop(int). This additional information is then calculated on top of the basic positioning.
    • setLeftTopReferenceComponentIdCentered

      public void setLeftTopReferenceComponentIdCentered(String value)
      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 using setLeft(int) and setTop(int). This additional information is then calculated on top of the basic positioning.
    • setLeftTopReferenceComponentIdOver

      public void setLeftTopReferenceComponentIdOver(String value)
      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 using setLeft(int) and setTop(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

      public String 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

      public void setStyleseq(String styleseq)
    • getStyleseqdecoration

      public String 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

      public void setStyleseqdecoration(String styleseqdecoration)
    • getBgpaint

      public String getBgpaint()
    • setBgpaint

      public void setBgpaint(String bgpaint)
      By default the BGPAINT of the POPUP is defined by the initialize(String) method for all popups of the session. But you can explicitly define a BGPAINT for the current popup.
    • setPositionShift

      @Deprecated public void setPositionShift(String positionshift)
      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 public String 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

      public BasePopup.IUpdatePersistedPosition 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 calling hideCloseIcon().
    • getWithcloseicon

      public boolean getWithcloseicon()
    • hideMaximizeIcon

      public void hideMaximizeIcon()
      By default a decorated dialog shows a maximize icon. You can avoid this by calling hideMaximizeIcon().
    • 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

      public BasePopup.IPopupListener getPopupListener()
    • setPopupListener

      public void setPopupListener(BasePopup.IPopupListener popupListener)
    • getPersistid

      public String getPersistid()
    • setPersistid

      public void setPersistid(String persistid)
    • 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()