1 package org.jinterop.dcom.test; 2 3 import org.jinterop.dcom.common.JIException; 4 import org.jinterop.dcom.core.JIInterfacePointer; 5 import org.jinterop.dcom.core.JIString; 6 import org.jinterop.dcom.core.JIVariant; 7 8 public class DWebBrowserEvents2 { 9 10 11 public DWebBrowserEvents2() 12 { 13 14 } 15 public void PropertyChange(JIString szProperty) 18 { 19 System.out.println("PropertyChange -> " + szProperty.getString()); 20 } 21 22 23 33 public JIVariant BeforeNavigate2(JIInterfacePointer dispatch,JIVariant URL,JIVariant Flags,JIVariant TargetFrameName, 34 JIVariant PostData, JIVariant Headers, JIVariant Cancel) throws JIException 35 { 36 JIVariant realURL = URL; 37 while (realURL.isByRefFlagSet()) 38 { 39 realURL = realURL.getObjectAsVariant(); 40 } 41 42 System.out.println("BeforeNavigate2 -> " + realURL.getObjectAsString().getString()); 43 44 47 return Cancel; 48 } 49 50 public void StatusTextChange(JIString text) 52 { 53 System.out.println("StatusTextChange -> " + text.getString()); 54 } 55 56 public void ProgressChange( 58 int Progress, 59 int ProgressMax) 60 { 61 System.out.println("ProgressChange -> " + Progress + " , " + ProgressMax); 62 } 63 64 public void CommandStateChange( 66 int Command, 67 boolean Enable) 68 { 69 System.out.println("CommandStateChange -> " + Command + " , " + Enable); 70 } 71 72 public void DownloadBegin() 74 { 75 System.out.println("DownloadBegin"); 76 } 77 78 public void DownloadComplete() 80 { 81 System.out.println("DownloadComplete"); 82 } 83 84 public void TitleChange(JIString Text) 86 { 87 System.out.println("TitleChange -> " + Text.getString()); 88 } 89 90 public JIVariant NewWindow2(JIVariant ppDisp, 92 JIVariant Cancel) throws JIException 93 { 94 System.out.println("NewWindow2 -> " + Cancel.getObjectAsBoolean()); 95 return Cancel; 96 } 97 98 public void NavigateComplete2( 100 JIInterfacePointer pDisp, 101 JIVariant URL) throws JIException 102 { 103 JIVariant realURL = URL; 104 while (realURL.isByRefFlagSet()) 105 { 106 realURL = realURL.getObjectAsVariant(); 107 } 108 109 System.out.println("NavigateComplete2 -> " + pDisp.getIID() + " , " + realURL.getObjectAsString().getString()); 110 } 111 112 public void DocumentComplete( 114 JIInterfacePointer pDisp, 115 JIVariant URL) throws JIException 116 { 117 System.out.println("DocumentComplete -> " + pDisp.getIID() + " , " + URL); 118 } 119 120 public void OnQuit() 122 { 123 System.out.println("OnQuit -> "); 124 } 125 126 public void OnVisible(boolean Visible) 128 { 129 System.out.println("OnVisible -> " + Visible); 130 } 131 132 public void OnToolBar(boolean ToolBar) 134 { 135 System.out.println("OnToolBar -> " + ToolBar); 136 } 137 138 public void OnMenuBar(boolean MenuBar) 140 { 141 System.out.println("OnMenuBar -> " + MenuBar); 142 } 143 144 public void OnStatusBar(boolean StatusBar) 146 { 147 System.out.println("OnStatusBar -> " + StatusBar); 148 } 149 150 public void OnFullScreen(boolean FullScreen) 152 { 153 System.out.println("OnFullScreen -> " + FullScreen); 154 } 155 156 public void OnTheaterMode(boolean TheaterMode) 158 { 159 System.out.println("OnTheaterMode -> " + TheaterMode); 160 } 161 162 public void WindowSetResizable(boolean Resizable) 164 { 165 System.out.println("OnResizable -> " + Resizable); 166 } 167 168 public void WindowSetLeft(int Left) 170 { 171 System.out.println("WindowSetLeft - > " + Left); 172 } 173 174 public void WindowSetTop(int Top) 176 { 177 System.out.println("WindowSetTop - > " + Top); 178 } 179 180 public void WindowSetWidth(int Width) 182 { 183 System.out.println("WindowSetWidth - > " + Width); 184 } 185 186 public void WindowSetHeight(int Height) 188 { 189 System.out.println("WindowSetHeight - > " + Height); 190 } 191 192 public JIVariant WindowClosing( 194 boolean IsChildWindow, 195 JIVariant Cancel) throws JIException 196 { 197 System.out.println("WindowClosing -> " + IsChildWindow + " , " + Cancel.getObjectAsBoolean()); 198 return Cancel; 199 } 200 201 public Integer [] ClientToHostWindow( 203 int CX, 204 int CY) 205 { 206 System.out.println("ClientToHostWindow - > " + CX + " , " + CY); 207 return new Integer [] {new Integer (CX),new Integer (CY)}; 208 } 209 210 public void SetSecureLockIcon(int SecureLockIcon) 212 { 213 System.out.println("SetSecureLockIcon - > " + SecureLockIcon); 214 } 215 216 public JIVariant FileDownload(boolean noIdeaWhat,JIVariant Cancel) throws JIException 218 { 219 System.out.println("FileDownload - > " + Cancel); 220 return Cancel; 221 } 222 223 public JIVariant NavigateError( 225 JIInterfacePointer pDisp, 226 JIVariant URL, 227 JIVariant Frame, 228 JIVariant StatusCode, 229 JIVariant Cancel) throws JIException 230 { 231 System.out.println("NavigateError - > " + URL.getObjectAsString()); 232 return Cancel; 233 } 234 235 public void PrintTemplateInstantiation(JIInterfacePointer pDisp) 237 { 238 System.out.println("PrintTemplateInstantiation - > " + pDisp.getIID()); 239 } 240 241 public void PrintTemplateTeardown(JIInterfacePointer pDisp) 243 { 244 System.out.println("PrintTemplateTeardown - > " + pDisp.getIID()); 245 } 246 247 public void UpdatePageStatus( 249 JIInterfacePointer pDisp, 250 JIVariant nPage, 251 JIVariant fDone) 252 { 253 System.out.println("UpdatePageStatus - > " + pDisp.getIID()); 254 } 255 256 public void PrivacyImpactedStateChange(boolean bImpacted) 258 { 259 System.out.println("PrivacyImpactedStateChange - > " + bImpacted); 260 } 261 262 public JIVariant NewWindow3( 264 JIVariant ppDisp, 265 JIVariant Cancel, 266 int dwFlags, 267 JIString bstrUrlContext, 268 JIString bstrUrl) throws JIException 269 { 270 System.out.println("NewWindow3 - > " + ppDisp + " , " + Cancel.getObjectAsBoolean() + " , " + bstrUrl.getString()); 271 return Cancel; 272 } 273 274 public void SetPhishingFilterStatus(int PhishingFilterStatus) throws JIException 275 { 276 System.out.println("SetPhishingFilterStatus - > " + PhishingFilterStatus); 277 } 279 280 public void WindowStateChanged( 281 int dwWindowStateFlags, 282 int dwValidFlagsMask) 283 { 284 System.out.println("WindowStateChanged - > " + dwWindowStateFlags + " , " + dwValidFlagsMask); 285 } 286 287 288 289 } 290 | Popular Tags |