JAVA/CORBA クラス


例:境界合わせ
次のエージェントは、アライメントを切り替えます。

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();
}
}
}

関連項目