public void tick() { List<Message> toDelete = new ArrayList<Message>(); messageList .getData() .forEach( msg -> { if (msg.getEndTime() < System.currentTimeMillis()) { toDelete.add(msg); } }); toDelete.forEach(msg -> messageList.removeItem(msg)); fireListeners(); }
public void addMessage(Message message) { messageList.addItem(message); recache(); }
public List<Message> getMessages() { return messageList.getData(); }
public void removeMessage(Message message) { messageList.removeItem(message); recache(); }
public void setLogoValue(Object key, String value) { logosList.setProperty(key, "advertisement", value); }
public List<Advertisement> getLogos() { return logosList.getData(); }
public void removeLogo(Advertisement logo) { logosList.removeItem(logo); }
public void addLogo(Advertisement logo) { logosList.addItem(logo); }