summaryrefslogtreecommitdiff
path: root/NET/worlds/console/WebControl.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/console/WebControl.java')
-rw-r--r--NET/worlds/console/WebControl.java127
1 files changed, 127 insertions, 0 deletions
diff --git a/NET/worlds/console/WebControl.java b/NET/worlds/console/WebControl.java
new file mode 100644
index 0000000..d5ec951
--- /dev/null
+++ b/NET/worlds/console/WebControl.java
@@ -0,0 +1,127 @@
+/* */ package NET.worlds.console;
+/* */
+/* */ import java.io.PrintStream;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class WebControl
+/* */ extends RenderCanvasOverlay
+/* */ {
+/* */ public WebControl(RenderCanvas pCanvas, boolean hasToolbar)
+/* */ throws NoWebControlException
+/* */ {
+/* 17 */ super(pCanvas);
+/* */ try {
+/* 19 */ this.imp = WebControlFactory.createWebControlImp(
+/* 20 */ getNativeWindowHandle(), hasToolbar, false);
+/* */ } catch (NoWebControlException e) {
+/* 22 */ super.detach();
+/* 23 */ throw e;
+/* */ }
+/* */ }
+/* */
+/* */ public WebControl(RenderCanvas pCanvas, int xPer, int yPer, boolean hasToolbar, boolean isFixedSize, boolean isBanner)
+/* */ throws NoWebControlException
+/* */ {
+/* 30 */ super(pCanvas, xPer, yPer, isFixedSize, !isBanner);
+/* 31 */ this.imp = WebControlFactory.createWebControlImp(getNativeWindowHandle(),
+/* 32 */ hasToolbar, isBanner);
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public boolean setURL(String pURL)
+/* */ {
+/* 40 */ if (this.imp == null) {
+/* 41 */ System.out.println("Null implementation in WebControl.setURL");
+/* 42 */ return false;
+/* */ }
+/* 44 */ return this.imp.setURL(pURL);
+/* */ }
+/* */
+/* */ public boolean setURL(String pURL, String pPostData) {
+/* 48 */ if (this.imp == null) {
+/* 49 */ System.out.println("Null implementation in WebControl.setURL");
+/* 50 */ return false;
+/* */ }
+/* 52 */ if ((pPostData == null) || (pPostData.equals(""))) {
+/* 53 */ return this.imp.setURL(pURL);
+/* */ }
+/* 55 */ return this.imp.setURL(pURL, pPostData);
+/* */ }
+/* */
+/* 58 */ private final int ID_GO_BACK = 32768;
+/* 59 */ private final int ID_GO_FORWARD = 32769;
+/* 60 */ private final int ID_VIEW_STOP = 32770;
+/* 61 */ private final int ID_VIEW_REFRESH = 32771;
+/* 62 */ private final int ID_GO_HOME = 32772;
+/* 63 */ private final int ID_EXIT = 32773;
+/* */
+/* */ protected void handleCommand(int commandID)
+/* */ {
+/* 67 */ if (this.imp == null) {
+/* 68 */ System.out.println("Now this should be impossible. Null imp in WebControl.handleCommand.");
+/* */
+/* 70 */ return;
+/* */ }
+/* */
+/* 73 */ switch (commandID) {
+/* */ case 32768:
+/* 75 */ this.imp.goBack();
+/* 76 */ break;
+/* */
+/* */ case 32769:
+/* 79 */ this.imp.goForward();
+/* 80 */ break;
+/* */
+/* */ case 32770:
+/* 83 */ this.imp.stop();
+/* 84 */ break;
+/* */
+/* */ case 32771:
+/* 87 */ this.imp.refresh();
+/* 88 */ break;
+/* */
+/* */ case 32772:
+/* 91 */ this.imp.home();
+/* 92 */ break;
+/* */
+/* */ case 32773:
+/* 95 */ detach();
+/* */ }
+/* */
+/* */ }
+/* */
+/* */ void detach()
+/* */ {
+/* 102 */ if (this.imp != null)
+/* 103 */ this.imp.detach();
+/* 104 */ super.detach();
+/* */ }
+/* */
+/* */
+/* */
+/* */ void canvasResized(int parentX, int parentY)
+/* */ {
+/* 111 */ super.canvasResized(parentX, parentY);
+/* 112 */ if (this.imp == null) {
+/* 113 */ System.out.println("Null imp in WebControl.canvasResized");
+/* 114 */ return;
+/* */ }
+/* 116 */ this.imp.resize(parentX, parentY, getXPercent(), getYPercent());
+/* */ }
+/* */
+/* */
+/* 120 */ private WebControlImp imp = null;
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\WebControl.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file