Two checkboxes to each item of JList

I want to take two checkboxes to each item of Jlist
and depending upon the checkbox state i want to add
that item in a defferent Jlist

You don't need any invisible nodes for that. Just create a class that can hold both the id and name, and which will return the name from the toString() method:
public class Pair {
  private String id;
  private String name;
  public Pair(String i, String n) {
    id = i;
    name = n;
  public String getId() { return id; }
  public String getName() { return name; }
  public String toString() { return getName(); } // used by JTree to display the name
}Of course, id and name can be other objects than Strings.

Similar Messages

  • Formula to get a total if I'm adding a checkbox beside each items?

    Simple question :
    I have 3 elements on 1 column : A1 = 5$ ; A2=10$ ; A3 = 15$. Each of the elements have a checkbox in the second column. What is the formula if I want to get a total ONLY if the checkbox is TRUE?
    Thanks!

    Which decimal delimiter are you using on your system ?
    If you are using the comma, you must use semi-colons in place of commas to separate the parameters.
    I must apologize for the double post but yesterdays the forum behaved wrongly here. So I clicked several times on the {Post Message) button with no visible effect. It appears that in fact the task was done with no echo on the display
    Yvan KOENIG (VALLAURIS, France) lundi 1 février 2010 11:11:15

  • Add item in JList

    How i can add each item to JList. Using loop not use array?

    I have not used a JList before, but looking at the API, one of the JLists constructors will take a Vector as one of it's argument
    JList API http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JList.html
    constructor
    JList(Vector listData) so you would be able to add elements to the vector in a loop using the add() method of the vector class
    then construct the JList after the elements have been added to the vector, this will mean that you do not have to specify the size of the vector (all thought you can) as it will dynamically grow as you add items to it.
    So if you don't know the amount of items that you will be adding to your JList to start with, it is a better bet than using an array
    again have a look at the vector API http://java.sun.com/j2se/1.4.2/docs/api/java/util/Vector.html
    hope that points you in the right direction
    JaVAmUG3380

  • Dynamic Table Two lines per data item

    Hi experts!!
    In my form i have a table with two lines per data item for example the table i want the table to be:
    boldheader rowbold
    bold1,1 1,2bold
    bold1,3 1,4bold
    I have also wrapped the table in a subform, and marked the checkbox "Repeat Row for each data item".
    Instead i get :
    1,1 1,2
    2,1 2,2
    1,3 1,4
    2,3 2,4
    How can i display two rows per item ???
    Thank you in advance!!!

