コード例 #1
0
    @Override
    public void run() {
      // Use an Undefined pledge as a marker to show next pledge
      if (p.getState() == Pledge.STATE_UNDEFINED) {
      } else if (p.getState() == Pledge.STATE_ACCEPTED) {
        setPledgeMode(false);

        if (welcomePledge != null && !p.equals(welcomePledge)) {
          revokePledge(welcomePledge);
          welcomePledge = null;
        }
        if (!pledgeHash.contains(p)) {
          pledgeList.add(p);
          pledgeHash.add(p);
          tickerLabel.setText(createTickerString());
        }
        pledgePane.addText(p.getText());
      }
    }
コード例 #2
0
 public void addPledge(Pledge p) {
   System.out.println("Adding pledge " + p.getFrom() + ": " + p.getText());
   javax.swing.SwingUtilities.invokeLater(new PledgeInserter(p));
 }
コード例 #3
0
 public void showWelcomePledge() {
   Pledge p = new Pledge("Welcome to PhonePledge!");
   p.setState(Pledge.STATE_ACCEPTED);
   addPledge(p);
 }