This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Scala xml -- this is supposed to return a collection of the elements to be modified | |
| (e \ "_").find { child => | |
| (child \\ "_") | |
| .filter { c => | |
| !isMedia(c.label) | |
| } | |
| .exists { c => | |
| c.child.exists { c => | |
| (singleParagraphs && isMedia(c.label)) || (c.label == "#PCDATA" && isEmpty(c.text)) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package simulations | |
| package gui | |
| import javax.swing.{JComponent, JFrame, JLabel, Timer, SwingUtilities} | |
| import javax.swing.border.{EmptyBorder} | |
| import java.awt.{Graphics, Graphics2D, GridLayout, BorderLayout, Color, Dimension, Rectangle, Polygon} | |
| import java.awt.event.{ActionListener, ActionEvent} | |
| object EpidemyDisplay extends EpidemySimulator with App { |