22 // see http://www.w3schools.com/css/css_colornames.asp |
22 // see http://www.w3schools.com/css/css_colornames.asp |
23 |
23 |
24 def get_color(s: String): Color = ColorFactory.getInstance.getColor(s) |
24 def get_color(s: String): Color = ColorFactory.getInstance.getColor(s) |
25 |
25 |
26 val outdated_color = new Color(238, 227, 227) |
26 val outdated_color = new Color(238, 227, 227) |
27 val outdated1_color = new Color(238, 227, 227, 50) |
|
28 val running_color = new Color(97, 0, 97) |
27 val running_color = new Color(97, 0, 97) |
29 val running1_color = new Color(97, 0, 97, 100) |
28 val running1_color = new Color(97, 0, 97, 100) |
30 val unfinished_color = new Color(255, 160, 160) |
29 val unfinished_color = new Color(255, 160, 160) |
31 val unfinished1_color = new Color(255, 160, 160, 50) |
30 val unfinished1_color = new Color(255, 160, 160, 50) |
32 |
31 |
55 /* command status */ |
54 /* command status */ |
56 |
55 |
57 def status_color(snapshot: Document.Snapshot, command: Command): Option[Color] = |
56 def status_color(snapshot: Document.Snapshot, command: Command): Option[Color] = |
58 { |
57 { |
59 val state = snapshot.command_state(command) |
58 val state = snapshot.command_state(command) |
60 if (snapshot.is_outdated) Some(outdated1_color) |
59 if (snapshot.is_outdated) Some(outdated_color) |
61 else |
60 else |
62 Isar_Document.command_status(state.status) match { |
61 Isar_Document.command_status(state.status) match { |
63 case Isar_Document.Forked(i) if i > 0 => Some(running1_color) |
62 case Isar_Document.Forked(i) if i > 0 => Some(running1_color) |
64 case Isar_Document.Unprocessed => Some(unfinished1_color) |
63 case Isar_Document.Unprocessed => Some(unfinished1_color) |
65 case _ => None |
64 case _ => None |