1 19 20 28 29 package org.netbeans.modules.xml.wsdl.ui.netbeans.module; 30 31 import java.io.IOException ; 32 import java.io.ObjectInput ; 33 import java.io.ObjectOutput ; 34 import java.io.Serializable ; 35 import org.openide.util.HelpCtx; 36 import org.openide.util.NbBundle; 37 import org.openide.util.Utilities; 38 import org.openide.windows.TopComponent; 39 import org.netbeans.core.spi.multiview.MultiViewDescription; 40 import org.netbeans.core.spi.multiview.MultiViewElement; 41 42 46 public class WSDLDesignMultiViewDesc extends Object 47 implements MultiViewDescription, Serializable { 48 49 50 53 private static final long serialVersionUID = 2580263536201519563L; 54 public static final String PREFERRED_ID = "wsdl-designview"; 55 private WSDLDataObject wsdlDataObject; 56 57 61 public WSDLDesignMultiViewDesc() { 62 super(); 63 } 64 65 66 70 public WSDLDesignMultiViewDesc(WSDLDataObject wsdlDataObject) { 71 this.wsdlDataObject = wsdlDataObject; 72 } 73 74 75 79 public String preferredID() { 80 return PREFERRED_ID; 81 } 82 83 84 88 public int getPersistenceType() { 89 return TopComponent.PERSISTENCE_ALWAYS; 90 } 91 92 93 97 public java.awt.Image getIcon() { 98 return Utilities.loadImage(WSDLDataObject.WSDL_ICON_BASE_WITH_EXT); 99 } 100 101 102 public HelpCtx getHelpCtx() { 103 return new HelpCtx(WSDLDesignMultiViewDesc.class); 104 } 105 106 107 111 public String getDisplayName() { 112 return NbBundle.getMessage(WSDLTreeViewMultiViewDesc.class, 113 "LBL_graphDesignView_name"); 114 } 115 116 117 121 public MultiViewElement createElement() { 122 return new WSDLDesignMultiViewElement(wsdlDataObject); 123 } 124 125 126 130 public void writeExternal(ObjectOutput out) throws IOException { 131 out.writeObject(wsdlDataObject); 132 } 133 134 135 139 public void readExternal(ObjectInput in) 140 throws IOException , ClassNotFoundException 141 { 142 Object firstObject = in.readObject(); 143 if (firstObject instanceof WSDLDataObject) 144 wsdlDataObject = (WSDLDataObject) firstObject; 145 } 146 } 147 | Popular Tags |