How to make parent node JCheckbox

How can I make the parent node in
http://www.java2s.com/Code/Java/Swing-JFC/CheckBoxNodeTreeSample.htm
to a checkbox.
Any help is greatly appreciated.
Regards,
Anees

See my example here: [http://forums.sun.com/thread.jspa?threadID=5180008&messageID=9699576]
If you have a specific problem post a Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the problem.

Similar Messages

  • DMEE : how to make parent node disappear when child node is empty

    Hi Friends ,
    Currently i am working on DMEE , I have a problem . When Child node is empty I donot want the parent node to appear in the tree.Here I am uisng a field via exit function module for childnode. so not a fpay* strucutre field to write a condition.
    Is there any other way for this ?
    Please help.
    Komaravolu

    I'm not sure if this can be done in DMEE tree, but there is BADI DMEE_BADI_01 that can be implemented to perform any kind of postprocessing right before the file is created. I used it, for example, to replace separators with tabs. I believe this can also be used to eliminate the unneeded nodes.

  • How to make all nodes in a detailed navigation tree open automatically??

    Dear All,
    I have added some iViews to two folders and add these two folders to a workset "Time" and then add "Time" to the role of Employee portal user.
    How to make all nodes expanded automatically when this workset is clicked in EP??
    thanks,
    Zita

    Not surprising...it does not work even if you follow the exact way...
    Role ->
             Workset 1
                          -> Page 1
                          -> Workset 2
                                           -> Page 2
                          -> Workset 3
                                           -> Page 3
    When the user clicks on Role which is the Entry Point, I want the user to see Page1 (works alright) and want the tree node Workset 2 open (doesn't work)...I want tree node Workset 3 closed (which is what happens...)
    The thing is Workset 2 has to be open...
    This is what I've done...I've made the Initial State of Navigation Panel set to "Open"...
    What else is to be done????
    Thanks a lot.
    JP

  • How to make a node chooseable

    this is my tree:
    <af:tree value="#{favoriteTreeMB.treeModel}" var="node"
    rowSelection="single" id="pt_t1">
    <f:facet name="nodeStamp">
    <af:group>
    <af:goLink text="#{node.attributes['name']}" styleClass="common"
    destination="#{node.attributes['link']}"
    rendered="#{not empty node.attributes['taskflow']}"/>
    <af:outputText value="#{node.attributes['name']}"
    rendered="#{empty node.attributes['taskflow']}"/>
    </af:group>
    </f:facet>
    <f:facet name="pathStamp"></f:facet>
    </af:tree>
    this is the tree model:
    public class FavoriteTreeModel extends ChildPropertyTreeModel {
    public FavoriteTreeModel() {
    super();
    public FavoriteTreeModel(java.lang.Object p1, java.lang.String p2) {
    super(p1, p2);
    @Override
    public boolean isContainer() {
    return ((TreeNode)getRowData()).isLeaf();
    how to make the node chooseable,and how to get the choosed node?

    Hi,
    the tree component has a selectionListener property that you need to wire with a method on your tree model using EL
    Frank

  • Filteredtreemodel, how to hide parent nodes if no children

    hi. i have surfed and read a lot of posts and topics here regarding filteredtreemodel. some i found hard to understand so i chose to use NiceGuy1's code from long ago since it's the easiest to understand.
    package test;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreeNode;
    import java.util.ArrayList;
    import java.util.Enumeration;
    public class FilteredTreeModel extends DefaultTreeModel {
        // this hashmap gets the list of pdf files and the filter status
        private String filterText;
        private DefaultMutableTreeNode orig_root;
        public FilteredTreeModel(DefaultMutableTreeNode root) {
            super(root);
            orig_root = root;
        public void setFilterText(String s) {
            this.filterText = s;
            reload();
        public String getFilterText() {
            return this.filterText;
        @Override
        public Object getChild(Object parent, int index) {
            return getFilteredChildren(parent).get(index);
        @Override
        public int getChildCount(Object parent) {
            return getFilteredChildCount(parent);
        @Override
        public int getIndexOfChild(Object parent, Object child) {
            return getFilteredChildren(parent).indexOf(child);
        private int getFilteredChildCount(Object parent) {
            return getFilteredChildren(parent).size();
        private ArrayList<TreeNode> getFilteredChildren(Object parent) {
            ArrayList<TreeNode> filteredChildren = new ArrayList<TreeNode>();
            DefaultMutableTreeNode parentNode = null;
            parentNode = (DefaultMutableTreeNode)parent;
            for (Enumeration e=parentNode.children(); e.hasMoreElements();) {
                DefaultMutableTreeNode nextNode = (DefaultMutableTreeNode) e.nextElement();
                DefaultMutableTreeNode dummy = null;
                  if (nextNode.children().hasMoreElements()) {
                      filteredChildren.add(nextNode);
                } else {
                    // if node is leaf node
                    if (filterText == null ) {
                        // add right away if no filter
                        filteredChildren.add(nextNode);
                    } else {
                        // if filter matches this leaf node, add it. if not, how to check if
                        // parent nodes have empty children and remove it.
            return filteredChildren;
    }i havent had luck the whole day trying to make this work. it seemed that once the filteredChildren.add() is called, it gets rendered to the treecellrenreder right away so if i wnat to remove the parents (in case it has no children based on the filter),the parent nodes will stay put in the jtree. any workaround? or ideas? i dont want to use a different defaulttreemodel for this. i want to avoid that because i have lots of nodes in my jtree.

    Looks like you need this:
    for (Enumeration e=parentNode.getFilteredChildren(); e.hasMoreElements();) Edit: okay, that was just a quick guess. Actually you're going to get into trouble if you try to recursively suppress nodes with no children. First you suppress all the leaf nodes (because they naturally don't have any children). Then you suppress all of their parents, because now they don't have any unsuppressed children. Then you suppress all of the parents' parents, because now they don't have any unsuppressed children... and so on until you only have the root left. So you need to refine that requirement.
    But I get what you're saying. I had to do a similar thing, only I didn't use a FilteredTreeModel, I just built the TreeModel based on a selection from another tree. It's ridiculously hard to do when you don't get the nodes in order from the database, too, but that's a different problem.

  • JTree: How to make few nodes editable

    I have a JTree which displays some complex expression.
    I want to make few nodes of the JTree editable and specify JCombobox as an editor. How can I do this?
    Any help or pointer?
    Thanks in advance
    Sachin

    I want to make few nodes of the JTree editablei'm not sure how you can do this - there is JTree.setPathEditable(boolean) but this means you'd have to subclass JTree ?
    you might be able to make a cell editor that returns some value to indicate a particular cell isn't editable, or failing that return a read-only component but I've not tried this..
    and specify JCombobox as an editor.this may help:
    http://www.cs.cf.ac.uk/Dave/HCI/HCI_Handout_CALLER/node156.html
    asjf

  • How to make 2 Node File Cluster with SAS Disks

    Hello,
    I cant fine any detailed, specific information and answer on this question
    I have 2 Servers, Say HP, with 4 SAS disks each,  1 for OS (2012R2Data) and 3 available.
    I want to create fault tolerant SMB 3.0 share for my Hyper-v nodes, to make hyper-v FT cluster afterwards.
    So, I see inr equirements that SAS disks will work, but during creating cluster, I can not manage Cluster to see disks from both servers (total 6 free units)
    If it is made via ISCSi target, both servers have access to that targets and cluster sees all available through iSCSI disks, but how to mnake SAS disk available to other server?
    Is it possible what I need with this configuration?  is it a option to make each server iSCSI target and initiator? (but it would be way complicated and slow, I think).
    so, what I have misunderstood, how to make FT file Cluster with 2 servers with SAS drives?
    Any info about this SPECIFIC config would be welcomed, or any general step-by-step guides  (please, do not link me guides with other config, like iscsi or with additional servers, I have seen a lot of them :()
    thanks

    Hello,
    I cant fine any detailed, specific information and answer on this question
    I have 2 Servers, Say HP, with 4 SAS disks each,  1 for OS (2012R2Data) and 3 available.
    I want to create fault tolerant SMB 3.0 share for my Hyper-v nodes, to make hyper-v FT cluster afterwards.
    So, I see inr equirements that SAS disks will work, but during creating cluster, I can not manage Cluster to see disks from both servers (total 6 free units)
    If it is made via ISCSi target, both servers have access to that targets and cluster sees all available through iSCSI disks, but how to mnake SAS disk available to other server?
    Is it possible what I need with this configuration?  is it a option to make each server iSCSI target and initiator? (but it would be way complicated and slow, I think).
    so, what I have misunderstood, how to make FT file Cluster with 2 servers with SAS drives?
    Any info about this SPECIFIC config would be welcomed, or any general step-by-step guides  (please, do not link me guides with other config, like iscsi or with additional servers, I have seen a lot of them :()
    thanks
    You cannot do what you want with a Microsoft built-in tools. MSFT require you to take your SAS disks away from your servers, buy a SAS JBOD (better more then one to get advantage of a so-called "enclosure awareness" and avoid single point of failure) and
    configure Clustered Storage Spaces with now *external* SAS drives. See:
    How to Configure a Clustered Storage Space in Windows Server 2012
    http://blogs.msdn.com/b/clustering/archive/2012/06/02/10314262.aspx
    Prerequisites
             A minimum of three physical drives, with at least 4 gigabytes (GB) capacity each, are required to create a storage
    pool in a Failover Cluster.
             The clustered storage pool MUST be comprised
    of Serial Attached SCSI (SAS) connected physical disks. Layering any form of storage subsystem, whether an internal RAID card or an external RAID box, regardless of being directly connected or connected via a storage fabric, is not supported.
    Windows Server 2012 R2 had flexed out some limitations so now ReFS is supported (but useless as VMs cannot be integrity checked and protected) and now you can use parirty spaces (also useless as they are DOG slow with a typical VM workload dominated by small
    writes, say 4KB write initiates 256KB+ parity stripe read-modify-write update). Core requirements "SAS everywhere" is still there.
    So if you don't want to mess with SAS JBODs you may give a try to a virtual SAN solutions available on the market. They can cluster a pair of hosts (even with a single port SATA drives) w/o any external hardware, only Ethernet required. There are even free
    options available. See:
    Free Virtual SAN
    http://www.starwindsoftware.com/native-san-for-hyper-v-free-edition
    Also Google (or Bing?) for DataCore and SteelEye as they have very similar native (Windows-based) offerings. + there's bunch of a VM-running storage doing more or less the same.
    Hope this helped a bit :)
    StarWind VSAN [Virtual SAN] clusters Hyper-V without SAS, Fibre Channel, SMB 3.0 or iSCSI, uses Ethernet to mirror internally mounted SATA disks between hosts.

  • How to make some nodes invisible?

    I set up a xml tree with JTree.Now I want to make some nodes invisible like the nodes which the name of the node is "datatype",how can I ?Thank you.

    I don't know if the nodes can be made invisible. But if you make cell renderer then you can evaluate the value before displaying it. If value is like 'datatype', you display (cell renderer displays) nothing as value in the cell.

  • How to get Parent nodes and corresponding child nodes in BI Hierarchy

    Hi all,
    I have a standard function module 'RSNDI_SHIE_STRUCTURE_GET3'  to get child node if i pass parent node. But I need child nodes along with the provided parent node as I use this in a loop in BI.
    Thanks

    Could any one help me in this regards .
    Thanks in advance
    Regards,
    sri

  • How to make a node of a Hierarchical Tree BOLD

    When we click the node of a Hierarchical Tree, we want to make the node BOLD. We tried using set item property but it's not working.

    There aren't really any built-ins that will allow you to change the Font Weight of the Tree Node Label. You might be able to accomplish this with Java, but you would have to write your own Java Bean to implement. It might be easier to simply add an Asterisk (*) to the label programatically using the Set-Tree-Node-Property() built-in, but this presents problems with removing the asterisk when you leave the selected node or select a new node. It can be resolved, but you'll have to record all the information you'll need to reset the node - namly just the Node_ID.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Feb 24, 2012 7:52 AM

  • How to remove parent nodes in an output XML?

    Hi! I'm having a problem as to removing a parent node in an xml output. The scenario goes like this, I have a source IDOC and two target External Definitions. When I have declared the two External Definitions, XI inserted a structure in the output xml as shown below:
    Messages        (1..1)
              Message1       (1..1)
                 Message1Header    (0..1)
              Message2       (1..1)
                 Message2Header    (0..1)
    Is there anyway to have an output that looks just like this (without their respective parent nodes)?
    a.) Message1Header  (0..1)
    or
    b.) Message2Header  (0..1)
    Please help
    Regards,
    Mark

    Since you have two External Definitions and you are using both in on mapping hence your scenario becomes 1:N mapping scenario and this is the reason you are getting the additional nodes in your mapping.
    so if your requirement is 1:N then whatever you are getting is correct, you can refer the below mentioned blog for help on this, But if you don't want the additonal nodes then you have to create TWO different mappings and used the external definitions seprately in each mapping.
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    I hope it helps...

  • How to make entire node attribute elements as read-only ?

    Hi Experts,
    I have an requirement to make all fields of an form view (based on one context node) in UI to be shown in Display mode. Any idea on how to acheive that ?
    I know get_i_xxxx method. But, they should be coded for each attribute seperately. Any method based on node level ?
    Also, any method based on entity ? I see a method 'switch_to_change_mode' of class cl_crm_bol_entity. But, there is no other method to change to display mode.
    Thanks & Regards,
    Gaurav.

    Hi Gaurav,
      In your htm page you can place the below thing.
    displayMode     = "<%= controller->view_group_context->is_view_in_display_mode( controller ) %>" />
    When the user clicks on the Edit button , in the edit event handler set the view to change mode using method SET_VIEW_EDITABLE.
    Hope this helps you.
    Regards,
    Lakshmi.Y

  • How to generate parent node id and child node id from xmltable ?

    Hi All, Below is a part of the xml data which is loaded in a table. I need help in generating the parent id for compensationReference say for the first occurence of compensationReference node it should be 1 and for subsequent nodes 2,3,4,.. Can some one please help me in getting this done using a sql query ??                                                         VID                          9100000013890660                                                        ACN                          5924112896                                                                          VID                          9100000013890678                                                              ACN                          5924112896                                                                                VID                            9100000013890611                                                                    ACN                            5924112896                                                                                        VID                                9100000013890645                                                                          ACN                                  5924112896                              Thanks, Bhaskar

    that doesn't look like XML data to me.
    Please post some correct example data and expected output as described in the FAQ: Re: 2. How do I ask a question on the forums?

  • HOw to get parent node name value through its child node?

    Hi,
    Experts,
    I am able to get child node name values but according to attribute name value i want to  get its parent name value how to achieve that. For that i have used If_Ixml_element->Get_parent. Please pass some idea on it.
    Thanks in advance,
    Shabeer ahmed.

    Hello Shabeer
    I think the coding should be straightforward:
    DATA: lo_element   TYPE REF TO if_ixml_element,
              lo_child        TYPE REF TO if_ixml_node,
              lo_parent      TYPE REF TO if_ixml_node.
    " NOTE: LO_ELEMENT holds your child node
      lo_child ?= lo_element.
      lo_parent = lo_child->get_parent( ).
    Regards
      Uwe

  • How to make a node 3 undotbs recover in RCA

    Hi Experts,
    We have 4 node RAC with database 10.2.0.4 at ASM in redhat
    I got an error as
    ORA-00376: file 6 cannot be read at this time
    ORA-01110: data file 6: '+DATA1/sale/datafile/undotbs3.272.690290289'
    even I created new undotbs3b and made new undotbs3b as default undo at node3.
    I still get some error.
    I check example at ORA-00376
    I try to recover datafile as
    SQL> select ONLINE_STATUS from dba_data_files
    2 where file_id = 6;
    ONLINE_
    RECOVER
    SQL> recover datafile 6;
    ORA-00279: change 7367573185205 generated at 01/23/2010 02:18:30 needed for
    thread 3
    ORA-00289: suggestion : +FLSDISK1
    ORA-00280: change 7367573185205 for thread 3 is in sequence #2526
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    I got above error message.
    How to recover undotbs3 at node3.
    I am looking for help!!
    JIm

    Hi damorgan ,
    CREATE UNDO TABLESPACE "UNDOTBS3B" DATAFILE
    '+DATA1/sale/datafile/undotbs3b.678.709037439' SIZE 7340032000
    AUTOEXTEND ON NEXT 104857600 MAXSIZE 32767M
    BLOCKSIZE 8192
    EXTENT MANAGEMENT LOCAL AUTOALLOCATE
    SQL> column file_name format a50
    SQL> SELECT file_name, status FROM dba_data_files;
    ILE_NAME STATUS
    DATA1/sale/datafile/users.267.690290115 AVAILABLE
    DATA1/sale/datafile/sysaux.263.690290115 AVAILABLE
    DATA1/sale/datafile/undotbs1.268.690290115 AVAILABLE
    DATA1/sale/datafile/system.273.690290113 AVAILABLE
    DATA1/sale/datafile/undotbs2.269.690290179 AVAILABLE
    DATA1/sale/datafile/undotbs3.272.690290179 AVAILABLE
    DATA1/sale/datafile/undotbs4.271.690290179 AVAILABLE
    DATA1/sale/datafile/audit_data.261.690804837 AVAILABLE
    DATA1/sale/datafile/users.266.691065529 AVAILABLE
    DATA1/sale/datafile/dvptbs.276.694187101 AVAILABLE
    DATA1/sale/datafile/users.265.691628111 AVAILABLE
    ILE_NAME STATUS
    DATA1/sale/datafile/users.264.691628151 AVAILABLE
    DATA1/sale/datafile/users.259.691628381 AVAILABLE
    DATA1/sale/datafile/users.257.691628523 AVAILABLE
    DATA1/sale/datafile/users.258.691628555 AVAILABLE
    DATA1/sale/datafile/users.256.691628587 AVAILABLE
    DATA1/sale/datafile/users.274.691628611 AVAILABLE
    DATA1/sale/datafile/users.275.691628671 AVAILABLE
    DATA1/sale/datafile/undotbs3c.571.709068541 AVAILABLE
    I check each node. all default undotbs does not use undotbs3. the pfile and spfile also does not point to undotbs3.
    Can I drop undotbs3? it does not need to use. we can reload data again
    What do I need to do next?
    I am waiting for help!!
    Jim
    Edited by: user589812 on Jan 24, 2010 8:22 AM

Maybe you are looking for

  • Can I sych and back up two Iphones with one Itunes on Win 7 without loosing data?

    hello, I just purchased an iphone 4s for my wife and I want to connect it to Itunes.  I am affraid that if I do so I will loose my Iphone contacts or get them mixed with her phone.  Is there a way to connect two phones to one Itunes program and have

  • If have two different Mac mini at two different locations. Both are running Lion. Connecting my iPhone 4G

    Hello, I have two different Mac Mini at two different locations. Both systems are running Lion. One of the Mac Mini systems connected to my iphone G4 as well as Ipad 64-Wifi, work perfect to sunchronise. ( IO5 is present) I would like to run the chan

  • How to perform grouping like a daisy chain

    Hi: I have a database table of Building Inspections (InspectionID) for each Building Permit (PermittingID).  Sometimes the inspections fail and have to be re-inspected. I do not relate each re-inspection to the original inspection.  I relate each re-

  • Webpage size

    Hi I'm starting a very simple web page to display some work. I have a few brief questions that i will ask later, but in starting i was wondering how a web page is measured predominantly the horizontal size. I know that it is usually in pixels but doe

  • JDO with container (J2EE) managed DataSource

    Hello, I would like to use application server managed DataSource with JDO and would love to find a piece of documentation/link that would take me through it. In absence of such a document, any advice/idea will be appreciated. Based on the bits and pi