JAVA/CORBA CLASSES


Examples: Alignment and HeaderAlignment properties
This agent prints the alignment of the column and the column header.

import lotus.domino.*;
import java.util.Vector;
public class JavaAgent extends AgentBase {
 
 String theAlignment(int n) {
   String align = null;
   switch (n) {
     case ViewColumn.ALIGN_CENTER : align = "center"; break;
     case ViewColumn.ALIGN_LEFT : align = "left";break;
     case ViewColumn.ALIGN_RIGHT : align = "right"; break; }
   return align; }
 public void NotesMain() {
   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();
     // (Your code goes here)
     Database db = agentContext.getCurrentDatabase();
     View view = db.getView("By Category");
     Vector columns = view.getColumns();
     for (int i=0; i<columns.size(); i++) {
       ViewColumn column = (ViewColumn)columns.elementAt(i);
       System.out.println(column.getPosition() +
       " Alignment = " + theAlignment(column.getAlignment())
       + ", Header alignment = " +
       theAlignment(column.getHeaderAlignment())); }
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also