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


Java EventsManager.getStickers方法代码示例

本文整理汇总了Java中net.sf.memoranda.EventsManager.getStickers方法的典型用法代码示例。如果您正苦于以下问题:Java EventsManager.getStickers方法的具体用法?Java EventsManager.getStickers怎么用?Java EventsManager.getStickers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.memoranda.EventsManager的用法示例。


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

示例1: sortStickers

import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
private static PriorityQueue sortStickers(){
    Map stickers = EventsManager.getStickers();
    PriorityQueue pQ = new PriorityQueue(stickers.size());
    for (Iterator i = stickers.keySet().iterator(); i.hasNext();) {
    	String id = (String)i.next();
    	Element el = (Element)stickers.get(id);
    	int j=2;
    	j=Integer.parseInt(el.getAttributeValue("priority"));
    	pQ.insertar(new Pair(el,j));
    }
    return pQ;
}
 
开发者ID:ser316asu,项目名称:SER316-Ingolstadt,代码行数:13,代码来源:AgendaGenerator.java

示例2: getSticker

import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
public String getSticker(){
        Map stickers = EventsManager.getStickers();
String result = "";
String nl = System.getProperty("line.separator"); 
        for (Iterator i = stickers.keySet().iterator(); i.hasNext();) {
    String id = (String)i.next();
    result += (String)(((Element)stickers.get(id)).getValue())+nl;
    }
    
        return result;
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:12,代码来源:ExportSticker.java

示例3: sortStickers

import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
private static PriorityQueue sortStickers() {
    Map stickers = EventsManager.getStickers();
    PriorityQueue pQ = new PriorityQueue(stickers.size());
    for (Iterator i = stickers.keySet().iterator(); i.hasNext();) {
        String id = (String) i.next();
        Element el = (Element) stickers.get(id);
        int j = 2;
        j = Integer.parseInt(el.getAttributeValue("priority"));
        pQ.insertar(new Pair(el, j));
    }
    return pQ;
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:13,代码来源:AgendaGenerator.java

示例4: testStickerExpiration

import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
@Test
//This will require 
public void testStickerExpiration() {
    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
    
    Date expirationDate = new Date();
    //The 12 is for font size.
    String orig = "This sticker should not exist; it is a monument to man's arrogance.";
    int sP = 0;
    String txt = ("<div style=\"background-color:"+
           "0"+";font-size:"+
           "12"+";color:"+ 
           "FFFFFF"+"; \">" + orig+ 
           "</div>");
    EventsManager.createSticker(txt, sP, expirationDate);
    //FileStorage.JN_DOCPATH = FileStorage.JN_DOCPATH + "/ExpirationStickerTest";
    CurrentStorage.get().storeEventsManager();
    
    Map stickers = EventsManager.getStickers();
    String raw_sticker;
    String stickerText;
    int first;
    int last;
    Iterator i = stickers.entrySet().iterator();
    while (i.hasNext()){
        Entry stickerEntry = (Entry) i.next();
        raw_sticker = (String) ((Element)stickerEntry.getValue()).getValue();
        stickerText = getOriginalStickerText(raw_sticker);

        System.out.println(stickerText);
        //Should never load a sticker with the same text as the original
        assertFalse(stickerText.compareTo(orig) == 0);
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:35,代码来源:StickerExpirationTest.java

示例5: testStickerPermanance

import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
@Test
public void testStickerPermanance() {
    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
    
    //Date expirationDate = new Date();
    //The 12 is for font size.
    String orig = "This sticker will live forever.";
    int sP = 0;
    String txt = ("<div style=\"background-color:"+
           "0"+";font-size:"+
           "12"+";color:"+ 
           "FFFFFF"+"; \">" + orig+ 
           "</div>");
    EventsManager.createSticker(txt, sP, null);
    //FileStorage.JN_DOCPATH = FileStorage.JN_DOCPATH + "/ExpirationStickerTest";
    CurrentStorage.get().storeEventsManager();
    
    Map stickers = EventsManager.getStickers();
    String raw_sticker;
    String stickerText;
    int first;
    int last;
    Iterator i = stickers.entrySet().iterator();
    boolean success = false;
    while (i.hasNext()){
        Entry stickerEntry = (Entry) i.next();
        raw_sticker = (String)((Element)stickerEntry.getValue()).getValue();
        stickerText = getOriginalStickerText(raw_sticker);

        System.out.println(stickerText);
        //Should never load a sticker with the same text as the original
        if (stickerText.compareTo(orig) == 0) {
            success = true;
            break;
        }
    }
    assertTrue(success);
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:39,代码来源:StickerExpirationTest.java

示例6: testStickerNotDeadYet

import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
@Test
public void testStickerNotDeadYet() throws ParseException {
    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
    
    Date expirationDate = sdf.parse("31/03/2018");
    //The 12 is for font size.
    String orig = "Memento Mori";
    int sP = 0;
    String txt = ("<div style=\"background-color:"+
           "0"+";font-size:"+
           "12"+";color:"+ 
           "FFFFFF"+"; \">" + orig+ 
           "</div>");
    EventsManager.createSticker(txt, sP, expirationDate);
    //FileStorage.JN_DOCPATH = FileStorage.JN_DOCPATH + "/ExpirationStickerTest";
    CurrentStorage.get().storeEventsManager();
    
    Map stickers = EventsManager.getStickers();
    String raw_sticker;
    String stickerText;
    int first;
    int last;
    Iterator i = stickers.entrySet().iterator();
    boolean success = false;
    while (i.hasNext()){
        Entry stickerEntry = (Entry) i.next();
        raw_sticker = (String) ((Element)stickerEntry.getValue()).getValue();
        stickerText = getOriginalStickerText(raw_sticker);

        System.out.println(stickerText);
        //Should never load a sticker with the same text as the original
        if (stickerText.compareTo(orig) == 0)  {
            success = true;
            break;
        }
    }
    assertTrue(success);
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:39,代码来源:StickerExpirationTest.java

示例7: getSticker

import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
public String getSticker(){
    Map stickers = EventsManager.getStickers();    	
    String result = "";
    StringBuffer buf = new StringBuffer();
    String nl = System.getProperty("line.separator"); 

    for (Iterator i = stickers.keySet().iterator(); i.hasNext();) {
        String id = (String)i.next();
        //FIND BUGS FIX
        //result += (String)(((Element)stickers.get(id)).getValue())+nl;
        buf.append((String)(((Element)stickers.get(id)).getValue())+nl);
    }

    return result = buf.toString();
}
 
开发者ID:ser316asu,项目名称:Wilmersdorf_SER316,代码行数:16,代码来源:ExportSticker.java

示例8: getSticker

import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
private String getSticker() {
    Map stickers = EventsManager.getStickers();
    StringBuilder result = new StringBuilder();
    String nl = System.getProperty("line.separator");
    for (Object o : stickers.keySet()) {
        String id = (String) o;
        result.append(((Element) stickers.get(id)).getValue());
        result.append(nl);
    }
    return result.toString();
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:12,代码来源:ExportSticker.java


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