本文整理了Java中org.dom4j.swing.XMLTableModel
类的一些代码示例,展示了XMLTableModel
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLTableModel
类的具体详情如下:
包路径:org.dom4j.swing.XMLTableModel
类名称:XMLTableModel
[英]XMLTableDefinition
repro.
[中]XMLTableDefinition
复制。
代码示例来源:origin: org.dom4j/dom4j
public Object getValueAt(int rowIndex, int columnIndex) {
try {
Object row = getRowValue(rowIndex);
return definition.getValueAt(row, columnIndex);
} catch (Exception e) {
handleException(e);
return null;
}
}
代码示例来源:origin: org.dom4j/dom4j
public Object getRowValue(int rowIndex) {
return getRows().get(rowIndex);
}
代码示例来源:origin: dom4j/dom4j
public void testServletTableViaXMLDescription() throws Exception {
Document definition = getDocument("/xml/swing/tableForWeb.xml");
Document document = getDocument("/xml/web.xml");
XMLTableModel tableModel = new XMLTableModel(definition, document);
// now lets test the values come out
assertEquals("correct row count", tableModel.getRowCount(), 2);
assertEquals("correct column count", tableModel.getColumnCount(), 3);
assertColumnNameEquals(tableModel, 0, "Name");
assertColumnNameEquals(tableModel, 1, "Class");
assertColumnNameEquals(tableModel, 2, "Mapping");
assertCellEquals(tableModel, 0, 0, "snoop");
assertCellEquals(tableModel, 1, 0, "file");
assertCellEquals(tableModel, 0, 1, "SnoopServlet");
assertCellEquals(tableModel, 1, 1, "ViewFile");
assertCellEquals(tableModel, 0, 2, "/foo/snoop");
assertCellEquals(tableModel, 1, 2, "");
}
代码示例来源:origin: dom4j/dom4j
public void testServletTable() throws Exception {
Document document = getDocument("/xml/web.xml");
XMLTableDefinition tableDefinition = new XMLTableDefinition();
tableDefinition.setRowExpression("/web-app/servlet");
tableDefinition.addStringColumn("Name", "servlet-name");
tableDefinition.addStringColumn("Class", "servlet-class");
String mapping = "../servlet-mapping[servlet-name=$Name]/url-pattern";
tableDefinition.addStringColumn("Mapping", mapping);
XMLTableModel tableModel = new XMLTableModel(tableDefinition, document);
// now lets test the values come out
assertEquals("correct row count", tableModel.getRowCount(), 2);
assertEquals("correct column count", tableModel.getColumnCount(), 3);
assertColumnNameEquals(tableModel, 0, "Name");
assertColumnNameEquals(tableModel, 1, "Class");
assertColumnNameEquals(tableModel, 2, "Mapping");
assertCellEquals(tableModel, 0, 0, "snoop");
assertCellEquals(tableModel, 1, 0, "file");
assertCellEquals(tableModel, 0, 1, "SnoopServlet");
assertCellEquals(tableModel, 1, 1, "ViewFile");
assertCellEquals(tableModel, 0, 2, "/foo/snoop");
assertCellEquals(tableModel, 1, 2, "");
}
代码示例来源:origin: maven/dom4j
public Object getValueAt(int rowIndex, int columnIndex) {
try {
Object row = getRowValue(rowIndex);
return definition.getValueAt(row, columnIndex);
} catch (Exception e) {
handleException(e);
return null;
}
}
代码示例来源:origin: org.dom4j/dom4j
public int getRowCount() {
return getRows().size();
}
代码示例来源:origin: dom4j/dom4j
public Object getValueAt(int rowIndex, int columnIndex) {
try {
Object row = getRowValue(rowIndex);
return definition.getValueAt(row, columnIndex);
} catch (Exception e) {
handleException(e);
return null;
}
}
代码示例来源:origin: dom4j/dom4j
public int getRowCount() {
return getRows().size();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
public Object getValueAt(int rowIndex, int columnIndex) {
try {
Object row = getRowValue(rowIndex);
return definition.getValueAt(row, columnIndex);
} catch (Exception e) {
handleException(e);
return null;
}
}
代码示例来源:origin: dom4j/dom4j
public Object getRowValue(int rowIndex) {
return getRows().get(rowIndex);
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
public Object getValueAt(int rowIndex, int columnIndex) {
try {
Object row = getRowValue(rowIndex);
return definition.getValueAt(row, columnIndex);
} catch (Exception e) {
handleException(e);
return null;
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
public int getRowCount() {
return getRows().size();
}
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
public Object getValueAt(int rowIndex, int columnIndex) {
try {
Object row = getRowValue(rowIndex);
return definition.getValueAt(row, columnIndex);
} catch (Exception e) {
handleException(e);
return null;
}
}
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
public int getRowCount() {
return getRows().size();
}
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
public Object getValueAt(int rowIndex, int columnIndex) {
try {
Object row = getRowValue(rowIndex);
return definition.getValueAt(row, columnIndex);
} catch (Exception e) {
handleException(e);
return null;
}
}
代码示例来源:origin: maven/dom4j
public Object getRowValue(int rowIndex) {
return getRows().get(rowIndex);
}
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
public Object getValueAt(int rowIndex, int columnIndex) {
try {
Object row = getRowValue(rowIndex);
return definition.getValueAt(row, columnIndex);
} catch (Exception e) {
handleException(e);
return null;
}
}
代码示例来源:origin: maven/dom4j
public int getRowCount() {
return getRows().size();
}
代码示例来源:origin: apache/servicemix-bundles
public Object getValueAt(int rowIndex, int columnIndex) {
try {
Object row = getRowValue(rowIndex);
return definition.getValueAt(row, columnIndex);
} catch (Exception e) {
handleException(e);
return null;
}
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
public int getRowCount() {
return getRows().size();
}
内容来源于网络,如有侵权,请联系作者删除!