1 19 20 package org.netbeans.modules.tasklist.client; 21 22 import org.openide.text.Line; 23 24 import java.awt.*; 25 import org.netbeans.modules.tasklist.client.SuggestionPriority; 26 27 33 public final class SuggestionAgent { 34 35 private final Suggestion suggestion; 36 37 38 public SuggestionAgent(Suggestion suggestion) { 39 if (suggestion.agent != null) { 40 throw new IllegalStateException (); 41 } 42 suggestion.agent = this; 43 this.suggestion = suggestion; 44 } 45 46 public Suggestion getSuggestion() { 47 return suggestion; 48 } 49 50 public void setAction(SuggestionPerformer action) { 51 suggestion.setAction(action); 52 } 53 54 public void setSummary(String summary) { 55 suggestion.setSummary(summary); 56 } 57 58 public void setDetails(String details) { 59 suggestion.setDetails(details); 60 } 61 62 public void setPriority(SuggestionPriority prio) { 63 suggestion.setPriority(prio); 64 } 65 66 68 public void setLine(Line line) { 69 suggestion.setLine(line); 70 } 71 72 public void setIcon(Image image) { 73 suggestion.setIcon(image); 74 } 75 76 81 public void invalidate() { 82 suggestion.invalidate(); 83 } 84 } 85 | Popular Tags |