Checkbox menuitem

It is a simple question.
I have a check box in my menu which is checked and unchecked based on whether the objects in the selected
internal frame are labelled.
When i select an internal frame from the desktop and it comes to the front and i check the label checkbox,
all the objects should be labelled,then i go on to other internal frames.When i come back to the first frame i selected
the label checkbox should be selected.when i open a new internal frame and select it,the label should be unchecked.
so how do i create the menu item with such functionality?
thanks

u could use something like this in defining ur menu items..
JRadioButtonMenuItem jmenu1 = new JRadioButtonMenuItem();
JRadioButtonMenuItem jmenu2 = new JRadioButtonMenuItem();
depending on the internalframe on the desktop u could set the value of the item...
like..
jmenu1.setSelected(true);

Similar Messages

  • Can you have a checkboxGroup in menuItem in menubar??

    Can you do a choice group in menubar in a menuItem??
    say you have 3 checkbox MenuItem in menu, and you only want one to be choosed at one time how do you do that can some one give me a example?
    thanks
    Danmac2760

    there you go you just got 8 dukes thank you for your
    help.Thanks, very generous... Next time will be free ;)

  • Possible to interact with checkbox in a custom menuitem?

    Is there any way to allow custom menu items to be checked (like the menuitems in the Windows menu can be)? The 'checked' property is read-only, for the menu item and the menu action, so I guess I'm wondering if there are any known workarounds or if this is a case of readonly meaning readonly. Thanks!

    Browsing through menu related stuff in the DOM lead me to nothing, but Google turned up this blog entry by Harbs: http://in-tools.com/article/scripts-blog/showing-text-formatting-overrides/
    -- and then I could find it in the DOM, well hidden:
    Adobe InDesign CS6 (8.0) Object Model JS: ScriptMenuAction
    So it seems you have to set the state of a menu action. The action in itself can be attached to one or more menus (MenuAction, where checked is read-only, is a parent class of ScriptMenuAction, and there it is read/write), probably to ensure that if a certain menu item appears in more than a single menu, they are all "updated" at the same time.
    Harbs' example always sets 'checked = false' and changes the menu text to indicate its current state, but I assume one can also toggle the checked state.

  • No "generate code" checkbox

    Hello,
    I have Sun Java Studio Enterprise 8.1. A teacher told me this was a good tool to make you UML and let java studio generate the code. You could preform this action by checking the checkbox "generate code" when you created a "Java-Platform Model" in the UML section. I have already created a java libary but i dont have the "generate code" checkbox.
    Is this feature removed in 8.1 and does 8.0 still have it?
    LeDieu

    According to http://www.netbeans.org/issues/show_bug.cgi?id=78590:
    This checkbox is not longer in the UI since live roundtrip has been disabled.
    Also: http://www.netbeans.org/servlets/ReadMsg?listName=nbusers&msgNo=84056
    You may want to check out the 'Generating Code' help topic in the javahelp (help | contents menuitem).

  • Checkbox item: How to get all values checked?

    See http://htmldb.oracle.com/pls/otn/f?p=24317:46
    The report query is simply
    select
    'One' one,
    'Two' two,
    'Three' three,
    'Four' four
    from dualThe checkbox item is a named static LOV with STATIC2:ONE,TWO,THREE,FOUR and a Source value of ONE:TWO:THREE:FOUR so that all boxes appear checked when the page is first rendered.
    All the 4 columns have a column condition like
    instr(':'||:P46_COLS||':',':ONE:') > 0to ensure that column is rendered only if the corresponding checkbox is checked.
    The report has Dynamic column headings with the following PL/SQL function body
    return 'ONE:TWO:THREE:FOUR';To my (pleasant) surprise, this works very nicely. When column TWO is conditionally not rendered, its corresponding column heading is also skipped with no effort on my part. Nice.
    Question:
    Instead of "hard-coding" that string ONE:TWO:THREE:FOUR in the 2 places I mentioned above (checkbox item source and report heading), is there a way to access the "all values checked" version of that LOV item so that it will dynamically pick up the latest LOV changes? The way I have done it currently, if I change the named LOV, I need to also change those 2 places where I have hardcoded the values.
    Any ideas? Thanks

    Scott:
    I thought about that but the LOV has dozens of values, each with a verbose display value and a return value of the column name (upto 30 characters) and the display values are still being "worked on" by the users.
    So, the "all columns" string would be a big, unweildy string that would be hard to edit.
    It is much easier to edit, resequence and generally work with a Shared Component LOV defined as a Static LOV because you get that nice page (4000:4111) where you can read everything nicely formatted instead of a STATIC2:<big long string>!
    Can I have my cake and eat it too?!
    Thanks

  • Use of Checkbox in Report for calculation and determine checked records

    Dear All,
    Application Express 4.0.1.00.03
    I have a Report based on Invoice table which displays unpaid Invoices.
    Also I have added one check box (Not a column in Invoice field) to each row of the report query, the user will be check to pay the Invoice, on checking of the Invoices I need to
    1. Calculate the total of Invoice Amount for selected Invoices.
    2. After selection of Invoices User will click on a Button which will open the Payment Form (New Page or Same Page Region),
    but some way I need to know the Invoice No. of each Invoice row selected so that I can use all the selected Invoice No's for creating the Payment.
    3. Any way to add a button on each row of the Invoice that will be used for the Payment of that Invoice only.
    One way can be to create a column to save the check box value which I am aware of, but am looking for other alternate if possible.
    Hoping for some good solution.
    Thanks & Regards
    Arif Khadas

    vee wrote:
    You would need to make the amount column(the one which is used for total) editable so that its value can be accessed easily from JS. You can made it read-only if required ( apex_item.text(2,INV_RENT_VALUE + INV_OTHER_VALUE ) ?? ) .
    How can I make it read only, there is no such attribute which can be set for report column as it exists for Items.
    Also Now I have the following report query:
    SELECT  INV_LSE_NUM                      "Contract No.",
            INV_FROM_DATE                    "Collection Date",
            INV_FROM_DATE                    "From Date",
            INV_TO_DATE                      "To Date",
            INV_RENT_VALUE + INV_OTHER_VALUE "Invoice Amount",
            INV_AMOUNT_PAID                  "Amount Paid",
            INV_RENT_VALUE + INV_OTHER_VALUE
                           - INV_AMOUNT_PAID "Balance",
            INV_NUM                          "Invoice No.",
            'Pay'                            "Pay",
            APEX_ITEM.CHECKBOX (1, INV_NUM)  "CB_PAY",
            APEX_ITEM.TEXT (2, INV_RENT_VALUE + INV_OTHER_VALUE - INV_AMOUNT_PAID)
                                             "BAL"
    FROM    RE_INVOICE
    WHERE   INV_COM_NUM    =  :P0_COM_NUM
    AND     INV_RENT_VALUE + INV_OTHER_VALUE > INV_AMOUNT_PAID
    AND     INV_LSE_NUM    =(SELECT TO_NUMBER (C001)
                             FROM   APEX_COLLECTIONS
                             WHERE  COLLECTION_NAME = 'LEASE'
                             AND    SEQ_ID          = TO_NUMBER (:P24_SR_NO))The Next thing is the HTML Header for the Page:
    <script language = "JavaScript" type="text/javascript">
    total = 0;
    $('input[name=f01]:checked').each( function(){
      parent_row = $(this).parents('tr:first');
      amt = ( parent_row.find('input[name=f02]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f02]').val() );
      total += amt;
    $s('TEST',total);  -- Test is an Item on the Page.
    </script>Also I checked from the Page source "CB_PAY" and "BAL" have names f01 and f02 respectively.
    Even now when I check or un-check the Value in TEST item is not displayed as required.
    Anything more is required, what am I missing.
    Thanks & Regards
    Arif Khadas

  • Problem with checkbox

    hi expert,
    i create report with check box at begin of write data in tab. after execute, i get report like this
    1  (checkbox)  xxxxx x xxx xxxxxxxxxxxxxxxx
    2  (checkbox)  xxxxx x xxx xxxxxxxxxxxxxxxx
    3  (checkbox)  xxxxx x xxx xxxxxxxxxxxxxxxx
    4  (checkbox)  xxxxx x xxx xxxxxxxxxxxxxxxx
    when user select check box of desire line and press F8 button system will display only selected line.so i set check box default as 'X'.
    Data:
      chk_box          type c value 'X',
      chk_box_val,
    write:/1 1tab-xxxxx,
             30 chk_box as checkbox
    like this all checkbox in report is checked
    so i will update field in 1tab to flag that this line is select. if user execute report and don't unmark, all line should display in second execute.
    but it don't, nothing display. where is incorrect in my code?  for easy to look, this is a relative part of code in my report. 
    at line-selection.
        perform selectline.
    at pf8.
        perform printnewheader.
        perform printselectline.
    form selectline.
      data xnum like rmtab-runno.
      read current line field value chk_box into chk_box_val.
      if chk_box_val is initial.
        chk_box_val = 'X'.
      else.
        chk_box_val = space.
      endif.
      modify current line field value chk_box from chk_box_val.
      if chk_box_val = 'X'.
        xnum = 1tab-runno.
        loop at 1tab where runno = xnum.
          1tab-chk = 'X'.
          modify 1tab.
          clear 1tab.
        endloop.
      else.
        xnum = 1tab-runno.
        loop at 1tab where runno = xnum.
          clear 1tab-chk.
          modify 1tab.
          clear 1tab.
        endloop.
      endif.
    endform.             " selectline
    form print-doc-select.
      loop at 1tab where chk = 'X'.
       write:/ ................
    endform.
    once i arrange code like this, but it's nothing
    *at line-selection.
    *    perform selectline.
    at pf8.
        perform selectline.
        perform printnewheader.
        perform printselectline.
    (later is as same as above quote)
    thank you in advance. point for good advise.
    Regards,
    Kittisak.

    HI,
    First you have to describe the number of lines in list.TO do this
    declare like this
    And I modified your code. and dont mention the default value for check box.U can select dynamically by using the below code.It gives a good user interface. Based on the below code u can modify your code .Please check it out once...
    data:
      w_lines type i,    " number of lines                                   
      w_linno type i.    " line number
    at line-selection.
        perform selectline.
    at pf8.
        perform printnewheader.
        perform printselectline.
    form selectline.
      data xnum like rmtab-runno.
       describe list number of lines w_lines.
      do w_lines times.
      read current line w_lineno value chk_box into chk_box_val.
      if chk_box_val is initial.
        chk_box_val = 'X'.
      else.
        chk_box_val = space.
      endif.
      modify current line w_linno value chk_box from chk_box_val.
      if chk_box_val = 'X'.
        xnum = 1tab-runno.
        loop at 1tab where runno = xnum.
          1tab-chk = 'X'.
          modify 1tab.
          clear 1tab.
        endloop.
      else.
        xnum = 1tab-runno.
        loop at 1tab where runno = xnum.
          clear 1tab-chk.
          modify 1tab.
          clear 1tab.
        endloop.
      endif.
    clear chk_box .
    add 1 to w_linno.
    enddo.
    endform.             " selectline
    form print-doc-select.
      loop at 1tab where chk = 'X'.
       write:/ ................
    endform.
    regards
    Kiran
    Edited by: Kiran Saka on Feb 6, 2009 5:50 AM

  • Using a Radio Button to Disable Multiple Checkboxes

    Hi everyone,
    My name is Christian and I am trying to design a form using Adobe Designer 7 that when a user selects a group of two radio buttons (one marked Macintosh and one marked Windows) it automatically disables 3 or 4 checkboxes of various software applications further down the page.
    The idea is if you select the Windows radio button, you would not be able to select the iWorks or StuffIT checkboxes (as that is Mac software), but conversely if you check Macintosh radio button the iWorks and StuffIT checkboxes activate but the Office 2003 and Microsoft Money checkboxes deactivate (because that is Windows software).
    Im not really a developer so any assistance would be appreciated. Thanks for reading and have a great day! :-)
    Christian

    I suspect that you have a problem in some portion of your code that you have not posted. To help debugging I suggest you create a simple test using two pages: input.cfm and action.cfm.  Get the most simple case working then add the javascript, css, and CF code to make your application work.
    <!--- contents of input.cfm --->
    <html>
    <head>
         <title>Input</title>
    </head>
    <body>
         <form action="action.cfm" method="POST">
              Choose type: <br />
              <input name="type" type="radio" value="male" />     Male<br />
              <input name="type" type="radio" value="female" /> Female<br />
              <input type="submit" />
         </form>
    </body>
    </html>
    <!--- content of action.cfm --->
    <html>
    <head>
         <title>Action</title>
    </head>
    <body>
         <cfif form.type eq "male">
              Type is male.
         <cfelseif form.type eq "female">
              Type is female.
         </cfif>
         Here is a cfdump of the form variables:<br />
         <cfdump var="#form#" />
    </body>
    </html>
    Message was edited by: JR "Bob" Dobbs
    Added sample for action.cfm

  • Read-only radio button or checkboxes save as null

    Hi,
    I have a form with some fields that are editable by 1 group of users and read-only for another group in certain conditions.
    Before the header there is a fetch process to retrieve values from tables. So most fields (read-only & editable) are populated including checkboxes & radio buttons.
    All users can edit at least 1 field on the form.
    When the save button is pressed a PL/SQL process runs to save the data.
    The save works if the field is editable.
    If the field is read-only and text it also works.
    But if the field is a radio button or checkbox a null is saved in the table.
    Any suggestions on how to get the PL/SQL to pick up the read-only radio buttons and checkbox values?

    Hi,
    I had the same problem in my application and I found another solution instead of using two items. I'm using a computation on page processing that makes a select on my table to get the value for the checkbox. I'm doing this with the same condition as my read-only condition on my checkbox item so I can get the database value when it is lose in the submit process.
    Also, I found a difference in the html code between the read-only state of the item and the standard state.
    Original state : name="p_v07" (7 because it's the seventh item on my page)
    Read-only state : name="checkbox"
    I tried to modify this using firebug in execution of the page but without success, the problem is still there.
    Patrick
    Insum Solutions

  • Checkboxes:check the dish in one table-it checks off ingredients in another

    If you select a dish from a table of recipes (via checkbox) can you make it select all the ingredients for that dish from another table, your master ingredients list?
    I think it has to do with Boolean true/false, but checkboxes seems weird to me...they dont act like normal formula cells.....
    This would be really helpful for shopping/meal planning.........thanks

    Create a new table .
    In cell A1 grab the name of the selected dish
    In column B insert formulas grabbing the required ingredients.
    These formula would use the function VLOOKUP to extract the ingredients required for the dish whose name is in $A$1.
    I'm not sure that checkboxes are the good tool to select the dish because it's easy to have several boxes checked in a single column.
    I feel that using a popup menu would be a better soluce.
    If you really want to use checkboxes, it would be good practice to create a table with a single cell containing a formula displaying an alert if more than one box is checked.
    Yvan KOENIG (VALLAURIS, France) vendredi 5 mars 2010 22:02:42

  • Checkboxes in BI Publisher not showing up for all reports

    Hi everyone,
    I followed the instructions (uploading fonts, checking the checkbox font property e.t.c) for displaying checkboxes (without the diamond shape) in my BI Publisher reports. It worked for 1 report and still does. Unfortunately the new reports I have uploaded still display the diamond shape. I find this very odd even though followed exactly the same process for all of my reports.
    Is there a way to make sure that checkboxes display properly for all reports? Could there be a mistake I have made and that I am missing out on. Any thoughts will be appreciated.

    Have you set the properties as per
    http://blogs.oracle.com/xmlpublisher/2007/05/wherere_my_checkboxes.html
    especially
    1. The font location, we need to tell the publisher engine where the Wingdings font is located:
    <font family="Wingdings" style="normal" weight="normal">
    <truetype path="c:\windows\fonts\wingding.ttf"/>
    </font>
    2. The glyphs to be used. Here we specify the font family name ie 'Wingdings' and the 253/254 glyphs
    <property name="rtf-checkbox-glyph">Wingdings;253;254</property>
    Do ensure that you use the same glyph character codes defined in ur config and RTF

  • Looking for help with javascript to autofill checkboxes based on a numeric value.

    I have a numeric field that I would like to have 1 - checkbox
    out of five autofilled based on a numeric value.
    For instance the numeric value is TotalPoints
    If the TotalPoints Value is >10 autofill this checkbox
    If the TotalPoints Value is 10 - 19 autofill this checkbox
    If the TotalPoints Value is 20 - 49 autofill this checkbox
    If the TotalPoints Value is 50 - 69 autofill this checkbox
    If the TotalPoints Value is 70+ autofill this checkbox
    Assistance in writing the correct script for this would be greatly appreciated.

    All the checkboxes have separate names. 
    Check box #1 is AssetClass.0 with the export value of 1
    Check box #2 is AssetClass.1 with the export value of 2
    Check box #3 is AssetClass.2 with the export value of 3
    Check box #4 is AssetClass.3 with the export value of 4
    Check box #5 is AssetClass.4 with the export value of 5
    Score and StrategyUse the following calculation to determine your point score and indentify the appropriate strategy listed below.A. Add your points for questions 1 – 2.
    B. Add your points for questions 3 – 12.
    C. Subtract B from A. (Numeric Text Box)  name is TotalPoints
     Points Strategy Asset Class Mix (check boxes as named above)
     0 – 10 Primarily Fixed Income: 80% Fixed Income; 20% Equity
    10 – 19 Balanced Fixed Income-Oriented: 60% Fixed Income; 40% Equity
    20 – 49 Balanced Equity-Oriented: 40% Fixed Income; 60% Equity
    50 – 69 Primarily Equity: 20% Fixed Income; 80% Equity
    70+ Equity: 95%; 5% Cash 

  • 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. 

  • (inserting values into a database using a Checkbox) HELP!!!!!!!!!!!!!!!

    Can anyone help me out ???
    I am getting some trouble with using multiple check boxes to store the information in a database (MS ACESS)
    Each checkBox has multiple values in them.(3).
    1)Should they have similar names for each one?
    I am also getting an error saying cannot resolve symbol stating about pnumber,itemname,price
    Can you also tell me that if my query statements are correct??
    I want to insert into the database multiple values of each checkboxes which are checked.
    Thanks!!!!!!!
    <!---------------------------------------------html PART--------------------------------------------------------------------------------------->
         <form method="POST" action="http://localhost:8080/cvc/jsp/addCart.jsp">
              <table align = "center" border="2" width="50%">
              <TBODY>
    <%               
                   getProducts.next();
                   pnumber = getProducts.getInt(1); //this part works since I am seeing it displayed in a table
                   itemname = getProducts.getString(2);                         
                   price = getProducts.getFloat(3);
    %>               
                   <tr>               
                   <td><img align= "centre" border=0 src="http://localhost:8080/cvc/ASA Technologies\mp3.jpg" /></td><td><%=itemname%></td><td align="right"><%=price%></td>
                   <td align="center"><input type="checkbox" name="items" value="<%=pnumber+":"+itemname+":"+price+":"%>" </input></td> //????????????
    <!--------------------------------------JSP PART-------------------------------------------------------------------------------------------------------------------->
    <%@ page import="java.util.*, java.io.*, java.sql.*" %>
    <%
    String insert;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String sourceURL = new String("jdbc:odbc:ASA");
    Connection con = null;
    con = DriverManager.getConnection(sourceURL,"","");
    java.sql.Statement statement = con.createStatement();
    while ( request.getParameter("pnumber+itemname+price") !=null)
    insert = "insert into Cart VALUES( ' "+pnumber+" ' ," + " '"+itemname+ " ' ,"+ " ' "+price+ " ' )"; //getting the error here :cannot resolve symbols
    statement.executeUpdate(insert);
    %>

    Syntax of insert was wrong..
    while ( request.getParameter("pnumber+itemname+price") !=null)
    insert = "insert into Cart VALUES( ' "+pnumber+" ' ," + " '"+itemname+ " ' ,"+ " ' "+price+ " ' )"; //getting the error here :cannot resolve symbols
    statement.executeUpdate(insert);
    try this........
    Column1, Column2, Column3 are the field names of your table Cart....
    ..changed it to your original fieldnames...
    insert = "insert into Cart (Column1,Column2,Column3) VALUES( ' "+pnumber+" ' ," + " '"+itemname+ " ' ,"+ " ' "+price+ " ' )";

  • Pages '08 Export does not honor the "Hide extension" checkbox

    I have noticed that Pages '08, even with the latest update (3.0.3), does not honor the state of the "Hide extension" checkbox in the Export save dialog (or "sheet" that slides out from the title bar). Specifically, I have seen this happen when exporting to Word. When un-checking the "Hide extension" checkbox, the filename is displayed in the dialog with the .doc extension, but the file appears in the save folder (anywhere in the file system) without the .doc extension until I do a Get Info on the file and un-check Hide Extension in the Name & Extension section.
    This is really annoying because I hate automatic hiding of file extensions in general, and I find it unacceptable with any kind of MS Office docs because my Windows-using colleagues can't seem to cope without a file extension they recognize.
    Also note that this does not seem to affect the Save or Save As dialogs in Pages '08, only the Export save dialog. I can create a regular Pages document, do a Save As, uncheck Hide Extension, and I'll see the document show up in the file system with the .pages extension.
    Is this a known bug in Pages '08? I can't find any mention of it in the forums. I also want to know if this is fixed in Pages '09. I've been looking for a way to report this as a bug, but am not having much luck.

    LionMage wrote:
    Is this a known bug in Pages '08?
    Yes. just add the extension manually in the Finder.
    I can't find any mention of it in the forums.
    It has been mentioned many times but not lately.
    I also want to know if this is fixed in Pages '09.
    No.
    I've been looking for a way to report this as a bug, but am not having much luck.
    +Menu > Pages > Provide Pages Feedback+
    Peter

Maybe you are looking for