JTREE with CheckBox Option

Hi All,
Can somebody help in how to add a CheckBox in JTREE node concept.
Please let me if sites are there for the same.
Rgds
Sudhama

* The CheckedTree is an extension to JTree with the additional functioanlity that
* the nodes can be checked or unchecked using a checkbox.
* <p>
* Each node in the tree contains a checkbox.
* @author anoopkc
public class CheckedTree extends JTree {
    private CustomRenderer renderer = null;
    private List<TreePath> selectedNodes = null;
     * Initialises the checked tree
    public CheckedTree() {
        this.selectedNodes = new ArrayList<TreePath>();
        this.setTreeProperties();
     * Sets the properties of the tree
    private void setTreeProperties() {
        this.renderer = new CustomRenderer(this);
        super.setCellRenderer(renderer);
        super.getSelectionModel().setSelectionMode(4);
        super.addMouseListener(new MouseAdapter() {
             * Handles the click on the tree nodes.
             * When mouse is clicked on a node, the node is added in the
             * list of selected rows in the tree.
             * @param e
            public void mousePressed(MouseEvent e) {
                TreePath path = getPathForLocation(e.getX(), e.getY());
                if (path != null) {
                    addSelectedNode(path);
                    updateUI();
     * This method adds the selected path in to the list of selected nodes.
     * If the path is already exists, it is removed from the list.
     * @param path
    private void addSelectedNode(TreePath path) {
        if (selectedNodes.indexOf(path) == -1) {
            selectedNodes.add(path);
        } else {
            selectedNodes.remove(path);
     * This method checks whether a given tree path is selected or not
     * @param path
     * @return true if selected
    public boolean isSelected(TreePath path) {
        if (this.selectedNodes.indexOf(path) == -1) {
            return false;
        return true;
     * Returns the list of selected columns
     * @return list of selected columns
    public List<TreePath> getSeelctedNodes() {
        return selectedNodes;
* This class creates the renderer for the checked tree
* @author anoopkc
class CustomRenderer extends JPanel implements TreeCellRenderer {
    private JLabel label = null;
    private JCheckBox checkBox = null;
    private CheckedTree tree = null;
     * Initialises the renderer
     * @param checkedTree
    public CustomRenderer(CheckedTree checkedTree) {
        this.tree = checkedTree;
        this.prepareComponent();
     * Prepares the component
    private void prepareComponent() {
        creatComponent();
        this.packComponents();
     * Creates the component
    private void creatComponent() {
        this.label = new JLabel();
        this.label.setPreferredSize(new Dimension(100, 21));
        this.label.setForeground(UIManager.getColor("Tree.textForeground"));
        this.label.setOpaque(true);
        this.checkBox = new JCheckBox();
        this.checkBox.setBackground(UIManager.getColor("Tree.textBackground"));
     * Packs the components
    private void packComponents() {
        setLayout(new GridBagLayout());
        setBackground(Color.WHITE);
        GridBagConstraints gbcCheckBox = new GridBagConstraints();
        gbcCheckBox.gridx = 0;
        GridBagConstraints gbcLabel = new GridBagConstraints();
        gbcLabel.gridx = 0;
        gbcLabel.gridx = 1;
        gbcLabel.weightx = 1;
        gbcLabel.fill = GridBagConstraints.HORIZONTAL;
        add(this.checkBox, gbcCheckBox);
        add(this.label, gbcLabel);
     * Returns the tree cell renderer component
     * @param tree
     * @param value
     * @param selected
     * @param expanded
     * @param leaf
     * @param row
     * @param hasFocus
     * @return component
    public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
        TreePath path = tree.getPathForRow(row);
        label.setText(value.toString());
        label.setIcon(new ImageIcon("icons/smiley.gif"));
        if (selected) {
            label.setBackground(new Color(220, 220, 200));
        } else {
            label.setBackground(Color.WHITE);
        if (this.tree.isSelected(path)) {
            this.checkBox.setSelected(true);
        } else {
            checkBox.setSelected(false);
        return this;
}

Similar Messages

  • Displaying a jtree with checkboxes and enabling some default checkboxes

    I have created a jtree displaying a list of nodes hierarchically ,and created a checkbox for each node as well.
    My problem is having created the jtree with checkboxes i need to have some of the nodes in the hierarchy checked by default on first launch of the gui.To do this i read a list of treepaths from a file and would want to traverse the tree and enable the node after finding it,which is what i am having issue with.
    Your solution would be appreciated as i am a newbie and having got this far, feel like i need some back up :)
    Thanks & Regards
    Shashi

    I have created a jtree displaying a list of nodes hierarchically ,and created a checkbox for each node as well.
    My problem is having created the jtree with checkboxes i need to have some of the nodes in the hierarchy checked by default on first launch of the gui.To do this i read a list of treepaths from a file and would want to traverse the tree and enable the node after finding it,which is what i am having issue with.
    Your solution would be appreciated as i am a newbie and having got this far, feel like i need some back up :)
    Thanks & Regards
    Shashi

  • Using JTree with checkbox

    Hi All,
    I have a link for implementation of JTree with Checkbox
    http://www.jroller.com/santhosh/date/20050610 He has implemented exactly what i want but i am unable to understand the use of all the classes. Really difficult to understand
    So what i did was create a few objects with Checkbox class from AWT package and then added then to JTree using the DefaultMutableTreeStruture i got the tree working but not able to get the Checkboxex
    Can any one explain me how i can implement this senario
    I am trying different search creterias but unable to find a right detailed explanation to my query
    Rgds
    Aditya

    where did you find DefaultMutableTreeStructure?

  • Dynamic JTree with checkbox

    could anyone tell me how to display the c: drive in Jtree view and add check box for particular folder files

    You might want to take a look here and here as a starting point.

  • How can create a JTree with cellRender is checkbox realized multiple selec

    How can create a JTree with cellRender is checkbox realized multiple selection function.thanks for every
    one's help.

    Hi,
    1. Create a value node in your context name Table and set its cardinality to 0:n
    2. Create 2 value attributes within the Table node name value1 and value2
    3. Goto Outline view> Right click on TransparentUIContainer>Apply Template> Select Table>mark the node Table and it's attributes.
    you have created a table and binded its value to context
    Table UI properties
    4.Set Selection Mode to Multi
    5.Set Visible Row Count to 5
    6.ScrollableColCount to 5
    In your implemetaion, you can add values to table as follow:
    IPrivate<viewname>.ITableElement ele = wdContext.nodeTable().createTableElement();
    ele.setValue1(<value>);
    ele.setValue2(<value>);
    wdContext.nodeTable().addElement(ele);
    The above code will allow you to add elements to your table node.
    Regards,
    Murtuza

  • After upgrade to 10.10, can't send email (SMTP cert. error).  On previous version running on another machine, can still send find.  This new version is missing the "Usual Ports" checkbox option.  Can someone please help?

    I just upgraded to 10.10.  On the mail program, one of my accounts is having an issue sending email.  I am getting the following error message:
    The certificate for this server is invalid.
    Select a different outgoing mail server from the list below or click Try Later to leave the message in your Outbox until it can be sent.
    But on another machine running Mavericks, I can still continue to send email.  The same is try from my iPhone 5S.
    On that machine running Mavericks the SMTP is configured as SSL and for "Usual Ports" (25, 465, 587) but THIS OPTION IS MISSING ON THE NEW VERSION.  On the new version I have tried configuring the port to 25 and then 465 and 587 with no success.  I have used the Network Utility to see if my provider is blocking me -- it is not.  I have no third-party software on this machine (anti virus).  I can receive email fine.  On the new Yosemitie Mail there are new checkbox options of Automatically check my settings and Allow unsecure connections.  I tried to uncheck SSL for SMTP but then it says it cannot send securely my passowrd and i need to check the option "Allow to send unsecurely".  I did that but the same error message keeps appearing.  So I have tried nearly everything I have been able to, all to no avail.  Please can somebody help?

    Thanks for your reply.  Yes, it is a POP account.  Incoming mail is fine.  My port for incoming is also 110.  But the outgoing port should be 587 (or 24, 465 and 587 as on Mavericks' "Usual Ports" option).  I am using the same configuration across three different devices and only the machine running Yosemite is having issues.  I notice in the new version of Mail there is no longer the "Usual Ports" option.  I am not sure this is the culprit or not.  But the fact is no matter how I configure it, it will not send mail for these particular servers.  I have multiple clients and only one is affected, meaning I can send email from other email addresses (different hosting contracts) on Yosemite but on this one particular one I cannot. 

  • Problem with checkboxes in IR report mainly for update process please help

    Hello,
    Can anyone please help me out with this issue.
    I have an interactive report with 3 checkbox item for a single column named status. Based on the value of the column status the check box should be checked. For example:
    DECODE(status,'DEV',1,0) as DEV,
    DECODE(status,'RVW',1,0) as RVW,
    DECODE(status,'PRD',1,0) as PROD,
    So for this I have used the apex_item.checkbox item. Below is my report query
    SELECT APEX_ITEM.HIDDEN(30,0,'','f30_' || ROWNUM)
         || APEX_ITEM.HIDDEN(31,0,'','f31_' || ROWNUM)
            || APEX_ITEM.HIDDEN(01,ROWNUM,'','f01_' || ROWNUM)
         || APEX_ITEM.HIDDEN(04,CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN,'','f04_' || ROWNUM)
            || APEX_ITEM.HIDDEN(05,CHF_STATUS,'','f05_' || ROWNUM)
         || APEX_ITEM.HIDDEN(06,CHF_STATUS,'','f06_' || ROWNUM)
            || APEX_ITEM.HIDDEN(08,CHF_STATUS,'','f08_' || ROWNUM)
         || APEX_ITEM.HIDDEN(09,CHF_STATUS,'','f09_' || ROWNUM)
            || APEX_ITEM.HIDDEN(11,CHF_STATUS,'','f11_' || ROWNUM)
         || APEX_ITEM.HIDDEN(12,CHF_STATUS,'','f12_' || ROWNUM)
            || APEX_ITEM.CHECKBOX (32,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f30'');"'
         ,DECODE (0,1, ROWNUM),':','f32_' || ROWNUM) DELETE
            ,CHF_COLUMN
            ,CHF_STATUS
            ,APEX_ITEM.CHECKBOX (07,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f05'');"',DECODE (CHF_STATUS,'DEV',ROWNUM),':','f07_' || ROWNUM) 
              DEV_EDIT
         ,APEX_ITEM.CHECKBOX (10,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f08'');"',DECODE (CHF_STATUS,'RVW',ROWNUM),':','f10_' || ROWNUM) 
              RVW_EDIT
            ,APEX_ITEM.CHECKBOX (13,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f11'');"',DECODE (CHF_STATUS,'PRD',ROWNUM),':','f13_' || ROWNUM) 
              PRD_EDIT
            FROM CHF_COLUMN WHERE
    CHF_DATASTORE  = 'DOMAIN_DEV' AND
    CHF_SCHEMA     = 'SCHEMA_DEV' AND
    CHF_TABLE      = 'EMPLOYEEE'
    ORDER BY 1;  And I have a button for the update process so that the users can check the checkboxes option for the status column either 'DEV', 'RVW', 'PRD'. The status of the column can be in either of these states or can be null.
    I have a update process, its having some problem - I don't understand whats causing the problem. Below is the error message which I encountered when trying to update.
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    My Update process.
    DECLARE
    l_cnt BINARY_INTEGER := 0;
    l_stepid number := 10;
    l_date DATE := SYSDATE;
    BEGIN
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    IF APEX_APPLICATION.G_f05 (i)  = 1 THEN
          UPDATE  CHF_COLUMN
               SET      CHF_STATUS = 'DEV'
             WHERE CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN = APEX_APPLICATION.G_f04 (i)
              l_cnt := l_cnt + SQL%ROWCOUNT;
    apex_application.g_print_success_message := apex_application.g_print_success_message ||
    'Successfully updated'||l_cnt ||'<br><br>';
    END IF;
    IF APEX_APPLICATION.G_f08 (i)  = 1 THEN
          UPDATE  CHF_COLUMN
               SET      CHF_STATUS = 'RVW'
             WHERE CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN = APEX_APPLICATION.G_f04 (i)
              l_cnt := l_cnt + SQL%ROWCOUNT;
    apex_application.g_print_success_message := apex_application.g_print_success_message ||
    'Successfully updated'||l_cnt ||'<br><br>';
    END IF;
    IF APEX_APPLICATION.G_f11 (i)  = 1 THEN
          UPDATE  CHF_COLUMN
               SET      CHF_STATUS = 'PRD'
             WHERE CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN = APEX_APPLICATION.G_f04 (i)
              l_cnt := l_cnt + SQL%ROWCOUNT;
    apex_application.g_print_success_message := apex_application.g_print_success_message ||
    'Successfully updated'||l_cnt ||'<br><br>';
    END IF;
    END LOOP;
    COMMIT;
    END;If you can please have a look at the app, you can get a better understanding of my problem.
    Workspace : orton_workspace
    username : [email protected]
    password : sanadear
    Application No: 15089 SAMPLE_CHECKBOX_APP
    Thanks,
    Orton
    Edited by: orton607 on Aug 4, 2010 9:28 AM

    I could be wrong but maybe change the hidden items to be like:
    APEX_ITEM.HIDDEN(05,DECODE(CHF_STATUS,'DEV',1,0),'','f05_' || ROWNUM)
    APEX_ITEM.HIDDEN(08,DECODE(CHF_STATUS,'RVW',1,0),,'','f08_' || ROWNUM)
    APEX_ITEM.HIDDEN(11,DECODE(CHF_STATUS,'PRD',1,0),,'','f11_' || ROWNUM)so that the values are 0/1?
    Also, you have
    DECODE (CHF_STATUS,'DEV',ROWNUM)instead of
    DECODE (CHF_STATUS,'DEV',0,1)in the checkboxes, as I would expect.
    I'm also not sure why you need to duplicate the checkboxes (f07,f10,f13) as hidden items (f05, f08, f11) if they are both 0/1 values.

  • Problem with checkbox and process

    Hallo,
    I have a checkbox on my page and now I want to create a process that runs when the checkbox is checked.
    What I want to do is: to ckeck wheather the checkbox is check and if this is then to set values.
    I don't know if it is right how I check the status of the checkbox. What I also don't really know how I can decide
    that all field I go through in the loop get the same value from the XYZ-collection. The value should be the last from
    the XYZ-collection.
    Thanks, Jade
    declare
    check integer:=0;
    change integer:=0;
    begin
    check:=:Px_Check;
    if (check <> 0) then change:=1; end if;
    if change = 1 then
    for i in 1..htmldb_application.g_f04.count
    loop
    htmldb_collection.update_member_attribute(p_collection_name=>'XYZ',
    p_seq=>i,
    p_attr_number=>5,
    p_attr_value=>???);
    end loop;
    end if;
    end;

    Hi,
    Taking the two issues separately....
    1 - When dealing with checkboxes, you have to bear in mind that the submit process will only return the values of those checkboxes that have been ticked into the f04 collection (assuming f04 is the column containing your checkboxes). In order to determine which ones they are, you need to get the value (which should be a row number if you've created the checkboxes by using the Row Selector option) and then use that to get to the values on the actual rows. Something like:
    DECLARE
    vITEM NUMBER;
    BEGIN
    FOR i IN 1..HTMLDB_APPLICATION.G_F04.COUNT
    LOOP
      vITEM := HTMLDB_APPLICATION.G_F04(i);
    END LOOP;
    END;Then, within the loop, you can use vITEM as the row number. So, if the user ticked items 1, 4 and 6. G_F04(1) would contain 1, G_F04(2) would contain 4 and G_F04(3) would contain 6. Therefore, for you update statement, you can use vITEM for the sequence number of the item to update.
    2 - When dealing with collections, if you want to get to the last item in the collection, you can get the member count and use that to get to the member:
    DECLARE
    vCOUNT NUMBER;
    vDATA NUMBER;
    BEGIN
    vCOUNT := HTMLDB_COLLECTION.COLLECTION_MEMBER_COUNT ('XYZ');
    SELECT c005 INTO vDATA FROM HTMLDB_COLLECTIONS WHERE COLLECTION_NAME = 'XYZ';
    END;That should get the c005 value for the last item and store it in vDATA. You can then update the ticked items with this value.
    Andy

  • Workflow - User decision step with checkboxes

    Is it possible in standard steps to give the user step of decision, but with options with checkboxes, for example 3, so that he can check or uncheck any of them?

    Thanks, I started making on my own the method of custom business object with screen and so on.
    thanks

  • Repairing Library Permissions: But the instructions didn't work  clicking the iPhoto icon with the Option and Command keys opened iPhoto but not the First Aid as promised

    Went to Help.  But the instructions didn't work
    clicking the iPhoto icon with the Option and Command keys opened iPhoto but not the First Aid as promised

    Give this a try:
    1 -be sure to have a current backup of the iPhoto library.
    2 - download and launch http://www.macchampion.com/arbysoft/BatChmod.
    3 - click on the File button, locate and select your iPhoto Library.
    4 - check the Unlock and Apply to enclosed checkboxes.
    5 - make no changes to the other checkboxes
    6 - click on the Apply button.
    OT

  • How to find control,  jListBox with checkBoxs

    Hello Everyone
    Using Jclient/Swing application i want to use listbox with
    checkBoxs.
    Suppose listbox display list of items along with
    these checkboxs.And these checkbox varies according the
    items aviable in listbox.
    whether this type control available in jDeveloper or not.

    Thanks for reply !
    i found swing code for jListBox containing checkboxs.
    So how to use this class in Jdeveloper for using as
    a control.
    Please tell me suggetion?
    public class CheckBoxList extends JFrame
         protected JList m_list;
         //protected JLabel m_total;
         public CheckBoxList()
              super("Swing List [Check boxes]");
              setSize(360, 340);
              getContentPane().setLayout(new FlowLayout());
              InstallData[] options = {
              new InstallData("Program executable", 118),
              new InstallData("Help files", 52),
              new InstallData("Tools and converters", 83),
              new InstallData("Source code", 133),
              new InstallData("Project",147),
    new InstallData("Search",188),
    new InstallData("Edit",189),
    new InstallData("Girdher",3445)
              m_list = new JList(options);
              CheckListCellRenderer renderer = new CheckListCellRenderer();
              m_list.setCellRenderer(renderer);
              m_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
              CheckListener lst = new CheckListener(this);
              m_list.addMouseListener(lst);
              m_list.addKeyListener(lst);
              JScrollPane ps = new JScrollPane();
              ps.getViewport().add(m_list);
    //          m_total = new JLabel("Space required: 0K");
              JPanel p = new JPanel();
              p.setLayout(new BorderLayout());
              p.add(ps, BorderLayout.CENTER);
         //p.add(m_total, BorderLayout.SOUTH);
              p.setBorder(new TitledBorder(new EtchedBorder(),
                   "Please select options:") );
              getContentPane().add(p);
              WindowListener wndCloser = new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                        System.exit(0);
              addWindowListener(wndCloser);
              setVisible(true);
         //     recalcTotal();
    /*public void recalcTotal()
              ListModel model = m_list.getModel();
              int total = 0;
              for (int k=0; k < model.getSize(); k++)
                   InstallData data = (InstallData)model.getElementAt(k);
                   if (data.isSelected())
                        total += data.getSize();
              m_total.setText("Space required: "+total+"K");
         public static void main(String argv[])
              new CheckBoxList();
    class CheckListCellRenderer extends JCheckBox implements ListCellRenderer
         protected static Border m_noFocusBorder =
              new EmptyBorder(1, 1, 1, 1);
         public CheckListCellRenderer()
         super();
         setOpaque(true);
         setBorder(m_noFocusBorder);
         public Component getListCellRendererComponent(JList list,
              Object value, int index, boolean isSelected, boolean cellHasFocus)
              setText(value.toString());
              setBackground(isSelected ? list.getSelectionBackground() :
              list.getBackground());
              setForeground(isSelected ? list.getSelectionForeground() :
              list.getForeground());
              InstallData data = (InstallData)value;
              setSelected(data.isSelected());
              setFont(list.getFont());
              setBorder((cellHasFocus) ?
                   UIManager.getBorder("List.focusCellHighlightBorder")
                   : m_noFocusBorder);
              return this;
    class CheckListener implements MouseListener, KeyListener
         protected CheckBoxList m_parent;
         protected JList m_list;
         public CheckListener(CheckBoxList parent)
              m_parent = parent;
              m_list = parent.m_list;
         public void mouseClicked(MouseEvent e)
              if (e.getX() < 20)
                   doCheck();
         public void mousePressed(MouseEvent e) {}
         public void mouseReleased(MouseEvent e) {}
         public void mouseEntered(MouseEvent e) {}
         public void mouseExited(MouseEvent e) {}
         public void keyPressed(KeyEvent e)
              if (e.getKeyChar() == ' ')
                   doCheck();
         public void keyTyped(KeyEvent e) {}
         public void keyReleased(KeyEvent e) {}
         protected void doCheck()
              int index = m_list.getSelectedIndex();
              if (index < 0)
                   return;
              InstallData data = (InstallData)m_list.getModel().
                   getElementAt(index);
                   data.invertSelected();
                   m_list.repaint();
              //     m_parent.recalcTotal();
    class InstallData
    protected String m_name;
    protected int m_size;
    protected boolean m_selected;
    public InstallData(String name, int size)
         m_name = name;
         m_size = size;
         m_selected = false;
    public String getName() { return m_name; }
    public int getSize() { return m_size; }
    public void setSelected(boolean selected) { m_selected = selected;}
    public void invertSelected() { m_selected = !m_selected; }
    public boolean isSelected() { return m_selected; }
    public String toString() { return m_name+" ("+m_size+" K)"; }

  • Require Code which export SQL Query resuluts to excel using checkbox option

    Hi All,
    I need a sample code which can export the SQL Query results directly to an excel file using checkbox option. for example
    if I select checkbox1 and press a save button, then on backend SQL Query will execute and save the results in a excel file and so on.
    Thanks in advance..
    Regards,
    Chetan

    Thanks for the Code.
    Actually I need a code which is based on combo base values and when I click on Button, the SQL Query will execute using SQL Connection string and the results from that query will save into a excel file. Below is the screenshot of the form. Hope this will
    clear the requirements.
    Hello,
    To be honest, this forum is not for coding for anybody.
    You could refer to the suggestions shared above, and if you get any issue when using that code, you could share the code and error with us, we will focus on your code to help you.
    You could separate them into multiple steps, like the following.
    1. Getting the value of any control, like the textbox and combobox or even checkbox.
    2. Execute method inside button click event handler.
    3. Using ado.net to execuate sql query.
    4. Saving data to Excel.
    Then you could have a try step by step, if you get any issue, then post it in another thread with the code and error message.
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Parameter with checkboxes

    Hi folks,
    can anybody help in this issue.
       There is a parameter with searchhelp option(f4).Below that there are five checkboxes.Now if i select the entry from searchhelp,i want some of the checbox below shd not be displayed,only some shd be there.
    if i hit enter i was able to do so,i want it without hitting enter this to be done,while selecting the option from search help itself,it shd happen.
    Thanks in advance,
    Ponraj.s.

    SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:  p_ver RADIOBUTTON GROUP g1 USER-COMMAND rad DEFAULT 'X',
                 p_sab RADIOBUTTON GROUP g1 .
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln NO INTERVALS MODIF ID gr1.
    PARAMETERS:    p_dwfile TYPE  rlgrap-filename
                   DEFAULT 'C:\test1.txt' MODIF ID gr2,         "#EC NOTEXT
                   p_upfile TYPE  rlgrap-filename
                   DEFAULT 'C:\test.txt' <b>MODIF ID gr3.</b>        
    "#EC NOTEXT
    SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF  p_sab = 'X'.
          IF screen-group1 = 'GR1' OR screen-group1 = 'GR2'.
            screen-active = '0'.
            screen-invisible = '1'.
          ELSE.
            screen-active = '1'.
            screen-invisible = '0'.
          ENDIF.
          MODIFY SCREEN.
        ELSE.
          IF screen-group1 = 'GR3'.
            screen-active = '0'.
            screen-invisible = '1'.
          ELSE.
            <b>screen-active = '1'.
            screen-invisible = '0'.</b>  \
        ENDIF.
          <b>MODIFY SCREEN.</b>
        ENDIF.
      ENDLOOP.
    and use <b>USER-Command</b>
    regards
    vinod

  • Why can't I reset the master password with the option of removing all username:passwords by unchecking "Use Master Password"?

    Why can't I reset the master password with the option of removing all username:passwords by unchecking "Use Master Password"? Currently, there seems to only be the option to issue a "chrome:" command in URL which DOES reset the master password. However, it was something that I had to google. The intuitive option would be to uncheck the "Use Master Password" checkbox, receive a verification dialogue, and blammo, password reset. Please make this a feature, thank you.

    ''cor-el [[#answer-702776|said]]''
    <blockquote>
    You can remove all password in the Show Passwords dialog.
    That is where you manage the passwords.
    The master password is only for protecting the passwords with an extra level of encryption and has nothing to do with erasing passwords apart from resetting the MP in case you have forgotten the MP and can't open "Show passwords".
    </blockquote>
    Sorry, for being unclear. Essentially this is a feature request for an option under Firefox options (why not?) to reset my Master Password not knowing the Master Password. For Security reasons I understand why all the saved passwords have to be wiped, but wiping the Master Password (having forgotten it) should be an option without having to issue an arcane command that one has to google to figure out.

  • I cant modify my CheckTree Render to be a TableTree with Checkbox ?!!

    hello everybody .. i am trying for 2 week to modify my code i wrote
    (which allows me to have a tree with a checkbox ) to have a tabletree with checkbox for each node .. plz help .. this is my checkTree renderer
    package com.kelk.cfg_util_gui;
    /* swing1.1 */
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JCheckBox;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTree;
    import javax.swing.UIManager;
    import javax.swing.plaf.ColorUIResource;
    import javax.swing.tree.TreeCellRenderer;
    * @version 1.1 04/24/99
    public class CheckRenderer extends JPanel implements TreeCellRenderer {
         private static final long serialVersionUID = 1L;
         private Icon kelk = new ImageIcon("/com.kelk.cfg_util/Images/KELK32.gif");
    protected JCheckBox check;
    protected TreeLabel label;
    public CheckRenderer() {
    setLayout(null);
    add(check = new JCheckBox());
    add(label = new TreeLabel());
    check.setBackground(UIManager.getColor("Tree.textBackground"));
    label.setForeground(UIManager.getColor("Tree.textForeground"));
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean isSelected, boolean expanded,
    boolean leaf, int row, boolean hasFocus) {
    String stringValue = tree.convertValueToText(value, isSelected,
                   expanded, leaf, row, hasFocus);
    setEnabled(tree.isEnabled());
    check.setSelected(((CheckNode)value).isSelected());
    label.setFont(tree.getFont());
    label.setText(stringValue);
    label.setSelected(isSelected);
    label.setFocus(hasFocus);
    if (leaf) {
    label.setIcon(UIManager.getIcon("Tree.leafIcon"));
    //label.setBackground(Color.RED);
    } else if (expanded) {
    label.setIcon(UIManager.getIcon("Tree.openIcon"));
    } else {
    label.setIcon(UIManager.getIcon("Tree.closedIcon"));
    return this;
    public Dimension getPreferredSize() {
    Dimension d_check = check.getPreferredSize();
    Dimension d_label = label.getPreferredSize();
    return new Dimension(d_check.width + d_label.width,
    (d_check.height < d_label.height ?
    d_label.height : d_check.height));
    public void doLayout() {
    Dimension d_check = check.getPreferredSize();
    Dimension d_label = label.getPreferredSize();
    int y_check = 0;
    int y_label = 0;
    if (d_check.height < d_label.height) {
    y_check = (d_label.height - d_check.height)/2;
    } else {
    y_label = (d_check.height - d_label.height)/2;
    check.setLocation(0,y_check);
    check.setBounds(0,y_check,d_check.width,d_check.height);
    label.setLocation(d_check.width,y_label);
    label.setBounds(d_check.width,y_label,d_label.width,d_label.height);
    public void setBackground(Color color) {
    if (color instanceof ColorUIResource)
    color = null;
    super.setBackground(color);
    public class TreeLabel extends JLabel {
         private static final long serialVersionUID = 1L;
         boolean isSelected;
    boolean hasFocus;
    public TreeLabel() {
    public void setBackground(Color color) {
         if(color instanceof ColorUIResource)
         color = null;
         super.setBackground(color);
    public void paint(Graphics g) {
    String str;
    if ((str = getText()) != null) {
    if (0 < str.length()) {
    if (isSelected) {
    g.setColor(UIManager.getColor("Tree.selectionBackground"));
    } else {
    g.setColor(UIManager.getColor("Tree.textBackground"));
    Dimension d = getPreferredSize();
    int imageOffset = 0;
    Icon currentI = getIcon();
    if (currentI != null) {
    imageOffset = currentI.getIconWidth() + Math.max(0, getIconTextGap() - 1);
    g.fillRect(imageOffset, 0, d.width -1 - imageOffset, d.height);
    if (hasFocus) {
    g.setColor(UIManager.getColor("Tree.selectionBorderColor"));
    g.drawRect(imageOffset, 0, d.width -1 - imageOffset, d.height -1);
    super.paint(g);
    public Dimension getPreferredSize() {
    Dimension retDimension = super.getPreferredSize();
    if (retDimension != null) {
    retDimension = new Dimension(retDimension.width + 3,
                        retDimension.height);
    return retDimension;
    public void setSelected(boolean isSelected) {
    this.isSelected = isSelected;
    public void setFocus(boolean hasFocus) {
    this.hasFocus = hasFocus;
    }

    my code i wrote did you really?
    this fellow here wrote something similar
    http://www.objects.com.au/java/examples/src/tree/CheckRenderer.java
    perhaps you can swap notes.

Maybe you are looking for

  • I would like some help in determining the proper structure/implementation

    I would like some help in determining the proper structure/implementation for the following scenario: I have ~10 steel rods that have been equipped with a strain gauge.  The most I would have is ~30 steel rods. Each setup has had a 10 point calibrati

  • How to see what are the privilages a USER has

    Hi all, How to see the what are the privilages a USER has. and In Oracle 10g, where the log files were created ? Thanks in advance, Pal

  • DYLD_INSERT_LIBRARIES doesn't work for app signed with entitlement in ML

    Hi I notice that DYLD_INSERT_LIBRARIES no longer works in Mountion Lion if the application is codesigned with entitlement. For example: DYLD_INSERT_LIBRARIES=./mylib.dylib /Applications/Safari.app/Contents/MacOS/Safari   dyld: DYLD_ environment varia

  • When i turn my ipod on it said use itunes to restore......

    when i turn my ipod on it said use itunes to restore. SO i downloaded the new itunes (7.2 i think) and when i pluged ipod in it said ipod in recovery mode restore before use in itunes for sumthin like that... so i did that and at the end it said erro

  • Not showing element

    hi there - id appreciate if anyone can reply to me tonight as i have revision to do for this exam im tryin to see whats in the element but it gives me memory address ref's..why? //Main      public static void main(String[] args)           Object data