1 16 package com.google.gwt.sample.kitchensink.client; 17 18 import com.google.gwt.user.client.ui.AbstractImagePrototype; 19 import com.google.gwt.user.client.ui.Composite; 20 import com.google.gwt.user.client.ui.ImageBundle; 21 import com.google.gwt.user.client.ui.TreeImages; 22 23 27 public abstract class Sink extends Composite { 28 29 32 public interface Images extends ImageBundle, TreeImages { 33 AbstractImagePrototype gwtLogo(); 34 } 35 36 41 public abstract static class SinkInfo { 42 private Sink instance; 43 private String name, description; 44 45 public SinkInfo(String name, String desc) { 46 this.name = name; 47 description = desc; 48 } 49 50 public abstract Sink createInstance(); 51 52 public String getColor() { 53 return "#2a8ebf"; 54 } 55 56 public String getDescription() { 57 return description; 58 } 59 60 public final Sink getInstance() { 61 if (instance != null) { 62 return instance; 63 } 64 return (instance = createInstance()); 65 } 66 67 public String getName() { 68 return name; 69 } 70 } 71 72 75 public void onHide() { 76 } 77 78 81 public void onShow() { 82 } 83 } 84 | Popular Tags |