Re: How to use listeners without the JRexWindowManager?

"Paddy Cerri" <[email protected]> Tue, 13 Mar 2007 11:22:15 -0000
Newsgroups gmane.comp.mozilla.jrex
Message-ID <[email protected]>
This is a multi-part message in MIME format.

--===============2024995847==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_004B_01C76561.DCB522C0"

This is a multi-part message in MIME format.

------=_NextPart_000_004B_01C76561.DCB522C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi there,

I am having the same problem. ie the progresslistener dows not get sent =
any messages if the Windowmanager is not used.

Can some one help with why this might be

paddy.

ps BIG UP MEDAPPA!=20
  "Thomas Gaudin" <[email protected]> wrote =
in message =
news:4d29c6710605050645k781be974wa128dd06ff0d0c78-JsoAwUIsXouq+1Nelnf3ueG/[email protected]
  Hi,

  I am trying to design a GUI where I have 2 Jrex panels : when the user =
clicks on a link in the the first one, the link is opened in the second =
one.
  I think I can manage to implement it using listeners but I can not =
figure out how to plug the listeners witthout a call to =
JRexWindowManager.create(...).
  Has anybody faced this problem already? Below are to code snippets, =
one that works (using JRexWindowManager.create(...)) and the second one =
doesn't since the listeners are never called.
  Could someone give me a hint (or a piece of code) about how to do this =
please?
  Thanks

  Thomas

  first snippet that works :
              JRexWindowManager winManager =3D =
(JRexWindowManager)JRexFactory.getInstance().getImplInstance( =
JRexFactory.WINDOW_MANAGER);
              JRexFactory.getInstance().startEngine();
              winManager.create(JRexWindowManager.TAB_MODE);
              JPanel panel1 =3D new JPanel();
              frame.getContentPane ().add(panel1);
              winManager.init(panel1);
              jrc1 =3D =
(JRexCanvas)winManager.getBrowserForRootParent(panel1).next();
              nav1 =3D jrc1.getNavigator();
             =20
              jrc1.addProgressListener (new JrexProgressListener());
              jrc1.setSize(300, 300);

              frame.pack(); //realizes JRexCanvas !!!! important !!!!
             =20
              frame.setVisible(true);

              uri =3D new java.net.URI(url1);
              nav1.loadURI(uri, WebNavigationConstants.LOAD_FLAGS_NONE, =
null, null, null);

  second one doesn't work (listeners methods are never called)
              JRexFactory.getInstance().startEngine();=20
              jrc1 =3D JRexCanvas.createBrowserComponent();
              jrc1.setSize(300, 300);

              JPanel jp =3D new JPanel();
              jp.add(jrc1);
              frame.getContentPane().add(jp);
             =20
              frame.pack(); //realizes JRexCanvas !!!! important !!!!
              frame.setVisible(true);
             =20
              jrc1.addProgressListener(new JrexProgressListener());

              nav1 =3D jrc1.getNavigator();
              uri =3D new java.net.URI(url1);
              nav1.loadURI(uri, WebNavigationConstants.LOAD_FLAGS_NONE, =
null, null, null);




-------------------------------------------------------------------------=
-----


  _______________________________________________
  JRex mailing list
  [email protected]
  http://mozdev.org/mailman/listinfo/jrex

------=_NextPart_000_004B_01C76561.DCB522C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3059" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi there,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am having the same problem. ie the=20
progresslistener dows not get sent any messages if the Windowmanager is =
not=20
used.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can some one help with why this might=20
be</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>paddy.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ps BIG UP MEDAPPA!</FONT>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV>"Thomas Gaudin" &lt;<A=20
  =
href=3D"mailto:[email protected]">thogau-Re5=
[email protected]</A>&gt;=20
  wrote in message <A=20
  =
href=3D"news:4d29c6710605050645k781be974wa128dd06ff0d0c78-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org"=
>news:4d29c6710605050645k781be974wa128dd06ff0d0c78-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org</A>...<=
/DIV>Hi,<BR><BR>I=20
  am trying to design a GUI where I have 2 Jrex panels : when the user =
clicks on=20
  a link in the the first one, the link is opened in the second =
one.<BR>I think=20
  I can manage to implement it using listeners but I can not figure out =
how to=20
  plug the listeners witthout a call to =
JRexWindowManager.create(...).<BR>Has=20
  anybody faced this problem already? Below are to code snippets, one =
that works=20
  (using JRexWindowManager.create(...)) and the second one doesn't since =
the=20
  listeners are never called.<BR>Could someone give me a hint (or a =
piece of=20
  code) about how to do this =
please?<BR>Thanks<BR><BR>Thomas<BR><BR>first=20
  snippet that works=20
  =
:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  JRexWindowManager winManager =3D=20
  (JRexWindowManager)JRexFactory.getInstance().getImplInstance(=20
  JRexFactory.WINDOW_MANAGER);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp;=20
  JRexFactory.getInstance().startEngine();<BR>&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  winManager.create(JRexWindowManager.TAB_MODE);<BR>&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; JPanel panel1 =3D new=20
  JPanel();<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  frame.getContentPane ().add(panel1);<BR>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; winManager.init(panel1);<BR>&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; jrc1 =3D=20
  =
(JRexCanvas)winManager.getBrowserForRootParent(panel1).next();<BR>&nbsp;&=
nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nav1 =3D=20
  jrc1.getNavigator();<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; jrc1.addProgressListener (new=20
  JrexProgressListener());<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; jrc1.setSize(300, 300);<BR><BR>&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; frame.pack(); //realizes =
JRexCanvas !!!!=20
  important !!!!<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
  <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  frame.setVisible(true);<BR><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; uri =3D new =
java.net.URI(url1);<BR>&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nav1.loadURI(uri,=20
  WebNavigationConstants.LOAD_FLAGS_NONE, null, null, =
null);<BR><BR>second one=20
  doesn't work (listeners methods are never =
called)<BR>&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
JRexFactory.getInstance().startEngine();=20
  <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; jrc1 =3D=20
  JRexCanvas.createBrowserComponent();<BR>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; jrc1.setSize(300, 300);<BR><BR>&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; JPanel jp =3D new=20
  JPanel();<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  jp.add(jrc1);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
  frame.getContentPane().add(jp);<BR>&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; frame.pack(); //realizes =
JRexCanvas !!!!=20
  important !!!!<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
  frame.setVisible(true);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; jrc1.addProgressListener(new=20
  JrexProgressListener());<BR><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; nav1 =3D jrc1.getNavigator();<BR>&nbsp;&nbsp;&nbsp; =

  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; uri =3D new=20
  java.net.URI(url1);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; nav1.loadURI(uri, =
WebNavigationConstants.LOAD_FLAGS_NONE,=20
  null, null, null);<BR><BR>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>JRex mailing =

  =
list<BR>[email protected]<BR>http://mozdev.org=
/mailman/listinfo/jrex<BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_004B_01C76561.DCB522C0--



--===============2024995847==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
JRex mailing list
[email protected]
http://mozdev.org/mailman/listinfo/jrex

--===============2024995847==--