🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #12564

Re: How to implement a JdbNavComboBox

#12564
From: Ramanan Varadarajan
Date: Tue, 08 Dec 1998 00:00
94 lines
4001 bytes
--------------8698D416E000D98F2AA7518B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,
I also struggled with JdbNavComboBox for a while...
and found out this..
the JdbNavComboBox  fires only the events that are
applicable to QueryDataSet it is naviagating with...

for instance
if  you have queryDataSet1 attached to jdbNavComboBox1 then
whenever u select an item in the ComboBox, it is equivalent to
navigating to that element in the queryDataSet1..
if u add a listener to Navigation event of the queryDataSet1  then
u can capture the event occurence
Hope this is clear... Feel free to ask me if not clear

Thanks
Ramanan


code example:

  JdbNavComboBox jdbNavCboLname = new JdbNavComboBox();

    jdbNavCboLname.setDataSet(queryDataSetEmp);


   queryDataSetEmp.addMasterNavigateListener(new
borland.jbcl.dataset.MasterNavigateListener() {
      public void masterNavigating(MasterNavigateEvent e) {
      }
      public void masterNavigated(MasterNavigateEvent e) {
        queryDataSetEmp_masterNavigated(e);
      }
    });

  void queryDataSetEmp_masterNavigated(MasterNavigateEvent e) {
    System.out.println("jdbNavCboLname itemState changed");
    if(jdbNavDeptName.getSelectedItem()!=null) {
     System.out.println("selected "
+jdbNavCboLname.getSelectedItem().toString());
     System.out.println("jdbNavCboLname itemState changed");
    }}


--------------8698D416E000D98F2AA7518B
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi,
<br>I also struggled with JdbNavComboBox for a while...
<br>and found out this..
<br>the JdbNavComboBox&nbsp; fires only the events that are
<br>applicable to QueryDataSet it is naviagating with...
<p>for instance
<br>if&nbsp; you have queryDataSet1 attached to jdbNavComboBox1 then
<br>whenever u select an item in the ComboBox, it is equivalent to
<br>navigating to that element in the queryDataSet1..
<br>if u add a listener to Navigation event of the queryDataSet1&nbsp;
then
<br>u can capture the event occurence
<br>Hope this is clear... Feel free to ask me if not clear
<p>Thanks
<br>Ramanan
<br>&nbsp;
<p>code example:
<p>&nbsp; JdbNavComboBox jdbNavCboLname = new JdbNavComboBox();
<p>&nbsp;&nbsp;&nbsp; jdbNavCboLname.setDataSet(queryDataSetEmp);
<br>&nbsp;
<p>&nbsp;&nbsp; queryDataSetEmp.addMasterNavigateListener(new borland.jbcl.dataset.MasterNavigateListener()
{
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void masterNavigating(MasterNavigateEvent
e) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void masterNavigated(MasterNavigateEvent
e) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; queryDataSetEmp_masterNavigated(e);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>&nbsp;&nbsp;&nbsp; });
<p>&nbsp; void queryDataSetEmp_masterNavigated(MasterNavigateEvent e) {
<br>&nbsp;&nbsp;&nbsp; System.out.println("jdbNavCboLname itemState changed");
<br>&nbsp;&nbsp;&nbsp; if(jdbNavDeptName.getSelectedItem()!=null) {
<br>&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("selected " +jdbNavCboLname.getSelectedItem().toString());
<br>&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("jdbNavCboLname itemState
changed");
<br>&nbsp;&nbsp;&nbsp; }}
<br><font size=+1></font>&nbsp;</html>

--------------8698D416E000D98F2AA7518B--
Technical Details
Message-ID: <366D559D.3675C352@lancomp.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36681B0B.C42BFB37@gte.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,2fdf92b46fdaae02
X-Google-Attributes: gid111d45,public
From: Ramanan Varadarajan <rvaradar@lancomp.com>
Subject: Re: How to implement a JdbNavComboBox
Date: 1998/12/08
Message-ID: <366D559D.3675C352@lancomp.com>
X-Deja-AN: 420042876
References: <36681B0B.C42BFB37@gte.net>
X-Accept-Language: en
Content-Type: multipart/alternative; boundary="------------8698D416E000D98F2AA7518B"
Organization: LAN & Computer Integrators, Inc.
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing