Class ClipboardEvent

    • Field Detail

      • GSON

        protected static final com.google.gson.Gson GSON
    • Constructor Detail

    • Method Detail

      • getEvent

        public static ClipboardEvent getEvent​(org.zkoss.zk.au.AuRequest request)
      • isSuccess

        public boolean isSuccess()
        Checks if the clipboard operation was successful.
        Returns:
        true if the operation succeeded, false otherwise
      • getResult

        public ClipboardResult getResult()
        Gets the clipboard result.
        Returns:
        the clipboard result (ClipboardText or ClipboardImage)
      • isTextResult

        public boolean isTextResult()
        Checks if this is a text result.
        Returns:
        true if the result contains text data
      • getClipboardText

        public ClipboardText getClipboardText()
        Calling isTextResult() before calling this method. Gets the clipboard text if available.
        Returns:
        the ClipboardText result, or null if this is not a text result
      • getClipboardImage

        public ClipboardImage getClipboardImage()
        Calling isTextResult() before calling this method. Gets the clipboard image if available.
        Returns:
        the ClipboardImage result, or null if this is not an image result
      • parseResponse

        protected static ClipboardResult parseResponse​(Map<String,​Object> data)
        Parses the AU request data from JavaScript clipboard operations into a ClipboardResult object.
        Parameters:
        data - The AU request data map
        Returns:
        ClipboardResult containing the parsed data