Class ImageButtonElement


  • public class ImageButtonElement
    extends InputElement
    Represents an InputElement which is an image.

    When an image element on a form is submitted, the x and y coordinates that the user clicked will be sent to the server.

    See Also:
    Form
    • Constructor Detail

      • ImageButtonElement

        public ImageButtonElement​(long cPtr,
                                  boolean cMemoryOwn)
        For internal use only. Of no interest to the user.
        Parameters:
        cPtr - pointer to the CPP wrapped object
        cMemoryOwn - indicates if this object is responsible for memory management of the CPP object
    • Method Detail

      • getCPtr

        public static long getCPtr​(ImageButtonElement obj)
        For internal use only. Of no interest to the user.
        Parameters:
        obj - a reference to an object of this class
        Returns:
        a long containing the address of the CPP wrapped object
      • isSuccessfulControl

        public boolean isSuccessfulControl()
        Returns true if this ImageButtonElement represents a successful control. A successful control is valid for submission. Every successful control has its control name and current value submitted when the form is sent to the web server.
        Overrides:
        isSuccessfulControl in class InputElement
        Returns:
        true if this ImageButtonElement represents a successful control
      • getX

        public int getX()
        Get the value of the X coordinate that will be sent to the server
        Returns:
        the value of the X coordinate that will be sent to the server
      • setX

        public void setX​(int x)
        Set the value of the X coordinate that will be sent to the server
        Parameters:
        x - the value of the X coordinate that will be sent to the server
      • getY

        public int getY()
        Get the value of the Y coordinate that will be sent to the server
        Returns:
        the value of the Y coordinate that will be sent to the server
      • setY

        public void setY​(int y)
        Set the value of the Y coordinate that will be sent to the server
        Parameters:
        y - the value of the Y coordinate that will be sent to the server
      • clone

        public HtmlElement clone()
        Description copied from class: HtmlElement
        Creates a copy of this HTML element.
        Overrides:
        clone in class InputElement
        Returns:
        a new HtmlElement object which is an exact copy of this HTML element