Class CmsImageFormatsForm

  • All Implemented Interfaces:
    com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.ValueChangeHandler<java.lang.String>, com.google.gwt.event.shared.EventHandler, 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 CmsImageFormatsForm
    extends com.google.gwt.user.client.ui.Composite
    implements com.google.gwt.event.logical.shared.ValueChangeHandler<java.lang.String>, com.google.gwt.event.dom.client.KeyPressHandler
    Image format form.

    Since:
    8.0.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static interface  CmsImageFormatsForm.I_CmsImageFormatsFormUiBinder
      GWT ui-binder.
      • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addFormatSelectOption​(java.lang.String value, java.lang.String label)
      Adds a format select option.
      java.lang.String getFormatSelectValue()
      Returns the selected format value.
      int getHeightInput()
      Returns the height input or -1 if input is empty or not valid.
      int getWidthInput()
      Returns the width input or -1 if input is empty or not valid.
      void onKeyPress​(com.google.gwt.event.dom.client.KeyPressEvent event)  
      void onValueChange​(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.String> event)  
      protected void openCropping​(com.google.gwt.event.dom.client.ClickEvent event)
      Opens the cropping dialog on crop button click.
      protected void removeCropping​(com.google.gwt.event.dom.client.ClickEvent event)
      Removes the cropping on button click.
      protected void resetSize​(com.google.gwt.event.dom.client.ClickEvent event)
      Resets the size on button click.
      void setCropped​(boolean cropped)
      Enables/disables buttons and input fields necessary if the image if cropped.
      void setFormatSelectValue​(java.lang.String value)
      Sets the format select value.
      void setFormEnabled​(boolean enabled)
      Sets the format form enabled.
      void setHeightInput​(int height)
      Sets the height input field.
      void setHeightInputEnabled​(boolean enabled)
      Enables the height input field.
      void setRatioButton​(boolean down, boolean enabled, java.lang.String disableMessage)
      Sets the state of the ratio lock button.
      void setWidthInput​(int width)
      Sets the width input field.
      void setWidthInputEnabled​(boolean enabled)
      Enables the width input field.
      protected void toggleRatioLock​(com.google.gwt.event.dom.client.ClickEvent event)
      Toggle the ratio lock on button click.
      • 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, onLoad, 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
    • Method Detail

      • addFormatSelectOption

        public void addFormatSelectOption​(java.lang.String value,
                                          java.lang.String label)
        Adds a format select option.

        Parameters:
        value - the option value
        label - the option label
      • getFormatSelectValue

        public java.lang.String getFormatSelectValue()
        Returns the selected format value.

        Returns:
        the selected format value
      • getHeightInput

        public int getHeightInput()
        Returns the height input or -1 if input is empty or not valid.

        Returns:
        the height input
      • getWidthInput

        public int getWidthInput()
        Returns the width input or -1 if input is empty or not valid.

        Returns:
        the width input
      • onKeyPress

        public void onKeyPress​(com.google.gwt.event.dom.client.KeyPressEvent event)
        Specified by:
        onKeyPress in interface com.google.gwt.event.dom.client.KeyPressHandler
        See Also:
        KeyPressHandler.onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent)
      • onValueChange

        public void onValueChange​(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.String> event)
        Specified by:
        onValueChange in interface com.google.gwt.event.logical.shared.ValueChangeHandler<java.lang.String>
        See Also:
        ValueChangeHandler.onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)
      • setCropped

        public void setCropped​(boolean cropped)
        Enables/disables buttons and input fields necessary if the image if cropped.

        Parameters:
        cropped - true if the image is cropped
      • setFormatSelectValue

        public void setFormatSelectValue​(java.lang.String value)
        Sets the format select value.

        Parameters:
        value - the value
      • setFormEnabled

        public void setFormEnabled​(boolean enabled)
        Sets the format form enabled.

        Parameters:
        enabled - if true the form will be enabled
      • setHeightInput

        public void setHeightInput​(int height)
        Sets the height input field.

        Parameters:
        height - the value
      • setHeightInputEnabled

        public void setHeightInputEnabled​(boolean enabled)
        Enables the height input field.

        Parameters:
        enabled - true to enable the input field
      • setRatioButton

        public void setRatioButton​(boolean down,
                                   boolean enabled,
                                   java.lang.String disableMessage)
        Sets the state of the ratio lock button.

        Parameters:
        down - if true button will be set down / lock open
        enabled - if true button will be enabled
        disableMessage - message to show for disabled button
      • setWidthInput

        public void setWidthInput​(int width)
        Sets the width input field.

        Parameters:
        width - the value
      • setWidthInputEnabled

        public void setWidthInputEnabled​(boolean enabled)
        Enables the width input field.

        Parameters:
        enabled - true to enable the input field
      • openCropping

        @UiHandler("m_cropButton")
        protected void openCropping​(com.google.gwt.event.dom.client.ClickEvent event)
        Opens the cropping dialog on crop button click.

        Parameters:
        event - the click event
      • removeCropping

        @UiHandler("m_removeCropButton")
        protected void removeCropping​(com.google.gwt.event.dom.client.ClickEvent event)
        Removes the cropping on button click.

        Parameters:
        event - the click event
      • resetSize

        @UiHandler("m_resetSize")
        protected void resetSize​(com.google.gwt.event.dom.client.ClickEvent event)
        Resets the size on button click.

        Parameters:
        event - the click event
      • toggleRatioLock

        @UiHandler("m_ratioLock")
        protected void toggleRatioLock​(com.google.gwt.event.dom.client.ClickEvent event)
        Toggle the ratio lock on button click.

        Parameters:
        event - the click event