当前位置: 首页>>代码示例>>Java>>正文


Java List类代码示例

本文整理汇总了Java中com.lowagie.text.List的典型用法代码示例。如果您正苦于以下问题:Java List类的具体用法?Java List怎么用?Java List使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


List类属于com.lowagie.text包,在下文中一共展示了List类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handleImportMappings

import com.lowagie.text.List; //导入依赖的package包/类
/**
 * Imports the mappings defined in the RtfImportMappings into the
 * RtfImportHeader of this RtfParser2.
 * 
 * @param importMappings 
 * 		The RtfImportMappings to import.
 * @since 2.1.3
 */
private void handleImportMappings(RtfImportMappings importMappings) {
	Iterator it = importMappings.getFontMappings().keySet().iterator();
	while(it.hasNext()) {
		String fontNr = (String) it.next();
		this.importMgr.importFont(fontNr, (String) importMappings.getFontMappings().get(fontNr));
	}
	it = importMappings.getColorMappings().keySet().iterator();
	while(it.hasNext()) {
		String colorNr = (String) it.next();
		this.importMgr.importColor(colorNr, (Color) importMappings.getColorMappings().get(colorNr));
	}
	it = importMappings.getListMappings().keySet().iterator();
	while(it.hasNext()) {
		String listNr = (String) it.next();
		this.importMgr.importList(listNr, (String)importMappings.getListMappings().get(listNr));
	}
	it = importMappings.getStylesheetListMappings().keySet().iterator();
	while(it.hasNext()) {
		String stylesheetListNr = (String) it.next();
		this.importMgr.importStylesheetList(stylesheetListNr, (List) importMappings.getStylesheetListMappings().get(stylesheetListNr));
	}
	
}
 
开发者ID:albfernandez,项目名称:itext2,代码行数:32,代码来源:RtfParser.java

示例2: handleBlogFilter

import com.lowagie.text.List; //导入依赖的package包/类
/**
 * This method handles the filtered blogs.
 *
 * @param resourcesManager
 *            {@link ResourceBundleManager}.
 * @param locale
 *            The locale.
 * @param filters
 *            {@link List}.
 * @param utpExt
 *            {@link TaggingCoreItemUTPExtension}.
 */
