com.vaadin.ui.

Class Image

    • Constructor Detail

      • Image

        public Image()

        Creates a new empty Image.

      • Image

        public Image(String caption)

        Creates a new empty Image with caption.

        Parameters:

        caption -

      • Image

        public Image(String caption,
                     Resource source)

        Creates a new Image whose contents is loaded from given resource. The dimensions are assumed if possible. The type is guessed from resource.

        Parameters:

        caption -

        source - the Source of the embedded object.

    • Method Detail

      • getState

        protected ImageState getState()

        Description copied from class: AbstractComponent

        Returns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().

        Overrides:

        getState in class AbstractEmbedded

        Returns:

        updated component shared state

      • addClickListener

        public void addClickListener(MouseEvents.ClickListener listener)

        Add a click listener to the component. The listener is called whenever the user clicks inside the component. Depending on the content the event may be blocked and in that case no event is fired. Use #removeClickListener(ClickListener) to remove the listener.

        Parameters:

        listener - The listener to add

      • removeClickListener

        public void removeClickListener(MouseEvents.ClickListener listener)

        Remove a click listener from the component. The listener should earlier have been added using #addClickListener(ClickListener).

        Parameters:

        listener - The listener to remove