本文整理汇总了Java中com.lowagie.text.ListItem类的典型用法代码示例。如果您正苦于以下问题:Java ListItem类的具体用法?Java ListItem怎么用?Java ListItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ListItem类属于com.lowagie.text包,在下文中一共展示了ListItem类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: write
import com.lowagie.text.ListItem; //导入依赖的package包/类
public void write(PDFDocument document, PdfPTable tabla) throws DocumentException {
com.lowagie.text.List list = new com.lowagie.text.List(false,10f);
list.setListSymbol(new Chunk("\u2022"));
PdfPCell cell = new PdfPCell();
if(!titulo.equals(""))
{
cell.addElement(new Phrase(titulo,document.getContext().getDefaultFont()));
}
for(int i=0; i<campos.size(); i++)
{
list.add(new ListItem((String)campos.get(i),document.getContext().getDefaultFont()));
}
cell.addElement(list);
cell.setPaddingLeft(30f);
cell.setBorder(Rectangle.LEFT | Rectangle.RIGHT);
cell.setColspan(2);
tabla.addCell(cell);
}
开发者ID:GovernIB,项目名称:sistra,代码行数:24,代码来源:Lista.java
示例2: writeIntElements
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* creates the intentional elements in the report
*
* @param document
* the document in which the report is created
* @param grlspec
* the grl specification used to retrieve elements
*/
public void writeIntElements(Document document, GRLspec grlspec) {
try {
document.add(new Paragraph(Messages.getString("ReportDataDictionary.IntentionalElements"), header1Font)); //$NON-NLS-1$
List list1 = new List(List.ORDERED);
list1.setIndentationLeft(10);
for (Iterator iter = grlspec.getIntElements().iterator(); iter.hasNext();) {
// generate report documentation for intentional elements (name, description, criticality, priority)
IntentionalElement intElement = (IntentionalElement) iter.next();
list1.add(new ListItem(ReportUtils
.getParagraphWithSeparator(document, intElement.getName(), ": ", intElement.getDescription(), descriptionFont))); //$NON-NLS-1$
}
document.add(list1);
} catch (Exception e) {
jUCMNavErrorDialog error = new jUCMNavErrorDialog(e.getMessage());
e.printStackTrace();
}
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:30,代码来源:ReportDataDictionary.java
示例3: writeActors
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* creates the actors in the report
*
* @param document
* the document in which the report is created
* @param grlspec
* the grl specification used to retrieve elements
*/
public void writeActors(Document document, GRLspec grlspec) {
try {
document.add(new Paragraph(Messages.getString("ReportDataDictionary.Actors"), header1Font)); //$NON-NLS-1$
List list1 = new List(List.ORDERED);
list1.setIndentationLeft(10);
for (Iterator iter = grlspec.getActors().iterator(); iter.hasNext();) {
// generate report documentation for actors(name, description)
Actor actor = (Actor) iter.next();
list1.add(new ListItem(ReportUtils.getParagraphWithSeparator(document, actor.getName(), ": ", actor.getDescription(), descriptionFont))); //$NON-NLS-1$
}
document.add(list1);
} catch (Exception e) {
jUCMNavErrorDialog error = new jUCMNavErrorDialog(e.getMessage());
e.printStackTrace();
}
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:30,代码来源:ReportDataDictionary.java
示例4: writeResponsibilities
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* creates the responsibilities in the report
*
* @param document
* the document in which the report is created
* @param urndef
* the urn definition used to retrieve elements
*/
public void writeResponsibilities(Document document, URNdefinition urndef) {
try {
document.add(new Paragraph(Messages.getString("ReportDataDictionary.Responsibilities"), header1Font)); //$NON-NLS-1$
List list1 = new List(List.ORDERED);
list1.setIndentationLeft(10);
for (Iterator iter = urndef.getResponsibilities().iterator(); iter.hasNext();) {
Responsibility responsibility = (Responsibility) iter.next();
list1.add(new ListItem(ReportUtils.getParagraphWithSeparator(document, responsibility.getName(), ": ", responsibility.getDescription(), //$NON-NLS-1$
descriptionFont)));
}
document.add(list1);
} catch (Exception e) {
jUCMNavErrorDialog error = new jUCMNavErrorDialog(e.getMessage());
e.printStackTrace();
}
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:29,代码来源:ReportDataDictionary.java
示例5: writeComponents
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* creates the responsibilities in the report
*
* @param document
* the document in which the report is created
* @param urndef
* the urn definition used to retrieve elements
*/
public void writeComponents(Document document, URNdefinition urndef) {
try {
document.add(new Paragraph(Messages.getString("ReportDataDictionary.Components"), header1Font)); //$NON-NLS-1$
List list1 = new List(List.ORDERED);
list1.setIndentationLeft(10);
for (Iterator iter = urndef.getComponents().iterator(); iter.hasNext();) {
Component component = (Component) iter.next();
list1
.add(new ListItem(ReportUtils.getParagraphWithSeparator(document, component.getName(), ": ", component.getDescription(), //$NON-NLS-1$
descriptionFont)));
}
document.add(list1);
} catch (Exception e) {
jUCMNavErrorDialog error = new jUCMNavErrorDialog(e.getMessage());
e.printStackTrace();
}
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:30,代码来源:ReportDataDictionary.java
示例6: addList
import com.lowagie.text.ListItem; //导入依赖的package包/类
private void addList(List list, float left, float right, int alignment) {
PdfChunk chunk;
PdfChunk overflow;
ArrayList allActions = new ArrayList();
processActions(list, null, allActions);
int aCounter = 0;
for (Iterator it = list.getItems().iterator(); it.hasNext();) {
Element ele = (Element)it.next();
switch (ele.type()) {
case Element.LISTITEM:
ListItem item = (ListItem)ele;
line = new PdfLine(left + item.getIndentationLeft(), right, alignment, item.getLeading());
line.setListItem(item);
for (Iterator j = item.getChunks().iterator(); j.hasNext();) {
chunk = new PdfChunk((Chunk) j.next(), (PdfAction) (allActions.get(aCounter++)));
while ((overflow = line.add(chunk)) != null) {
addLine(line);
line = new PdfLine(left + item.getIndentationLeft(), right, alignment, item.getLeading());
chunk = overflow;
}
line.resetAlignment();
addLine(line);
line = new PdfLine(left + item.getIndentationLeft(), right, alignment, leading);
}
break;
case Element.LIST:
List sublist = (List)ele;
addList(sublist, left + sublist.getIndentationLeft(), right, alignment);
break;
}
}
}
开发者ID:albfernandez,项目名称:itext2,代码行数:33,代码来源:PdfCell.java
示例7: writeScenarioGroups
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* creates the scenario groups in the report
*
* @param document
* the document in which the report is created
* @param ucmspec
* the ucm specification used to retrieve elements
*/
public void writeScenarioGroups(Document document, UCMspec ucmspec) {
try {
document.add(new Paragraph(Messages.getString("ReportDataDictionary.UCMScenarioGroupsDocumentation"), header1Font)); //$NON-NLS-1$
for (Iterator iter = ucmspec.getScenarioGroups().iterator(); iter.hasNext();) {
ScenarioGroup group = (ScenarioGroup) iter.next();
// generate report documentation for ScenarioGroup
if (group != null) {
// create list for this scenario group
String sScenarioGroupName = new String(group.getName());
List list1 = new List(List.UNORDERED);
list1.add(new ListItem(sScenarioGroupName + ":")); //$NON-NLS-1$
document.add(list1);
if (group.getScenarios() != null) {
// scenario description
List list2 = new List(List.ORDERED);
for (Iterator iterator = group.getScenarios().iterator(); iterator.hasNext();) {
// create a list for the scenario group
ScenarioDef scen = (ScenarioDef) iterator.next();
list2.setIndentationLeft(10);
list2.add(new ListItem(ReportUtils
.getParagraphWithSeparator(document, scen.getName(), ": ", scen.getDescription(), descriptionFont))); //$NON-NLS-1$
}
document.add(list2);
}
}
}
// TODO get scenarios diagrams
} catch (Exception e) {
jUCMNavErrorDialog error = new jUCMNavErrorDialog(e.getMessage());
e.printStackTrace();
}
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:47,代码来源:ReportDataDictionary.java
示例8: writeVariables
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* creates the variables in the report
*
* @param document
* the document in which the report is created
* @param ucmspec
* the ucm specification used to retrieve elements
*/
public void writeVariables(Document document, UCMspec ucmspec) {
try {
document.add(new Paragraph(Messages.getString("ReportDataDictionary.Variables"), header1Font)); //$NON-NLS-1$
List list1 = new List(List.ORDERED);
for (Iterator iter = ucmspec.getVariables().iterator(); iter.hasNext();) {
// generate report documentation for variables
Variable var = (Variable) iter.next();
if (var != null) {
String varName = var.getName();
String varType = var.getType();
String varDescription = var.getDescription();
list1.setIndentationLeft(10);
if (var.getEnumerationType() != null) {
// the variable type is enumeration
String enumType = var.getEnumerationType().getName();
list1.add(new ListItem(ReportUtils.getParagraphWithSeparator(document, var.getName() + Messages.getString("ReportDataDictionary.ParEnum") + enumType + Messages.getString("ReportDataDictionary.ParEnumClose"), ": ", var //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
.getDescription(), descriptionFont)));
} else
list1.add(new ListItem(ReportUtils.getParagraphWithSeparator(document, var.getName() + " (" + varType + ")", ": ", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
var.getDescription(), descriptionFont)));
}
}
document.add(list1);
} catch (Exception e) {
jUCMNavErrorDialog error = new jUCMNavErrorDialog(e.getMessage());
e.printStackTrace();
}
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:43,代码来源:ReportDataDictionary.java
示例9: createListItem
import com.lowagie.text.ListItem; //导入依赖的package包/类
public static ListItem createListItem(ChainedProperties props) {
ListItem p = new ListItem();
createParagraph(p, props);
return p;
}
开发者ID:albfernandez,项目名称:itext2,代码行数:6,代码来源:FactoryProperties.java
示例10: createListItem
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* This method returns a {@link IdentifiableEntityData} with the given text as specific einput.
*
* @param text
* The text.
* @param font
* {@link Font} to apply on the element.
* @return a {@link IdentifiableEntityData}.
*/
public static Element createListItem(String text, Font font) {
ListItem item = new ListItem(text);
if (font != null) {
item.setFont(font);
}
return item;
}
开发者ID:Communote,项目名称:communote-server,代码行数:18,代码来源:RtfElementFactory.java
示例11: setListItem
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* Sets the listsymbol of this line.
* <P>
* This is only necessary for the first line of a <CODE>ListItem</CODE>.
*
* @param listItem the list symbol
*/
public void setListItem(ListItem listItem) {
this.listSymbol = listItem.getListSymbol();
this.symbolIndent = listItem.getIndentationLeft();
}
开发者ID:albfernandez,项目名称:itext2,代码行数:13,代码来源:PdfLine.java
示例12: RtfListItem
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* Constructs a RtfListItem for a ListItem belonging to a RtfDocument.
*
* @param doc The RtfDocument this RtfListItem belongs to.
* @param listItem The ListItem this RtfListItem is based on.
*/
public RtfListItem(RtfDocument doc, ListItem listItem) {
super(doc, listItem);
}
开发者ID:albfernandez,项目名称:itext2,代码行数:10,代码来源:RtfListItem.java
示例13: getListItem
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* Creates a ListItem object based on a list of properties.
* @param attributes
* @return a ListItem
*/
public static ListItem getListItem(Properties attributes) {
ListItem item = new ListItem(getParagraph(attributes));
return item;
}
开发者ID:albfernandez,项目名称:itext2,代码行数:10,代码来源:ElementFactory.java
示例14: setListItem
import com.lowagie.text.ListItem; //导入依赖的package包/类
/**
* Sets the listsymbol of this line.
* <P>
* This is only necessary for the first line of a <CODE>ListItem</CODE>.
*
* @param listItem the list symbol
*/
public void setListItem(ListItem listItem) {
this.listSymbol = new PdfChunk(listItem.listSymbol(), null);
this.symbolIndent = listItem.indentationLeft();
}
开发者ID:MesquiteProject,项目名称:MesquiteArchive,代码行数:13,代码来源:PdfLine.java
注:本文中的com.lowagie.text.ListItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论