JAVA/CORBA CLASSES


Examples: Alignment
This agent toggles the alignment.

import lotus.domino.*;

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("Categorized");
     ViewColumn vc = view.getColumn(2);
     if (vc.getAlignment() == ViewColumn.ALIGN_LEFT)
       vc.setAlignment(ViewColumn.ALIGN_RIGHT);
     else if (vc.getAlignment() == ViewColumn.ALIGN_RIGHT)
       vc.setAlignment(ViewColumn.ALIGN_CENTER);
     else
       vc.setAlignment(ViewColumn.ALIGN_LEFT);
       
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also