package NET.worlds.console; class IEWebControlImp extends WebControlImp { private int nativeIEInstance; private int m_hwnd; private boolean detached; private native boolean nativeInit(int var1, boolean var2); private native void nativeDestroy(); private native void nativeSetURL(String var1, String var2); private native void nativeGoBack(); private native void nativeGoForward(); private native void nativeStop(); private native void nativeRefresh(); private native void nativeHome(); private native void nativePrint(int var1, int var2); private native void nativeResize(int var1, int var2, int var3, int var4); private native void nativeAddToolbar(); private native int nativeGetHWND(); public IEWebControlImp(int hwnd, boolean toolbar, boolean isBanner) throws NoWebControlException { super(hwnd); this.m_hwnd = hwnd; this.nativeIEInstance = 0; this.detached = false; if (!this.nativeInit(hwnd, isBanner)) { this.detached = true; throw new NoWebControlException("Could not initialize IE control"); } else { if (toolbar) { this.nativeAddToolbar(); } } } @Override public void finalize() { this.detach(); } @Override public void renderTo(int dc) { this.nativePrint(dc, this.m_hwnd); } @Override public boolean setURL(String pURL) { pURL = processURL(pURL); if (pURL == null) { return false; } else { this.nativeSetURL(pURL, null); return true; } } @Override public boolean setURL(String pURL, String pPostData) { pURL = processURL(pURL); if (pURL == null) { return false; } else { if (pPostData != null) { pPostData = processURL(pPostData); if (pPostData == null) { return false; } } this.nativeSetURL(pURL, pPostData); return true; } } @Override public void detach() { if (!this.detached) { this.nativeDestroy(); super.detach(); this.nativeIEInstance = 0; this.detached = true; } } @Override public void resize(int w, int h, int xPer, int yPer) { this.nativeResize(w, h, xPer, yPer); } @Override public void goBack() { this.nativeGoBack(); } @Override public void goForward() { this.nativeGoForward(); } @Override public void stop() { this.nativeStop(); } @Override public void refresh() { this.nativeRefresh(); } @Override public void home() { this.nativeHome(); } @Override public int getHWND() { return this.nativeGetHWND(); } }