import charite.christo.strap.StrapProtein;
import static java.lang.System.*;
/*
java DemoProtein_userObjects
This demo shows how objects are added and retrieved to proteins with
the methods putClientProperty and getClientProperty. The same
methods exist for javax.swing.JComponent.
*/
public class DemoProtein_userObjects {
public static void main(String argv[]) {
StrapProtein p= new StrapProtein();
out.println("I add an object using the key \"myKey\"");
/* Associates the String object to the key "myKey" */
p.putClientProperty("myKey","this is my object");
/* Gets the object */
out.println("client property="+p.getClientProperty("myKey"));
/* A value null removes the property */
out.println("I remove the object ");
p.putClientProperty("myKey",null);
/* There is no value linked to the key "myKey" any more and the following should return null. */
out.println("client property="+p.getClientProperty("myKey"));
}
}