m@0: /*============================================================================= m@0: * File: InterBlockPanel.java m@0: * Author: Marcus Pearce m@0: * Created: <2008-01-08 15:39:18 marcusp> m@0: * Time-stamp: <2008-03-04 17:16:48 marcusp> m@0: *============================================================================= m@0: */ m@0: m@0: import java.awt.*; m@0: import java.awt.event.*; m@0: import javax.swing.*; m@0: c@47: public class InterBlockPanel extends EndBlockPanel { m@0: m@0: /* variables */ m@0: private String previousText; m@0: private String text = ""; m@0: m@0: /* accessors */ m@0: public void setText() { m@0: previousText = text; m@0: text = exp.getCurrentBlock().getLabel(); m@0: } m@0: m@0: /* constructor */ m@0: public InterBlockPanel(Experiment e) { c@47: super(e); c@47: setText(); c@47: setUp("Continue"); m@0: } m@0: c@47: protected String formatMessage() { m@0: StringBuffer sb = new StringBuffer(); m@0: sb.append("

"); m@0: sb.append("That is the end of the "); m@0: sb.append(previousText); m@0: sb.append(" block. "); m@0: sb.append("
"); m@0: sb.append("If you have any questions, you may ask them now."); m@0: sb.append("
"); m@0: sb.append("Otherwise, press the button below to continue on to the "); m@0: sb.append(text); m@0: sb.append(" block."); m@0: sb.append("

"); m@0: m@0: return sb.toString(); m@0: } m@0: }