本文整理了Java中org.dom4j.swing.XMLTableColumnDefinition
类的一些代码示例,展示了XMLTableColumnDefinition
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLTableColumnDefinition
类的具体详情如下:
包路径:org.dom4j.swing.XMLTableColumnDefinition
类名称:XMLTableColumnDefinition
[英]XMLTableColumnDefinition
a column within a table definition.
[中]XMLTableColumnDefinition
表定义中的一列。
代码示例来源:origin: org.dom4j/dom4j
public void addColumn(String name, String expression, int type) {
XPath xpath = createColumnXPath(expression);
addColumn(new XMLTableColumnDefinition(name, xpath, type));
}
代码示例来源:origin: org.dom4j/dom4j
public XMLTableColumnDefinition(String name, String expression, int type) {
this.name = name;
this.type = type;
this.xpath = createXPath(expression);
}
代码示例来源:origin: org.dom4j/dom4j
public Class<?> getColumnClass(int columnIndex) {
return getColumn(columnIndex).getColumnClass();
}
代码示例来源:origin: org.dom4j/dom4j
public XMLTableColumnDefinition getColumn(String columnName) {
if (columnNameIndex == null) {
columnNameIndex = new HashMap<String, XMLTableColumnDefinition>();
for (XMLTableColumnDefinition column : columns) {
columnNameIndex.put(column.getName(), column);
}
}
return (XMLTableColumnDefinition) columnNameIndex.get(columnName);
}
代码示例来源:origin: org.dom4j/dom4j
public synchronized Object getValueAt(Object row, int columnIndex) {
XMLTableColumnDefinition column = getColumn(columnIndex);
Object answer = null;
synchronized (this) {
this.rowValue = row;
answer = column.getValue(row);
this.rowValue = null;
}
return answer;
}
代码示例来源:origin: org.dom4j/dom4j
/**
* DOCUMENT ME!
*
* @param columnIndex
* DOCUMENT ME!
*
* @return the XPath expression used to evaluate the value of cells in this
* column
*/
public XPath getColumnXPath(int columnIndex) {
return getColumn(columnIndex).getXPath();
}
代码示例来源:origin: org.dom4j/dom4j
/**
* DOCUMENT ME!
*
* @param columnIndex
* DOCUMENT ME!
*
* @return the XPath expresssion used to create the column name, if there is
* one or null if there is no XPath expression to name the column.
*/
public XPath getColumnNameXPath(int columnIndex) {
return getColumn(columnIndex).getColumnNameXPath();
}
代码示例来源:origin: org.dom4j/dom4j
/**
* Loads an XML table definition from an XML definition document
*
* @param definition
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
public static XMLTableDefinition load(Element definition) {
XMLTableDefinition answer = new XMLTableDefinition();
answer.setRowExpression(definition.attributeValue("select"));
for (Iterator<Element> iter = definition.elementIterator("column"); iter
.hasNext();) {
Element element = iter.next();
String expression = element.attributeValue("select");
String name = element.getText();
String typeName = element.attributeValue("type", "string");
String columnXPath = element.attributeValue("columnNameXPath");
int type = XMLTableColumnDefinition.parseType(typeName);
if (columnXPath != null) {
answer.addColumnWithXPathName(columnXPath, expression, type);
} else {
answer.addColumn(name, expression, type);
}
}
return answer;
}
代码示例来源:origin: org.dom4j/dom4j
/**
* DOCUMENT ME!
*
* @param columnIndex
* DOCUMENT ME!
*
* @return the static column name. This is used if there is no
* columnNameXPath
*/
public String getColumnName(int columnIndex) {
return getColumn(columnIndex).getName();
}
代码示例来源:origin: org.dom4j/dom4j
public Object getVariableValue(String namespaceURI, String prefix,
String localName) {
XMLTableColumnDefinition column = getColumn(localName);
if (column != null) {
return column.getValue(rowValue);
}
return null;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
/**
* DOCUMENT ME!
*
* @param columnIndex
* DOCUMENT ME!
*
* @return the XPath expression used to evaluate the value of cells in this
* column
*/
public XPath getColumnXPath(int columnIndex) {
return getColumn(columnIndex).getXPath();
}
代码示例来源:origin: dom4j/dom4j
/**
* DOCUMENT ME!
*
* @param columnIndex
* DOCUMENT ME!
*
* @return the XPath expresssion used to create the column name, if there is
* one or null if there is no XPath expression to name the column.
*/
public XPath getColumnNameXPath(int columnIndex) {
return getColumn(columnIndex).getColumnNameXPath();
}
代码示例来源:origin: dom4j/dom4j
/**
* Loads an XML table definition from an XML definition document
*
* @param definition
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
public static XMLTableDefinition load(Element definition) {
XMLTableDefinition answer = new XMLTableDefinition();
answer.setRowExpression(definition.attributeValue("select"));
for (Iterator<Element> iter = definition.elementIterator("column"); iter
.hasNext();) {
Element element = iter.next();
String expression = element.attributeValue("select");
String name = element.getText();
String typeName = element.attributeValue("type", "string");
String columnXPath = element.attributeValue("columnNameXPath");
int type = XMLTableColumnDefinition.parseType(typeName);
if (columnXPath != null) {
answer.addColumnWithXPathName(columnXPath, expression, type);
} else {
answer.addColumn(name, expression, type);
}
}
return answer;
}
代码示例来源:origin: apache/servicemix-bundles
public XMLTableColumnDefinition getColumn(String columnName) {
if (columnNameIndex == null) {
columnNameIndex = new HashMap<String, XMLTableColumnDefinition>();
for (XMLTableColumnDefinition column : columns) {
columnNameIndex.put(column.getName(), column);
}
}
return (XMLTableColumnDefinition) columnNameIndex.get(columnName);
}
代码示例来源:origin: org.dom4j/dom4j
public void addColumnWithXPathName(String columnNameXPathExpression,
String expression, int type) {
XPath columnNameXPath = createColumnXPath(columnNameXPathExpression);
XPath xpath = createColumnXPath(expression);
addColumn(new XMLTableColumnDefinition(columnNameXPath, xpath, type));
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
public Object getVariableValue(String namespaceURI, String prefix,
String localName) {
XMLTableColumnDefinition column = getColumn(localName);
if (column != null) {
return column.getValue(rowValue);
}
return null;
}
代码示例来源:origin: dom4j/dom4j
public XMLTableColumnDefinition(String name, String expression, int type) {
this.name = name;
this.type = type;
this.xpath = createXPath(expression);
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
/**
* DOCUMENT ME!
*
* @param columnIndex
* DOCUMENT ME!
*
* @return the XPath expression used to evaluate the value of cells in this
* column
*/
public XPath getColumnXPath(int columnIndex) {
return getColumn(columnIndex).getXPath();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
/**
* DOCUMENT ME!
*
* @param columnIndex
* DOCUMENT ME!
*
* @return the XPath expresssion used to create the column name, if there is
* one or null if there is no XPath expression to name the column.
*/
public XPath getColumnNameXPath(int columnIndex) {
return getColumn(columnIndex).getColumnNameXPath();
}
代码示例来源:origin: dom4j/dom4j
public Class<?> getColumnClass(int columnIndex) {
return getColumn(columnIndex).getColumnClass();
}
内容来源于网络,如有侵权,请联系作者删除!