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("All Documents");
ViewColumn vc = view.getColumn(6);
if ((vc.getNumberAttrib() & ViewColumn.ATTR_PARENS) != 0)
System.out.println("Parentheses on negative numbers");
else
System.out.println("No parentheses on negative numbers");
if ((vc.getNumberAttrib() & ViewColumn.ATTR_PERCENT) != 0)
System.out.println("Percent sign");
else
System.out.println("No percent sign");
if ((vc.getNumberAttrib() & ViewColumn.ATTR_PUNCTUATED) != 0)
System.out.println("Punctuated");
else
System.out.println("No punctuated");
} catch(Exception e) {
e.printStackTrace();
}
}
}
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("All Documents");
ViewColumn vc = view.getColumn(6);
vc.setNumberAttrib(ViewColumn.ATTR_PARENS |
ViewColumn.ATTR_PUNCTUATED);
} catch(Exception e) {
e.printStackTrace();
}
}
}
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("All Documents");
ViewColumn vc = view.getColumn(6);
vc.setNumberAttrib(vc.getNumberAttrib() |
ViewColumn.ATTR_PERCENT);
} catch(Exception e) {
e.printStackTrace();
}
}
}
vc.getNumberAttrib() | ViewColumn.ATTR_PARENS
他の属性に影響を与えずに数値属性を 2 つ設定するには、次の形式の論理構成を使用します。
vc.getNumberAttrib() | ViewColumn.ATTR_PARENS |
ViewColumn.ATTR_PUNCTUATED
他の属性に影響を与えずに 1 つの数値属性の設定を解除するには、次の形式の論理構成を使用します。
vc.getNumberAttrib() & ~ViewColumn.ATTR_PARENS
他の属性に影響を与えずに 2 つの数値属性の設定を解除するには、次の形式の論理構成を使用します。
vc.getNumberAttrib() & (~(ATTR_PARENS | ATTR_PUNCTUATED))