    If there are two lines in a single row for a table (I.e if there are 14 columns, How to be adjusted).
    There are two possible ways of doing.
    1) a) Create a SubForm
        b) Create a Table (If you create a table there will be Header Row and Body Row)
        c) Delete the Body Row and instead of it create a SubForm with name Body Row
        d) Now you have one Header Row and SubForm as BodyRow.
        e) SubForm BodyRow again create two SubForms with names Row1, Row2.
        f) Now make the SubFormBodyRow as Flow layout and repeat the SubForm(Since if you make this then the child nodes (Row1 & Row2) will inherit the properties of the parent node (SubForm-BodyRow).
       g) Now you can have two rows in one lineitem.
    2) The second possible way is showing it in a Dynamic ToolTip.
        Lets say you have a table inside a table then you can show it in a Dynamic ToolTip when you place the cursor in a Student Id you will get Student Data.
    Hope it solves.

  • How to create a background image for each item in a List object

    Hello.
    I am trying to create a background image that displays whenever a user posts something to a list.  For example when a user posts text it would appear in a list.  The new item in the list would contain a specific background image with the users text appearing on top of the background image.  I do not want a background image for the entire list, rather each item within the list.
    I am not sure how clear this is so I added an image below.  When a user enters text in and clicks the "post-it" button their text would appear below with the sticky note background. 
    I am not sure which list type would be best for this problem or how to create insert the image, so I am open to suggestions. 
    Thank you for your help.  Any advice or guidance will be greatly appreciated!

    Hi
    the easiest way would be with itemRenderer.
    You have to do two things:
    1. In your list declaration use a item renderer: <mx:List itemRenderer="myRenderer"/>
    2. create a flex component myRenderer that will be the single item. This can be a canvas with a background image and a text field on it.
    When you add a new item to the list, a new myRenderer item will be created and the data property will be passed to it. So you have to put "data" in your textField.
    If you need more help try looking at Tour de Flex samples, they're pretty easy.
    Andrei

  • Chart legend : adding tooltip on each item

    Hi,
    My app displays a simple Linechart and its legend. I'm
    surprised to see that the Legend component doesn't provide many
    possibilities in accessing each of the items that compose it.
    First, I'd like to add a tooltip on each item of the legend.
    Then I would like to display a checkbox in front of every marker,
    to display/hide the corresponding item in the Linechart.
    One way could be to extend the Legend item (about this I
    found
    this
    nice - yet complicated - example), but I'd really like to know
    if there is a more simpe way to achieve it. As the Legend component
    is very dependant from its dataprovider, maybe I'd rather create my
    own custom legend, using my chart's values ?
    Any help will be appreciated ! Popop ./.

    les_paulde wrote:
    wow, thanks for your swift reply! This definitely solved my problem and I can now run the query. The code turned out as follows:
    String convList = listI.toString();
    convList = convList.replace("[", "(\"");
    convList = convList.replace("]", "\")");
    convList = convList.replaceAll(",", "\",");
    convList = convList.replaceAll(" ", " \"");
    And what happens if the String representation of the object in your list contains one of the characters you're replacing? It will go awfully wrong!
    This is safer:
    public static String asString(List<?> list) {
        StringBuilder b = new StringBuilder();
        b.append('(');
        for(int i = 0; i < list.size(); i++) {
            b.append('"').append(list.get(i)).append('"');
            if(i < list.size()-1) b.append(", ");
        return b.append(')').toString();
    System.out.println(asString(listI));

  • Print a TO label for each item

    Hi Gurus,
    I wanna print a TO label for each item ,
    i have a TO with two items, and i go to OMLV ,set 3 (No.of labels = 1.(for each TO item,qty in alt un.of meas )) in field 'quantity of labels(indicator)', i was expecting that two labels will be printed out, but actually, just one label was printed out?
    i wanna know why my setting didn't take effect?
    BR,
    Dragsky

    Can you check if appropriate print code assigned to the movement type thru which you are creating the TO.

  • Two checkbox questions.

    1. I have a database column named "needs_approval_YN" which can only have "Y" (yes) or "N" (no) as value. I want to represent this column on a form with a checkbox (checked is yes, unchecked is no). What is the best way to do this? If I choose display option checkbox, I het two checkboxes: one for yes and one for no. That's not what I need. Now I set the column default on "N" in the database and the checkbox has only one display value: ' ' (space) with return value 'Y', but this doesn't seem very professional to me. So what is the best way to have one single checkbox to represent a true or false column?
    2. Is there a way to have a read-only checkbox on a form? In some situations the user may see the needs_approval_YN field in my application as a checkbox, but may not change it.

    Hi,
    For a Yes/No checkbox, you need to do something like the following:
    1 - The checkboxes settings should be:
    List of Values Definition: STATIC:;Y
    2 - Create a Computation with the following settings:
    Item Name: (the name of the checkbox item)
    Type: Static Assignment
    Computation Point: After Submit
    Computation: N
    Conditional Type: Value of Item in Expression 1 is NULL
    Expression 1: (the name of the checkbox item)
    Then, when the page is submitted and the checkbox is unticked, the computation will set the value to N. If it is ticked, it will remain as Y
    Andy

  • When I try to use autofil to enter my name address ect it requires me to click on each item , name, email ect how do I get it to use the whole profile

    when I right click on autofil a widow comes up with my profiles, I see no way to simply choose one and have all the info filled in. I have to click each item, name , address ect to have it show on whatever form I am trying to fill

    You can try one of the form fill extension:
    *Autofill Forms: https://addons.mozilla.org/firefox/addon/4775
    *Autofill: https://addons.mozilla.org/firefox/addon/262804/
    *fireform: https://addons.mozilla.org/firefox/addon/3193
    *Formito ( Form Filler ): https://addons.mozilla.org/firefox/addon/formito-form-filler/

  • The operation can't be completed because some items had to be skipped. For each item, choose File Get Info, make sure "Locked" is deselected, and then check t

    The following error comes up when I try to install the updated Firefox:
    "The operation can’t be completed because some items had to be skipped. For each item, choose File > Get Info, make sure “Locked” is deselected, and then check the Sharing & Permissions section. When you are sure the items are unlocked and not designated as Read Only or No Access, try again."
    When I follow the instructions in the error message, it shows that my user name has read and write access. There are a couple other items that are read only. I tried to change this to read and write, but the Sharing and Permissions options are greyed out and will not let me change them. What is the work around for this? I would really like to install the new firefox.
    Thanks.

    Hello,
    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default('''This will NOT delete profile info such as bookmarks and history'''):
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!
    Thank you.

  • F110 - each item in each payment document for the same vendor

    Hi Guru,
    When i use F110 to do auto payment run for one vendor, each item is paid by each payment document although the document currency is the same, do you know why it appear like this, by right, all the vendor open items should be paid in one payment document, what is the possibility for this scenario, how to check it.
    thanks,
    Kick

    There are things that you should check which may be causing this:
    (1) In the vendor master (FK03) go to the section "Payment Transactions Accounting" and see whether the box "Individual Pmnt" has been selected. If it has, then deselect it.
    (2) In transaction FBZP go to the "Payment Methods in Company Code" section, double click on the relevant payment method, and check whether the box "Single Payment for marked item" has been selected. If so, deselect it.

  • Can you calculate multiple text boxes to achieve a total value?  If so how is that done?  I am trying to create a order form where multiple items can be purchased but i would like the values of each item to calculate so I can achieve a total value.

    Can you calculate multiple text boxes to achieve a total value?  If so how is that done?  I am trying to create a order form where multiple items can be purchased but i would like the values of each item to calculate so I can achieve a total value.

    Hi sashby51,
    I've moved your discussion to the PDF Forms forum--the folks who visit this forum regularly should be able to point you in the right direction.
    Best,
    Sara

  • In the report level user wants two persons against each work center.

    Hi Experts,
    Please let me know the solution, I have provided scenario below.
    check the query which the user is referring to report:
    Example
    Work center     Person
    KNE33102     44003850
    According to the user, the names for the Work centers should be as follows:
    Work center          Person
    KNE33102         44003850,
    KNE33102        44003603
    I have check the data in T-code-CR03, each work center getting two persons, as can be shown below.
    Work center        Person
    KNE33102           44003850,
    KNE33102           44003603
    In RSA3 it can be seen that both the records are being extracted
    Work center     Start date     End date     Person
    KNE33102     09.02.2009     31.12.2009     44003850
    KNE33102     09.02.2009     31.12.2009     44003603
    In BI , when checking in PSA, it can be seen that the data is also being loaded to BI (Two persons loaded against Work center-KNE33102)
    Work center     Start date     End date     Person
    KNE33102     09.02.2009     31.12.2009     44003850
    KNE33102     09.02.2009     31.12.2009     44003603
    But when loading to the Info Object, one person has deleted. Because of this, in the report level displaying one person.
    Note:-Please let me know what is the procedure, in the report level user wants two persons against each work center.

    Hi,
    As you said in your post the data has mentioned up to 2009. can you try execute the query till to date .
    Regards
    sivaraju

  • Adding the Checkbox for each row in classic report

    Hello,
    I have created classic report with checkboxes in each row and added the On-Submit process, BUTTON CONDITIONAL, to determine the behavior of the checkboxes. The PL/SQL process is suppose to delete the selected row from database.
    I am getting the Success message, but When I check the database, the row still persist in the database.
    PLSQL CODE:
    FOR i IN 1..apex_application.g_f01.count LOOP
    DELETE 
    FROM
      registry 
    WHERE
      reg_id = apex_application.g_f01(i);END LOOP;
    ORACLE APEX: 4.2
    Thank you

    Hi ApexNewLearner,
    Try this
    DECLARE
    j number;
    BEGIN
    FOR i IN 1..apex_application.g_f01.count LOOP
      j := apex_application.g_f01(i);
      DELETE FROM  registry
      WHERE  reg_id = apex_application.g_f01(j);
    END LOOP;
    END;
    or better try to replicate your issue on apex.oracle.com , that is easy for users to investigate the issue and give you appropriate solution.
    Hope this helps you,
    Regards,
    Jitendra

  • How to place two checkboxes in a single line.

    Hi all,
        In selection screen , how we place two checkboxes
    with labels in a sigle line.
    Regards,
    bala.

    hi,
    chk this.
    chk this.
    SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(3) TEXT-003
    FOR FIELD P_Chk1.
    SELECTION-SCREEN POSITION 30.
    PARAMETER: P_chk1 AS CHECKBOX.
    SELECTION-SCREEN POSITION 35.
    PARAMETER: P_chk2 AS CHECKBOX.
    SELECTION-SCREEN: END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B2.
    rgsd
    anver
    if hlped mark points

Maybe you are looking for