annotate InterBlockPanel.java @ 52:76e99859bdb4 tip

Add class files for previous changes.
author Marcus Pearce <marcus.pearce@eecs.qmul.ac.uk>
date Wed, 25 Feb 2015 10:11:04 +0000
parents be66ee2fe9fe
children
rev   line source
m@0 1 /*=============================================================================
m@0 2 * File: InterBlockPanel.java
m@0 3 * Author: Marcus Pearce <m.pearce@gold.ac.uk>
m@0 4 * Created: <2008-01-08 15:39:18 marcusp>
m@0 5 * Time-stamp: <2008-03-04 17:16:48 marcusp>
m@0 6 *=============================================================================
m@0 7 */
m@0 8
m@0 9 import java.awt.*;
m@0 10 import java.awt.event.*;
m@0 11 import javax.swing.*;
m@0 12
c@47 13 public class InterBlockPanel extends EndBlockPanel {
m@0 14
m@0 15 /* variables */
m@0 16 private String previousText;
m@0 17 private String text = "";
m@0 18
m@0 19 /* accessors */
m@0 20 public void setText() {
m@0 21 previousText = text;
m@0 22 text = exp.getCurrentBlock().getLabel();
m@0 23 }
m@0 24
m@0 25 /* constructor */
m@0 26 public InterBlockPanel(Experiment e) {
c@47 27 super(e);
c@47 28 setText();
c@47 29 setUp("Continue");
m@0 30 }
m@0 31
c@47 32 protected String formatMessage() {
m@0 33 StringBuffer sb = new StringBuffer();
m@0 34 sb.append("<html><font size=\"+1\" face=\"sans\"><p align=center>");
m@0 35 sb.append("That is the end of the ");
m@0 36 sb.append(previousText);
m@0 37 sb.append(" block. ");
m@0 38 sb.append("<br>");
m@0 39 sb.append("If you have any questions, you may ask them now.");
m@0 40 sb.append("<br>");
m@0 41 sb.append("Otherwise, press the button below to continue on to the ");
m@0 42 sb.append(text);
m@0 43 sb.append(" block.");
m@0 44 sb.append("</p></html>");
m@0 45
m@0 46 return sb.toString();
m@0 47 }
m@0 48 }