[]
        
立即试用
(Showing Draft Content)

Event

Class Event

java.lang.Object
com.grapecity.documents.excel.Event<T>

public final class Event<T> extends Object
表示一个事件。
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addListener(String methodName, T namedEventHandlerMethod)
    添加一个命名的事件监听器。
    void
    addListener(T unnamedEventHandlerMethod)
    添加一个未命名的事件监听器。
    返回所有已注册的事件监听器的列表。 包含所有已注册事件监听器的列表。
    void
    removeListener(String methodName)
    从事件中移除先前注册的监听器。
    void
    removeListener(T unnamedEventHandlerMethod)
    移除先前注册的事件监听器。
    int
    返回已注册的事件监听器的总数。

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Event

      public Event()
  • Method Details

    • addListener

      public void addListener(String methodName, T namedEventHandlerMethod)
      添加一个命名的事件监听器。
      Parameters:
      methodName - 与事件监听器关联的名称。
      namedEventHandlerMethod - 要添加的命名事件监听器。
    • removeListener

      public void removeListener(String methodName)
      从事件中移除先前注册的监听器。
      Parameters:
      methodName - 要移除的事件监听器关联的名称。
    • addListener

      public void addListener(T unnamedEventHandlerMethod)
      添加一个未命名的事件监听器。
      Parameters:
      unnamedEventHandlerMethod - 要添加的未命名事件监听器
    • removeListener

      public void removeListener(T unnamedEventHandlerMethod)
      移除先前注册的事件监听器。
      Parameters:
      unnamedEventHandlerMethod - 要移除的未命名事件监听器。
    • listeners

      public List<T> listeners()
      返回所有已注册的事件监听器的列表。 包含所有已注册事件监听器的列表。
    • size

      public int size()
      返回已注册的事件监听器的总数。
      Returns:
      已注册事件监听器的总数。