private void handleBlogFilter(ResourceBundleManager resourcesManager, Locale locale,
        List filters, TaggingCoreItemUTPExtension utpExt) {
    if (utpExt.getBlogFilter() != null) {
        Collection<Blog> blogs = ServiceLocator.instance().getService(BlogManagement.class)
                .findBlogsById(utpExt.getBlogFilter());
        if (blogs != null && blogs.size() > 0) {
            Collection<String> titles = new ArrayList<String>(blogs.size());
            String localizedBlogTitle = StringUtils.EMPTY;
            for (Blog b : blogs) {
                localizedBlogTitle = b.getTitle();
                titles.add(localizedBlogTitle);
            }
            filters.add(RtfElementFactory.createListItem(resourcesManager.getText(
                    "export.postlist.filter.blog", locale, StringUtils.join(titles, ", "))));
        }
    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:30,代码来源:RtfNoteWriter.java

示例3: handleFollowFavoriteDirectOnly

import com.lowagie.text.List; //导入依赖的package包/类
/**
 * Handles the flags denoting whether only favorite, followed or direct items are to be
 * retrieved.
 *
 * @param queryInstance
 *            The {@link NoteQueryParameters}
 * @param locale
 *            The locale.
 * @param resourcesManager
 *            {@link ResourceBundleManager}.
 * @param filters
 *            Filters as {@link List}.
 */
private void handleFollowFavoriteDirectOnly(NoteQueryParameters queryInstance, Locale locale,
        ResourceBundleManager resourcesManager, List filters) {
    if (queryInstance.isRetrieveOnlyFollowedItems()) {
        filters.add(RtfElementFactory.createListItem(resourcesManager.getText(
                "export.postlist.filter.follow", locale)));
    }
    if (queryInstance.isFavorites()) {
        filters.add(RtfElementFactory.createListItem(resourcesManager.getText(
                "export.postlist.filter.favorite", locale)));
    }
    if (queryInstance.isDirectMessage()) {
        filters.add(RtfElementFactory.createListItem(resourcesManager.getText(
                "export.postlist.filter.direct.only", locale)));
    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:29,代码来源:RtfNoteWriter.java

示例4: handleParentPostFilter

import com.lowagie.text.List; //导入依赖的package包/类
/**
 * This method handles the parent post.
 *
 * @param resourcesManager
 *            {@link ResourceBundleManager}.
 * @param dateFormatter
 *            Date formatter.
 * @param locale
 *            The local.
 * @param filters
 *            Filters as {@link List}.
 * @param utpExt
 *            {@link TaggingCoreItemUTPExtension}.
 * @throws NoteNotFoundException
 *             exception.
 * @throws AuthorizationException
 *             Exception.
 */
private void handleParentPostFilter(ResourceBundleManager resourcesManager,
        DateFormat dateFormatter, Locale locale, List filters,
        TaggingCoreItemUTPExtension utpExt) throws NoteNotFoundException,
        AuthorizationException {
    if (utpExt.getParentPostId() == null) {
        return;
    }
    // no need to pass a render mode and trigger the pre-processors because we are only
    // interested in the author
    NoteData noteData = ServiceLocator.instance().getService(NoteService.class)
            .getNote(utpExt.getParentPostId(), new NoteRenderContext(null, locale));
    if (noteData != null) {
        filters.add(RtfElementFactory.createListItem(resourcesManager.getText(
                "export.postlist.filter.parentpost", locale,
                UserNameHelper.getDetailedUserSignature(noteData.getUser()),
                dateFormatter.format(noteData.getCreationDate().getTime()))));
    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:37,代码来源:RtfNoteWriter.java

示例5: handleTagsFilter

import com.lowagie.text.List; //导入依赖的package包/类
/**
 * This method handles the set tags.
 *
 * @param tagFormula
 *            the tag formula
 * @param tagIds
 *            Id's of filtered tags.
 * @param locale
 *            The locale.
 * @param resourcesManager
 *            The {@link ResourceBundleManager}.
 * @param filters
 *            The filters to be added to.
 */
private void handleTagsFilter(LogicalTagFormula tagFormula, Set<Long> tagIds, Locale locale,
        ResourceBundleManager resourcesManager, List filters) {
    String tags = FilterParameterResolver.getInstance().resolveTags(tagFormula);
    if (tagIds != null && !tagIds.isEmpty()) {
        tags = StringUtils.isBlank(tags) ? "" : tags + ",";
        TagManagement tagManagement = ServiceLocator.instance().getService(TagManagement.class);
        String prefix = "";
        for (Long tagId : tagIds) {
            Tag storedTag = tagManagement.findTag(tagId);
            if (storedTag != null) {
                tags = tags + prefix + storedTag.getName();
                prefix = ",";
            }
        }
    }
    if (StringUtils.isNotBlank(tags)) {
        filters.add(RtfElementFactory.createListItem(resourcesManager.getText(
                "export.postlist.filter.tags", locale, tags)));
    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:35,代码来源:RtfNoteWriter.java

示例6: handleUsersFilter

import com.lowagie.text.List; //导入依赖的package包/类
/**
 * This method handles the users to be notified filter string.
 *
 * @param resourcesManager
 *            The {@link ResourceBundleManager}.
 * @param locale
 *            The locale.
 * @param filters
 *            The list of filters.
 * @param usersToBeNotifiedAsLong
 *            The list of users.
 */
private void handleUsersFilter(ResourceBundleManager resourcesManager, Locale locale,
        List filters, Long[] usersToBeNotifiedAsLong) {
    if (!ArrayUtils.isEmpty(usersToBeNotifiedAsLong)) {
        final Collection<String> usersToBeNotified = new ArrayList<String>();
        for (Long id : usersToBeNotifiedAsLong) {
            ServiceLocator.findService(UserManagement.class).getUserById(id,
                    new Converter<User, Object>() {
                @Override
                public Object convert(User source) {
                    usersToBeNotified.add(UserNameHelper
                            .getDetailedUserSignature(source));
                    return null;
                }
            });
        }
        if (!usersToBeNotified.isEmpty()) {
            filters.add(RtfElementFactory.createListItem(resourcesManager.getText(
                    "export.postlist.filter.usernotify", locale,
                    StringUtils.join(usersToBeNotified, ", "))));
        }
    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:35,代码来源:RtfNoteWriter.java

示例7: writeIntElements

import com.lowagie.text.List; //导入依赖的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

示例8: writeActors

import com.lowagie.text.List; //导入依赖的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

示例9: writeResponsibilities

import com.lowagie.text.List; //导入依赖的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

示例10: writeComponents

import com.lowagie.text.List; //导入依赖的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

示例11: addList

import com.lowagie.text.List; //导入依赖的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

示例12: processActions

import com.lowagie.text.List; //导入依赖的package包/类
/**
 * Processes all actions contained in the cell.
 * @param element	an element in the cell
 * @param action	an action that should be coupled to the cell
 * @param allActions
 */

protected void processActions(Element element, PdfAction action, ArrayList allActions) {
    if (element.type() == Element.ANCHOR) {
        String url = ((Anchor) element).getReference();
        if (url != null) {
            action = new PdfAction(url);
        }
    }
    Iterator i;
    switch (element.type()) {
        case Element.PHRASE:
        case Element.SECTION:
        case Element.ANCHOR:
        case Element.CHAPTER:
        case Element.LISTITEM:
        case Element.PARAGRAPH:
            for (i = ((ArrayList) element).iterator(); i.hasNext();) {
                processActions((Element) i.next(), action, allActions);
            }
            break;
        case Element.CHUNK:
            allActions.add(action);
            break;
        case Element.LIST:
            for (i = ((List) element).getItems().iterator(); i.hasNext();) {
                processActions((Element) i.next(), action, allActions);
            }
            break;
        default:
            int n = element.getChunks().size();
            while (n-- > 0)
                allActions.add(action);
            break;
    }
}
 
开发者ID:albfernandez,项目名称:itext2,代码行数:42,代码来源:PdfCell.java

示例13: importStylesheetList

import com.lowagie.text.List; //导入依赖的package包/类
/**
 * Imports a stylesheet list value. The stylesheet number for the stylesheet defined
 * is determined and then the resulting mapping is added.
 */
public boolean importStylesheetList(String listNr, List listIn) {
    RtfList rtfList = new RtfList(this.rtfDoc, listIn);
    rtfList.setRtfDocument(this.rtfDoc);
    // TODO HGS - Finish implementation of import
    //this.importStylesheetListMapping.put(listNr, Integer.toString(this.rtfDoc.getDocumentHeader().getRtfParagraphStyle(styleName)(rtfList)));
    return true;
}
 
开发者ID:albfernandez,项目名称:itext2,代码行数:12,代码来源:RtfImportMgr.java

示例14: handleDatesFilter

import com.lowagie.text.List; //导入依赖的package包/类
/**
 * This method handles the start and end date of filters.
 *
 * @param queryInstance
 *            The {@link NoteQueryParameters}
 * @param locale
 *            The locale.
 * @param dateFormatter
 *            Date formater.
 * @param resourcesManager
 *            {@link ResourceBundleManager}.
 * @param filters
 *            Filters as {@link List}.
 */
private void handleDatesFilter(NoteQueryParameters queryInstance, Locale locale,
        DateFormat dateFormatter, ResourceBundleManager resourcesManager, List filters) {
    String startDateString = (queryInstance.getLowerTagDate() != null) ? dateFormatter
            .format(queryInstance.getLowerTagDate()) : null;
            String endDateString = (queryInstance.getUpperTagDate() != null) ? dateFormatter
                    .format(queryInstance.getUpperTagDate()) : null;
                    String msgKeyPart = null;
                    String[] dateArgs = null;
                    if (StringUtils.isNotEmpty(startDateString)) {
                        msgKeyPart = "after";
                        dateArgs = new String[] { startDateString };
                    }
                    if (StringUtils.isNotEmpty(endDateString)) {
                        if (msgKeyPart != null) {
                            if (endDateString.equals(startDateString)) {
                                msgKeyPart = "at";
                            } else {
                                dateArgs = new String[] { startDateString, endDateString };
                                msgKeyPart = "between";
                            }
                        } else {
                            msgKeyPart = "before";
                            dateArgs = new String[] { endDateString };
                        }
                    }
                    if (msgKeyPart != null) {
                        filters.add(RtfElementFactory.createListItem(resourcesManager.getText(
                                "export.postlist.filter.date." + msgKeyPart, locale, (Object[]) dateArgs)));
                    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:45,代码来源:RtfNoteWriter.java

示例15: writeScenarioGroups

import com.lowagie.text.List; //导入依赖的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


注:本文中的com.lowagie.text.List类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。