1 11 package org.eclipse.ui.internal.cheatsheets.data; 12 13 import java.util.ArrayList ; 14 import java.util.Collection ; 15 16 19 public class CheatSheet implements ICheatSheet { 20 21 protected String title; 22 private Item introItem; 23 private ArrayList items; 24 private boolean containsCommandOrAction; 25 26 30 public CheatSheet() { 31 } 32 33 38 public void setTitle(String title) { 39 this.title = title; 40 } 41 42 46 public String getTitle(){ 47 return title; 48 } 49 50 53 public Item getIntroItem() { 54 return introItem; 55 } 56 57 60 public ArrayList getItems() { 61 return items; 62 } 63 64 67 public void setIntroItem(Item intro) { 68 introItem = intro; 69 } 70 71 76 public void addItem(Item item) { 77 if(items == null) { 78 items = new ArrayList (); 79 } 80 items.add(item); 81 } 82 83 88 public void addItems(Collection c) { 89 if(items == null) { 90 items = new ArrayList (); 91 } 92 items.addAll(c); 93 } 94 95 public void setContainsCommandOrAction(boolean containsCommandOrAction) { 96 this.containsCommandOrAction = containsCommandOrAction; 97 } 98 99 public boolean isContainsCommandOrAction() { 100 return containsCommandOrAction; 101 } 102 } 103 | Popular Tags |