Class CmsContentTranslationProgressView

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.opencms.ade.contenteditor.client.CmsContentTranslationProgressView
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget

public class CmsContentTranslationProgressView extends com.google.gwt.user.client.ui.Composite
Displays the progress about a translation job while said job is running on the server.

Also allows a user to try to abort the job.

  • Nested Class Summary

    Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

    com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.google.gwt.user.client.ui.HTML
    The label used to display the progress.
    static final int
    Length of the progress check interval in milliseconds.

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    CmsContentTranslationProgressView(org.opencms.util.CmsUUID jobId, org.opencms.ade.contenteditor.shared.rpc.I_CmsContentServiceAsync service, Consumer<org.opencms.ade.contenteditor.shared.CmsContentAugmentationDetails> action)
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Gets information about the job progress from the server, and if the job isn't finished, schedules another progress check.
    Gets the dialog buttons.
    protected void
     
    void
    setAction(Consumer<org.opencms.ade.contenteditor.shared.CmsContentAugmentationDetails> action)
    Sets the action to execute after the job has finished.
    void
    Sets the popup in which this widget is displayed.
    static void
    showDialog(org.opencms.util.CmsUUID jobId, org.opencms.ade.contenteditor.shared.rpc.I_CmsContentServiceAsync service, Consumer<org.opencms.ade.contenteditor.shared.CmsContentAugmentationDetails> action)
    Displays a popup containing a widget of this class.

    Methods inherited from class com.google.gwt.user.client.ui.Composite

    claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget

    Methods inherited from class com.google.gwt.user.client.ui.Widget

    addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents

    Methods inherited from class com.google.gwt.user.client.ui.UIObject

    addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • PROGRESS_CHECK_INTERVAL

      public static final int PROGRESS_CHECK_INTERVAL
      Length of the progress check interval in milliseconds.
      See Also:
    • m_message

      @UiField protected com.google.gwt.user.client.ui.HTML m_message
      The label used to display the progress.
  • Constructor Details

    • CmsContentTranslationProgressView

      public CmsContentTranslationProgressView(org.opencms.util.CmsUUID jobId, org.opencms.ade.contenteditor.shared.rpc.I_CmsContentServiceAsync service, Consumer<org.opencms.ade.contenteditor.shared.CmsContentAugmentationDetails> action)
      Creates a new instance.
      Parameters:
      jobId - the id of the job whose progress to check
      service - the content service
      action - the action to execute after the job has finished
  • Method Details

    • showDialog

      public static void showDialog(org.opencms.util.CmsUUID jobId, org.opencms.ade.contenteditor.shared.rpc.I_CmsContentServiceAsync service, Consumer<org.opencms.ade.contenteditor.shared.CmsContentAugmentationDetails> action)
      Displays a popup containing a widget of this class.
      Parameters:
      jobId - the ID of the job whose progress should be checked
      service - the content service
      action - the action to execute after the translation has finished
    • getButtons

      Gets the dialog buttons.
      Returns:
      the dialog buttons
    • setAction

      public void setAction(Consumer<org.opencms.ade.contenteditor.shared.CmsContentAugmentationDetails> action)
      Sets the action to execute after the job has finished.
      Parameters:
      action -
    • setPopup

      public void setPopup(CmsPopup popup)
      Sets the popup in which this widget is displayed.
      Parameters:
      popup - the popup
    • checkProgress

      protected void checkProgress()
      Gets information about the job progress from the server, and if the job isn't finished, schedules another progress check.
    • onLoad

      protected void onLoad()
      Overrides:
      onLoad in class com.google.gwt.user.client.ui.Widget
      See Also:
      • Widget.onLoad()