Class NativeEditWidget

java.lang.Object
com.google.gwt.core.client.JavaScriptObject
org.opencms.ade.contenteditor.widgetregistry.client.NativeEditWidget

public final class NativeEditWidget extends com.google.gwt.core.client.JavaScriptObject
Overlay object for native java script widgets.

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Gets the display direction for popups used by this widget using the 'getDisplayingDirection' JavaScript method (or returns "none" if that method isn't available).
    protected com.google.gwt.dom.client.Element
    Returns the widget element.
    protected String
    Returns the widget value.
    protected boolean
    Returns if the widget is active.
    protected void
    Call when the widget was added into the window document.
    protected void
    setActive(boolean active)
    Sets the widget active.
    protected void
    Sets the widget value.
    protected void
    setValue(String value, boolean fireEvent)
    Sets the widget value.
    protected void
    setWidgetInfo(String label, String help)
    Sets the widget label and help text.
    boolean
     
    wrapWidget(I_CmsEditWidget widget, boolean isFormWidget)
    Wraps a GWT edit widget instance to be used from within another GWT module.

    Methods inherited from class com.google.gwt.core.client.JavaScriptObject

    cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • wrapWidget

      public static NativeEditWidget wrapWidget(I_CmsEditWidget widget, boolean isFormWidget)
      Wraps a GWT edit widget instance to be used from within another GWT module.

      Parameters:
      widget - the widget to wrap
      isFormWidget - in case of a form widget
      Returns:
      the wrapping native java script object
    • shouldSetDefaultWhenDisabled

      public boolean shouldSetDefaultWhenDisabled()
    • getDisplayingDirection

      Gets the display direction for popups used by this widget using the 'getDisplayingDirection' JavaScript method (or returns "none" if that method isn't available).
      Returns:
      the direction in which this widget displays popups ('above', 'below' or 'none')
    • getElement

      protected com.google.gwt.dom.client.Element getElement()
      Returns the widget element.

      Returns:
      the widget element
    • getValue

      protected String getValue()
      Returns the widget value.

      Returns:
      the widget value
    • isActive

      protected boolean isActive()
      Returns if the widget is active.

      Returns:
      true if the widget is active
    • onAttachWidget

      protected void onAttachWidget()
      Call when the widget was added into the window document.

    • setActive

      protected void setActive(boolean active)
      Sets the widget active.

      Parameters:
      active - true to activate the widget
    • setValue

      protected void setValue(String value)
      Sets the widget value.

      Parameters:
      value - the value
    • setValue

      protected void setValue(String value, boolean fireEvent)
      Sets the widget value.

      Parameters:
      value - the value
      fireEvent - true to fire the value change event
    • setWidgetInfo

      protected void setWidgetInfo(String label, String help)
      Sets the widget label and help text.

      Parameters:
      label - the widget label text
      help - the widget help text