1 19 package org.openide.cookies; 20 21 import java.util.Set ; 22 import org.openide.nodes.Node; 23 24 import java.io.IOException ; 25 26 import java.util.EventListener ; 27 28 29 35 @Deprecated 36 public interface ConnectionCookie extends Node.Cookie { 37 50 public void register(Type type, Node listener) throws IOException ; 51 52 58 public void unregister(Type type, Node listener) throws IOException ; 59 60 63 public Set <? extends ConnectionCookie.Type> getTypes(); 64 65 68 public interface Listener extends Node.Cookie, EventListener { 69 76 public void notify(ConnectionCookie.Event ev) throws IllegalArgumentException , ClassCastException ; 77 } 78 79 81 public interface Type extends java.io.Serializable { 82 87 public Class <?> getEventClass(); 88 89 92 public boolean isPersistent(); 93 94 96 101 public boolean overlaps(Type type); 102 } 103 104 106 public class Event extends java.util.EventObject { 107 static final long serialVersionUID = 7177610435688865839L; 108 private Type type; 109 110 113 public Event(Node n, Type t) { 114 super(n); 115 type = t; 116 } 117 118 122 public Node getNode() { 123 return (Node) getSource(); 124 } 125 126 132 public Type getType() { 133 return type; 134 } 135 } 136 } 137 | Popular Tags |