View Javadoc

1   /*
2    *  Copyright 2004 University of Hannover
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   */
16  
17  package olr.vrp;
18  
19  import java.util.ArrayList;
20  
21  import GUI.MyPanel;
22  
23  /***
24   * @version $Id: GUI.java,v 1.3 2004/08/02 18:40:26 roku Exp $
25   */
26  public class GUI extends MyPanel {
27  
28      public GUI() {
29          messages = new ArrayList();
30          messages.add(new String());
31      }
32  
33      public void outln(String s, boolean isRes) {
34          out(s, isRes);
35          messages.add(new String());
36      }
37  
38      public void out(String s, boolean isRes) {
39          int last = messages.size() - 1;
40          String line = String.valueOf((String) messages.get(last)) + String.valueOf(s);
41          messages.set(last, line);
42      }
43  
44      public ArrayList getMessages() {
45          return messages;
46      }
47  
48      ArrayList messages;
49  }