J(Check)Tree Problems

Hi,
I'm using the JCheckTree from: http://www.fawcette.com/archives/premier/mgznarch/javapro/2001/01jan01/vc0101/vc0101.asp And have some problems with it, hopefull somebody can help me... (source on website)
1:
In a normal JTree when you dubbleclick on a folder it opens, when I dubbleclick on the JCheckTree nothing happens. I tried using: .setToggleClickCount(2) but that doesn't help. How can I solve this?
2:
In "BasicTreeCellRenderer.java" I use: setIcon(expanded ? UIManager.getIcon("FileView.fileIcon") : UIManager.getIcon("FileView.fileIcon"); to set the Icon for an item, it works. But when I click and select the item the icon is gone and the default Icon is there. When I deselect the Item the right icon is showed agian. How can I fix this?
3:
When I click on a folder al childs are automaticly selected, that's nice. I need that, but it will also be handy when I select all the child items manual the folder will be selected to. Or when I select a few child items the folder checked will be gray. (so the userS can see that items are selected when the folder is closed). How can I build this?
4:
With the option node.isSelected() I can check of the item is selected. How would it be possible to write a function that checks all the items if they are checked and but then in an array?
Hopefully somebody can help me, or push me in the right direction.
Thanks for your time and help!
Greetings,
Rene

4:
With the option I can check of the item is selected.
How would it be possible to write a function
that checks all the items if they are checked
and but then in an array?I already found this one!    
    Enumeration enum = Tree.breadthFirstEnumeration();
    while (enum.hasMoreElements()) {
      CheckTreeNode node = (CheckTreeNode)enum.nextElement();
      if (node.isSelected()) {
         if (node.isLeaf()) {
              // CODE
   }

Similar Messages

  • Use Performance Tool to check memory problem

    Hi, I am new to mac programming.
    How can I use the performance to check memory problem such as "uninitialized memory read", "memory access out of array boundary" etc?
    Thanks,
    fm

    Don't know about source code analyzer, but dbx, the Sun Studio debugger, is capable of detecting memory leaks at run time. You can use bcheck script on your application or start dbx, issue "check -leaks" and then run your app under dbx.

  • Check print Problem  - F110

    Hi,
    Automatic payment program run was carried out in the last week through F110. It was observed that 56 payment documents has been generated, but due to check lot problem, only 12 checks has been issued and the programe was terminated due to insufficinent checks.
    I would like to assign new check lot number for the above doucments for which checks not issued.
    Let me know what is the procedure 
    Thanks & Regards,
    Prasad

    Hi,
    Reprint Check (FCH7).
    Procedure
    1.       Start the transaction using the transaction code FCH7.  The Reprint Check screen appears.
    2.       As required, complete/review the following fields:
    ·         Paying company code
    ·         House bank
    ·         Account ID
    ·         Check Number
    ·         Void reason code
    ·         Check lot number
    ·         Alternative form
    ·         Padding Character
    ·         Printer for forms
    ·         Payment advice printer
    3.       Select the checkbox  to the left of Print Immediately.
    Assign points if you find this helpful.
    Zia

  • I have an Apple MacBook on which Lion 10.7, plus all updates, are successfully installed.  Can you tell me if TechTool Deluxe, normally supplied with Apple here has been now tested and found to run successfully?  I have run the program to check a problem

    I have an Apple MacBook on which Lion 10.7, plus all updates, are successfully installed.
    Can you tell me if TechTool Deluxe, normally supplied with Apple here has been now tested and found to run successfully?
    I have run the program to check a problem that I'm having. The particularly with video, and also volume structure. TEchTool Delux reports a failure for both of these components.
    I am wondering if this is realistic or not, given the start-up screen for TechTool Delux mentions on start-up that it has yet to be tested fully with Lion?
    With thanks, Ron.

    Yes, I understand, however, he Macbook is out of its Applecare, but the TechTool it still on the machine. Does that entitle me to an upgrade in TechTool?
    I suspect not, hoever, seeing I am running Lion, I am not sure at all? If you can answer this question it will help as then Imight be able to solve the problem I'm having.
    Best regards, Ron

  • Please check this problem

    please check this problem i am not getting my j2ee server deployed for a long time.
    when i try to execute my j2ee server ,i get the following problem
    C:\Documents and Settings\win>j2ee -verbose
    J2EE server listen port: 1050
    Naming service started:1050
    Exception in thread "main" java.lang.NoSuchMethodError
    at com.sun.corba.ee.internal.corba.AnyImpl.createTypeCodeForClass(AnyImp
    l.java:1256)
    at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.createTypeCode(Sh
    utdownUtilDelegate.java:223)
    at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.writeAny(Shutdown
    UtilDelegate.java:178)
    at javax.rmi.CORBA.Util.writeAny(Util.java:80)
    at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.re
    bind(Unknown Source)
    at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:188
    at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:202
    at javax.naming.InitialContext.rebind(InitialContext.java:370)
    at com.sun.enterprise.naming.NamingManagerImpl.publishObject(NamingManag
    erImpl.java:192)
    at com.sun.enterprise.naming.NamingManagerImpl.publishObject(NamingManag
    erImpl.java:149)
    at com.sun.enterprise.server.J2EEServer.bindObject(J2EEServer.java:718)
    at com.sun.enterprise.server.J2EEServer.createServerObject(J2EEServer.ja
    va:473)
    at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:244)
    at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972)
    may be path variables are not set properly plaese tell what is the problem.thank you.

    sounds to me like you have a stale corba stub or something, but i'm no corba expert and i thought it went extinct about 5 years ago

  • Check-tree node size (TreeUI problem?)

    Hello,
    We are using a JTree with a Renderer that displays for certain nodes the plain node, and for certain nodes a panel containing a JCheckbox and the JLabel.
    Everything works, except in the nodes with the checkboxes the text is truncated and ends with "..."
    The setPreferedSize in the Renderer seems to affect ALL the nodes at the same time (with or without the JCeckbox).
    Is this a problem we can solve in the renderer itself, or do we have to set the UI of the JTree?
    Thanks in advance

    Are you using the same renderer for all the cells and if so, how do you hide the checkbox when you don't want it.
    Difficult to answer your question without an SSCCE but my guess would be that your layout of the label and checkbox is not allowing the label to show its preferred width. For example, the same problem in the JTable case is discussed here: http://forum.java.sun.com/thread.jspa?forumID=57&threadID=5278382

  • Two iterators browsing the same data (a table and a tree) problem

    I have an ADF UIX application with a navigation tree and a central page with a table of the records of a Works view object.
    There is a hierarchical relationship of Works ->Subworks-> Tasks which is shown in the tree. In the central part of the page, there is a table of Works.
    I want
    1) the tree to show all the data, but only about 10 works at a time (using small arrows for scrolling up and down)
    2) the table to show only 10 or 20 records each time. Not the same with the tree.
    3) Both clicking on a link on the tree and selecting a work on the table will open the appropriate page.
    4) Opening the children of a node in the tree and clicking on the links being able to send me directly in the correct subwork or task page EVEN if I haven't visited the parent node (work) first.
    I cannot seem to be able to succed in the "even if" part of 4 and I can succeed in only any 2 of the first three.
    If the tree iterator and table iterator point to the same view object (work1 for example), it is impossible to show a different set of works in the tree and the table
    If I use different view objects, then, if the tree part is working, the table selection doesn't work. I imagined that's a problem with "SetCurrentRowWithIndex" and I tried to set up correctly a "SetCurrentRowWithKey" event, but I didn't know how to write the handler. (I use JHS event handling, by the way)
    I suppose the following has errors:
    <event name="setCurrentRowWithKey" source="GetaeergView1">
    <set target="${bindings.GetaeergView1Iterator}" property="currentRowKeyInRange" value="${ui:tableSelectedKey(uix, 'GetaeergView1')}"/>
    </event>
    Any suggestions?

    Noone has tried this again?

  • Check out problem with InCopy / Alfresco

    I use the following components:
    InCopy CS5 7.0.3
    Drive 2.1.0.204
    Alfresco 3.4.0 (d 3370)
    Before I can start editing the text in InCopy, a dialog comes up and I have to check out the content
    (Don't know the exact words of the dialog, because i only have a german version).
    But when I try to check out the content, nothing happens.
    The following error message appears in the log file 'CS5ServiceManager_java.log':
    2011/03/10 11:56:24,326 [ConnectionHandler-kernel] ERROR GetAssetsHandler - asset not found: /.Trashes
    2011/03/10 11:56:24,415 [ConnectionHandler-kernel] ERROR GetAssetsHandler - asset not found: /Testbereich/Ausgabe 03-09/om_dok Aufgaben/Text editieren.injb
    2011/03/10 11:56:49,669 [ConnectionHandler-kernel] ERROR GetAssetsHandler - asset not found: /.Trashes
    2011/03/10 11:56:49,731 [ConnectionHandler-kernel] ERROR GetAssetsHandler - asset not found: /Testbereich/Ausgabe 03-09/om_dok Aufgaben/Text editieren.injb
    2011/03/10 11:56:53,524 [JobHandler-3] ERROR CheckOut - Caught exception
    com.adobe.drive.data.model.DriveException: The assets are opened by point products.
    at com.adobe.drive.internal.data.manager.DataManager.checkOperationIsAllowed(DataManager.jav a:7941)
    at com.adobe.drive.internal.data.manager.DataManager.checkOperationIsAllowed(DataManager.jav a:7930)
    at com.adobe.drive.internal.data.manager.DataManager.checkOut(DataManager.java:3763)
    at com.adobe.drive.internal.biz.versioncue.service.call.CheckOut.executeItem(CheckOut.java:9 3)
    at com.adobe.drive.internal.biz.versioncue.service.call.CheckOut.executeItem(CheckOut.java:4 7)
    at com.adobe.drive.internal.biz.versioncue.service.call.VersionCueCall$1.run(VersionCueCall. java:125)
    at com.adobe.drive.internal.biz.versioncue.service.call.VersionCueCall$1.run(VersionCueCall. java:119)
    at com.adobe.drive.data.internal.persistence.PersistenceRunner.run(PersistenceRunner.java:11 9)
    at com.adobe.drive.internal.biz.versioncue.service.call.VersionCueCall.execute(VersionCueCal l.java:134)
    at com.adobe.drive.internal.biz.versioncue.service.VersionCueService.checkOut(VersionCueServ ice.java:347)
    at com.adobe.drive.ncomm.versioncue.CheckOut.handle(CheckOut.java:57)
    at com.adobe.drive.ncomm.versioncue.VersionCueRequestHandler$1.run(VersionCueRequestHandler. java:185)
    at com.adobe.drive.core.internal.jobs.JobHandler$JobWrapper.run(JobHandler.java:270)
    at com.adobe.drive.core.internal.jobs.JobHandler$JobWrapper.run(JobHandler.java:286)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680) 
    So my questions are
    - what is a point product?
    - what causes this error?

    Hi, Liu,
    I have the same problem, under following conditions:
    Windows XP SP 3 (german) and - another place - Windows 7 (32 bit, german)
    Adobe Drive 2.1.0.204, as a client from a VersionCueServer CS4, version 4.0.1.090
    Adobe Bridge, opening an InCopy-File (*.icml) form here
    Adobe InCopy CS4 (version 6.0.6), checkout from here does not work: 
    InCopy-File is ever write-protected
    Is there any software-patch or workaround available, until Adobe Drive 2.2 is on the market?
    Thanks in advance for your answer, Yours sincerly Thomas Diedrich

  • APP ::::It clearning my open items, But spool and check dislay problem

    Hi
    Gurus, 
    Thanks for your time,
    When i run APP, it will clearing all my open items from my house bank,  when i try to display the check register it will show no check information. 
    and i want view print preview my vendors summary information, advice notes.
    Please help me.  i trying last 5 days same problem.
    Thank you
    anil.

    Hi
    Once you have the check the Cheak lot no  and select cheak lot seqencialy and non-rsequencilly,but App run the cheak lot select the non-rsequencilly,other we FBZP bank determation field ,
    regards
    suresh

  • Check printing problem in  Tcode F110...Urgent

    Hi All,
              I am getting problem in check printing.
    While I am running the Tcode F-58 I am getting check printing exactly in one page.But the problem here is when I am printing the check using Tcode F110 its giving print in 3 or 4 pages.The last page is getting the correct Invoice entry ,but the first three pages are getting prints like VOID**VOID*.
    How to delete the first three unwanted pages which contains VOID.
    Please let me know abt this issue.
    This is an Damm urgent issue.
    Thanks in Advance.
    Regards,
    Sudheer.

    Hi,
    Well, as it's so urgent.....
    This is standard functionality, designed to make sure the cheque paper is correctly linded up in the printer.  The number of pages is set in the selection screen of the print program in field 'Number of sample printouts'.  Set this to 0 to stop the pages appearing.
    Regards,
    Nick

  • Bapi_Document_Create2: Check In Problem

    Hi All,
    we want to perform Transaction CV01n via FM.
    I tried the BAPI_DOCUMENT_CREATE2 to to the Job but i cant find the correct Parameter to Check in Documents into the Archiv.
    The Parameters lt_files-storagecategory = 'SAP-System' and lt_files-storagecategory = 'VAULT' are shown but the Archiv is missing.
    I found the Destiation Link in Transactin OAC0 (Content repository), it has te Value XY and The Type is ARCHLINK.
    Any Ideas on this toppic?
    Best Regards
    SR

    Hi everyone,
    Due to holidays, i gotta  post under another account...
    There was a logical mistake in my problem:
    -> i thought i had to do the physical checkin of the files while or after the BAPI_DOCUMENT_CREATE2-call.
    In my case, the content-server is reachable from the app-server as it's been defined in the AL11.
    The content-server is directly defined in table TDWD with complete directorypath as a vault-server (NO DVA-VAULT).
    The SAP-FBs do actually handle two cases for file-checkin that can suit my concern::
    -> DVA-Vault?->FTP-Connect for filetransfer
    -> No DVA-Vault? ->Local GUI-Upload  for filetransfer
    For background-processing fails always the GUI-Upload -> normal
    I don't use any DVA-Vault -> i must do something else.
    Solution: Ridiculously easy...
    *-> FIRST :Physical Checkin over a stupid TRANSFER DATASET for the file.
    *If OK:
    *->SECOND: Call of  BAPI_DOCUMENT_CREATE2 with reference to the transferred File
    *      ->Structure BAPI_DOC_DRAW2:
    *          -> Short Dataname in BAPI_DOC_DRAW2-docfile1
    *          -> Datacarrier in BAPI_DOC_DRAW2-datacarrier1 (actually the key for the VAULT-server)
    *          -> App.type in BAPI_DOC_DRAW2-wsapplication1.
    *          -> Description, Documentype, username, laboratory are must-fields with my customizing too.
    *       ->Internal Table BAPI_DOC_FILES2:
    *          -> Short Dataname in BAPI_DOC_FILES2-docfile
    *          -> Datacarrier in  BAPI_DOC_FILES2-storagecategory (actually the key for the VAULT-server)
    *          -> App.type in BAPI_DOC_FILES2-wsapplication.
    *          -> no other fields required for this table
    *       ->(...)
    *endif.
    Now it runs fine every 5 minutes and i handle about 3000 documents a day...
    I give points to Phillip van den Heever who reminded me the AL11-Setting and i mark this topic solved as soon as i can...
    Thanks to everyone and greets,
    Guillaume Delorme

  • Sound Check/Volume Problem

    i've read in 'ipod help' in itunes that i can set all my songs to play at the same volume. i have followed the instructions (edit, preferences, playback, sound check) ticked the box and set up my ipod. but, i still have some songs that play very quietly and some that are extremely loud.
    please help.....

    I have the same problem.
    the short term and tedius solution is to individually increase the volume (or level) on quiet tracks. you can do this to individual or groups of tracks (if you know a whole album plays a lower level. when you click on information then options, there is a volume control. Here you can increase the level of the track so it plays louder.
    but i have 7000 tracks and i will never know all the quiet ones, so i am looking for a more comprehensive solution - a way to make sound check actually work...

  • ALV Tree Problem with Checkboxes

    Hello,
    i've got a problem.
    I have an ALV-Tree and die ALV-Detaillist of the tree are type checkbox.
    That's working correct.
    But i want to fill initial data in the checkboxes but the checkbox isnt set.
    i've done as followed:
      CALL METHOD go_alv_tree->set_table_for_first_display
        EXPORTING
         I_STRUCTURE_NAME     =
         IS_VARIANT           =
         I_SAVE               =
          i_default            = abap_false
          is_hierarchy_header  = ls_header
         IS_EXCEPTION_FIELD   =
         IT_SPECIAL_GROUPS    =
         IT_LIST_COMMENTARY   =
         I_LOGO               =
         I_BACKGROUND_ID      =
         IT_TOOLBAR_EXCLUDING =
        CHANGING
          it_outtab            = <go_data_tab>
         IT_FILTER            =
          it_fieldcatalog      = lt_fcat.
    fieldcat are several fields all as checkbox.
    Then i get a component of the output structure and set a X.
    ASSIGN COMPONENT lv_help_arbpl OF STRUCTURE <go_data_struc>
                           TO <fs_arbl>.
          IF <fs_arbl> IS ASSIGNED.
            <fs_arbl> = lc_xfeld.
          ENDIF.
            CALL METHOD go_alv_tree->add_node
              EXPORTING
                i_relat_node_key     = lv_matnr
                i_relationship       = cl_gui_column_tree=>relat_last_child
                is_outtab_line       = <go_data_struc>
                is_node_layout       = ls_layout
             IT_ITEM_LAYOUT       =
                i_node_text          = lv_node_text
              IMPORTING
                e_new_node_key       = lv_period
              EXCEPTIONS
                relat_node_not_found = 1
                node_not_found       = 2
                OTHERS               = 3.
    in <go_data_struc> the fields which should be set, are set with X.
    But after i add all of my nodes and do CALL METHOD p_go_alv_tree->frontend_update, the checkbox is empty but there is an X in the field beside the checkbox.
    Thanks in advance.
    best regards,
    Dennis

    Ok i solved the problem.
    best regards,
    Dennis

  • Datagrid checkbox headerrenderer check off problem

    I have a datagrid where one column has select option like what we have in mail inboxes. User can select one or many row items to perform any actions by selecting the checkbox. It has also one select all option which is shown in the header renderer of that particular column. If user clicks on that all checkboxes gets selected.
    I have done that but the problem is that whenever i am performing any action by selecting all(header checkbox) and as a result the datagrid sometimes sets visible off or switches to some other mxml component from the component which is holding the datagrid and after coming back from that scenario again to the datagrid, its seen that the checkbox is still checked ... i want that checkbox to set to non-checked.
    help me.

    Hi subhajit nag,
    Say the below is your mxml component in viewStack...
    <your component>
    <mx:Script>
    <![CDATA[
    [Bindable]private var headerChecked:Boolean = false;
    private function onShow():void
         headerChecked = false;
    ]]>
    </mx:Script>
    </your component>
    <mx:DataGrid x="35" y="10" id="mydg">
            <mx:columns>        
                <mx:DataGridColumn editable="true" sortable="false">
                 <mx:headerRenderer>
                  <mx:Component>
                            <mx:CheckBox selected="{outerDocument.headerChecked}" click="checkUnCheckCheckBoxes()">
                             <mx:Script>
                      <![CDATA[
                       import mx.collections.ArrayCollection;
                   private function checkUnCheckCheckBoxes():void
                      // You can handle your logic what you want to do when header check box is clicked....   
                      ]]>
                  </mx:Script>
                            </mx:CheckBox>
                        </mx:Component>
                 </mx:headerRenderer>
                    <mx:itemRenderer>                
                        <mx:Component>
                            <mx:CheckBox selected="{data.isSelected}" click="{data.recselected = !data.recselected}"/>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
                <mx:DataGridColumn headerText="Column 1" dataField="firstName"/>
                <mx:DataGridColumn headerText="Column 2" dataField="lastName"/>           
            </mx:columns>
        </mx:DataGrid>
    So you just need to change the value of the headerChecked  bindable variable to false..in show event for your first scenario...and your header check box is automatically unselected because this check box is binded to a bindable variable to which you are setting to false...
    For your second scenario....you can use the same changing the headerChecked value to false...
    You need to set this varibale to false in your second scenario where you know that your Header Render datagrid is making it visible after you made it unvisible...
    say you have clicked header check box and you made this datagrid invisible and this header checkbox datagrid will be visible once again when you click toggle button so set the value to false in the toggle button click function....
    private function toggleButtonClickHandler():void
         headerChecked = false;
         yourHeaderChkDataGrid.visible = true;
         yourAnotherDG.visible = false;
    Hope this is clear for you now...Try this and let me know...
    Thanks,
    Bhasker Chari

  • Check print problem

    Hi
    i have problem in check printing .
    we are running Z program and using the form F110_PRENUM_CHECK   and it prints check correctly when there are 30 or less than checks per document no. (it means one page ) .i am getting problem when there are more than 30 checks bcs it is printing in more than one page and we are using text element 545 (standard driver program RFFOUS_C - prints check in last page) . 
    can any body help me in this to print check in first page even there are more than 30 checks per document
    I appreciate all your help
    Thanks

    This can be done in different ways...
    1) it is required to modify the driver program according to your requirment.
    2) if you don't wnat to modify the driver program, then write the following code in your layout
    Goto check window and see where it is printing void... now replace void statement with one condition...
    Ex: IF &PAGE& EQ 1.
        Print details of the check
         ELSE.
         Print void.
        Endif.
    Now goto the actual check, and place the following condition
    IF &PAGE& EQ 1.
        Print details of the check
         ELSE.
         Print void.
        Endif.
    I guess this will help to solve your issue.
    Close the thread once your question is answered.
    Regards,
    SaiRam

Maybe you are looking for

  • Can I re-download iPod Games that I've purchased?

    I bought all the games that were available when they first came out, transferred them to my iPod (5th Generation) using iTunes for Windows, and everything was peachy. Until I deleted my old Windows XP partition and decided to go with Windows Vista fu

  • Need Help with creating photo CD's

    PSE 7.0....using "share", I created a few CDs the other day with no problem.  Now it doesn't see the blank CD...I've tried several and it just doesn't see it...it sees the drive, but not the blank CD when I put one in...I ran a registry cleaner in be

  • Download acrobat 8 standard version

    Can you please give me a link to a standard acrabat 8 version instead of a professional?

  • SFTP in Krusader as user: "Unknown error"

    Hello, I would like to connect to various sftp-servers using Krusader, but most* of my attempts fail, and I get the following error message: Unknown error: SFTP error: 1 Execution of the ssh program didn't succeed. (1st line verbatim, 2nd and 3rd bac

  • MacBook Pro Not Working with Dell V715W Printer?

    Hello.  I have a 2010 MacBook Pro 13-inch that's hooked up to a Dell V715W Printer.  I can print out a test page fine, but nothing else.  It always says "Filter Failed." Sometimes, however, a message comes up with a TON of code and details with the s