summaryrefslogtreecommitdiff
path: root/NET/worlds/console/BookmarkMenuItem.java
blob: 1094e5193c5ef5fdd7894f05c728c1ba0af97cd3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*    */ package NET.worlds.console;
/*    */ 
/*    */ import NET.worlds.scape.Persister;
/*    */ import NET.worlds.scape.Restorer;
/*    */ import NET.worlds.scape.Saver;
/*    */ import NET.worlds.scape.TooNewException;
/*    */ import java.awt.MenuItem;
/*    */ import java.io.IOException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class BookmarkMenuItem
/*    */   extends MenuItem
/*    */   implements Persister
/*    */ {
/*    */   private static final long serialVersionUID = -6078093402030113754L;
/*    */   private String target;
/*    */   
/*    */   public BookmarkMenuItem(String name, String target)
/*    */   {
/* 27 */     super(name);
/* 28 */     this.target = target;
/*    */   }
/*    */   
/*    */   public BookmarkMenuItem() {}
/*    */   
/*    */   public String getTarget()
/*    */   {
/* 35 */     return this.target;
/*    */   }
/*    */   
/*    */   public void setTarget(String loc) {
/* 39 */     this.target = loc;
/*    */   }
/*    */   
/* 42 */   private static Object classCookie = new Object();
/*    */   
/*    */   public void saveState(Saver s) throws IOException {
/* 45 */     s.saveVersion(1, classCookie);
/* 46 */     s.saveString(getLabel());
/* 47 */     s.saveString(this.target);
/*    */   }
/*    */   
/*    */   public void restoreState(Restorer r) throws IOException, TooNewException {
/* 51 */     switch (r.restoreVersion(classCookie)) {
/*    */     case 1: 
/* 53 */       setLabel(r.restoreString());
/* 54 */       this.target = r.restoreString();
/* 55 */       break;
/*    */     default: 
/* 57 */       throw new TooNewException();
/*    */     }
/*    */   }
/*    */   
/*    */   public void postRestore(int version) {}
/*    */ }


/* Location:              C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\BookmarkMenuItem.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */