Re: j2s-development] About binding DIV elements as SWT's Multiple Monitors
Brought to you by:
zhourenjian
|
From: Soheil H. Y. <soh...@gm...> - 2006-08-09 08:24:13
|
Hi, I think multiple monitor support is not as easy as you mentioned here. If we clone the shell and add it under 2 DIVs, we do not have 2 monitors! we just have another instance of the application executed. The other problem here is the behavior of the multiple monitor. If a button is pressed the effect should be applied on both DIVs, and many other synchronization problems. So, I'm not sure wether multiple monitor is as easy as using divs as monitors. Regards, Soheil On 8/7/06, Zhou Renjian <jo...@sj...> wrote: > Hi, > > I know native SWT 3.1 is not supporting multiple monitors. But SWT 3.2 > or future version may support multiple monitors. > > In HTML DOM mode, <DIV> elements can be considered as blocks with > position and size. If we treat DIV element as a monitor in browser. We > can have multiple monitors for SWT! > > If we are not in the purpose of multiple monitors, we can also have our > SWT application embeded inside a DIV block of normal HTML page. Please > visit http://j2s.sourceforge.net/, the ControlExample is running inside > a DIV monitors. I think that is cool. > > Currently, we choose document.body as the primary monitor when running > as "Java2Script Application" in browser. But maybe Java2Script SWT > applications running as DIV block embed applications should be right way. > > What is your opinions about how "Java2Script SWT Application" will be > run as? Standalone? Embed? Workbench (JavaScript version of RCP)? > > Regards > > Zhou Renjian > > Attachment > =================== > By the way, there are some codes in the SVN repository > Display.java: > protected static void registerElementAsMonitor(Element el); > something like: > if (el == document.body) { > monitor.clientWidth = document.body.clientWidth; > monitor.clientHeight = document.body.clientHeight; > monitor.x = 0; > monitor.y = 0; > monitor.width = window.screen.availWidth; > monitor.height = window.screen.availHeight; > } else { > Point pt = OS.getElementPositionInShell(el, document.body); > el.style.position = "absolute"; > monitor.x = pt.x; > monitor.y = pt.y; > monitor.width = monitor.clientWidth = OS.getContainerWidth(el); > monitor.height = monitor.clientHeight = OS.getContainerHeight(el); > } > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > j2s-development mailing list > j2s...@li... > https://lists.sourceforge.net/lists/listinfo/j2s-development > |