例: IsIcon property

次のスクリプトは、列の値がアイコンで表示されるかどうかを調べます。

import lotus.domino.*;
import java.util.Vector;

public class JavaAgent extends AgentBase {

  public void NotesMain() {

    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();

      // (Your code goes here) 
      Database db = agentContext.getCurrentDatabase();
      View view = db.getView("All Documents");
      Vector vcs = view.getColumns();
      for (int i=0; i<vcs.size(); i++) {
        ViewColumn vc = (ViewColumn)vcs.elementAt(i);
        if (vc.isIcon())
          System.out.println("Column " + (i+1) + " is icon");
        else
          System.out.println("Column " + (i+1) + " is not icon");
      }
        
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}