JAVA/CORBA クラス


例:HeaderFontColor プロパティ
次のエージェントは、ビューの列ヘッダーのフォントの色を黒と青の間で切り替えます。

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("By category");
ViewColumn vc = view.getColumn(1);
if (vc.getHeaderFontColor() == RichTextStyle.COLOR_BLACK) {
vc.setHeaderFontColor(RichTextStyle.COLOR_BLUE);
System.out.println("Header font color = blue");
}
else {
vc.setHeaderFontColor(RichTextStyle.COLOR_BLACK);
System.out.println("Header font color = black");
}

} catch(Exception e) {
e.printStackTrace();
}
}
}

関連項目