Set multiple buttons emphasized = true

Hi, I have a Panel and added many Buttons in it as Children.
I would like to set multiple buttons with emphasized = true. I
found, however, if I set one Button emphasized = true, it will set
all other Buttons emphasized = false automatically. Why?
Thanks,
ff

Hi
By default emphasized is false for each button.
for every button add emphasized="true"
If it not works post the sample code.

Similar Messages

  • Multiple Buttons in JTable Headers:  Listening for Mouse Clicks

    I am writing a table which has table headers that contain multiple buttons. For the header cells, I am using a custom cell renderer which extends JPanel. A JLabel and JButtons are added to the JPanel.
    Unfortunately, the buttons do not do anything. (Clicking in the area of a button doesn't appear to have any effect; the button doesn't appear to be pressed.)
    Looking through the archives, I read a suggestion that the way to solve this problem is to listen for mouse clicks on the table header and then determine whether the mouse clicks fall in the area of the button. However, I cannot seem to get coordinates for the button that match the coordinates I see for mouse clicks.
    The coordinates for mouse clicks seem to be relative to the top left corner of the table header (which would match the specification for mouse listeners). I haven't figured out how to get corresponding coordinates for the button. The coordinates returned by JButton.getBounds() seem to be relative to the top left corner of the panel. I hoped I could just add those to the coordinates for the panel to get coordinates relative to the table header, but JPanel.getBounds() gives me negative numbers for x and y (?!?). JPanel.getLocation() gives me the same negative numbers. When I tried JPanel.getLocationOnScreen(), I get an IllegalComponentStateException:
    Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    Can someone tell me how to get coordinates for the button on the JTableHeader? Or is there an easier way to do this (some way to make the buttons actually work so I can just use an ActionListener like I normally would)?
    Here is relevant code:
    public class MyTableHeaderRenderer extends JPanel implements TableCellRenderer {
    public MyTableHeaderRenderer() {
      setOpaque(true);
      // ... set colors...
      setBorder(UIManager.getBorder("TableHeader.cellBorder"));
      setLayout(new FlowLayout(FlowLayout.LEADING));
      setAlignmentY(Component.CENTER_ALIGNMENT);
    public Component getTableCellRendererComponent(JTable table,
                                                     Object value,
                                                     boolean isSelected,
                                                     boolean hasFocus,
                                                     int row,
                                                     int column){
      if (table != null){
        removeAll();
        String valueString = (value == null) ? "" : value.toString();
        add(new JLabel(valueString));
        Insets zeroInsets = new Insets(0, 0, 0, 0);
        final JButton sortAscendingButton = new JButton("1");
        sortAscendingButton.setMargin(zeroInsets);
        table.getTableHeader().addMouseListener(new MouseAdapter(){
          public void mouseClicked(MouseEvent e) {
            Rectangle buttonBounds = sortAscendingButton.getBounds();
            Rectangle panelBounds = MyTableHeaderRenderer.this.getBounds();
            System.out.println(Revising based on (" + panelBounds.x + ", "
                               + panelBounds.y + ")...");
            buttonBounds.translate(panelBounds.x, panelBounds.y);
            if (buttonBounds.contains(e.getX(), e.getY())){  // The click was on this button.
              System.out.println("Calling sortAscending...");
              ((MyTableModel) table.getModel()).sortAscending(column);
            else{
              System.out.println("(" + e.getX() + ", " + e.getY() + ") is not within "
                                 + sortAscendingButton.getBounds() + " [ revised to " + buttonBounds + "].");
        sortAscendingButton.setEnabled(true);
        add(sortAscendingButton);
        JButton button2 = new JButton("2");
        button2.setMargin(zeroInsets);
        add(button2);
        //etc
      return this;
    }

    I found a solution to this: It's the getHeaderRect method in class JTableHeader.
    table.getTableHeader().addMouseListener(new MouseAdapter(){
      public void mouseClicked(MouseEvent e) {
        Rectangle panelBounds = table.getTableHeader().getHeaderRect(column);
        Rectangle buttonBounds = sortAscendingButton.getBounds();
        buttonBounds.translate(panelBounds.x, panelBounds.y);
        if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){  // The click was on this button.
          ((MyTableModel) table.getModel()).sortAscending(column);
    });

  • How to use one pop up window for multiple buttons and input fields?

    Hi Experts,
    I have created a pop up window that will be opened from multiple buttons in the same view. There are input fields that the data will be populated from a pop up window.  How can I set up which button that a pop up window is opened from? I also would like to populate the data from a pop up window to the input field next to a clicked button. There are 6 buttons and 6 input fields that share the same pop up window. I would very appreciate your responses.
    Thank you,
    Don

    Hi,
    Try creating 2 context attributes, one in your component controller and the other in the pop-up view. Bind the attribute of pop-up view to the component controller attribute.
    In the main view, on click of every button set a unique code in the controller's context which helps you in identifying the button clicked. Since u have created a binding to the pop-up view attribute the value flows from the controller.
    In the init method of your pop-up view, check the value of the attribute and based on that display which ever UI elements are required.
    Eg:
    On Button 1 click set value "B1", Button 2  value "B2" etc. In the init() of pop-up view u can check the values and perform the required operation:
    if(("B1").wdContext().currentContextElement().getButtonIdentifier()){
    else...{
    Hope this helps you.
    Regards,
    Poojith MV

  • Multiple buttons on a single slide each connecting to a different url

    Using a trial version of Captivate 7.  I have a handful of slides where the customer wants to open different forms via url.  I tried using a button for each link, inserting the url and using the "enter" key for each of the multiple buttons.  Works fine with the mouse but for 508 folks who tab to the URL and hit the enter key ......... I get many instances where the incorrect url is activated.  Is there a way around this without assicning a different shortcut key for buttons where thare are more than one on a single slide?     Thanks

    Welcome to AD!
    Here is an article on using multiple ipods. I suggest method 1 and steer clear of method 3.
    http://support.apple.com/kb/HT1495
    For your point #1, sharing music on same PC between users, put it in a shared library & set permissions as directed here
    http://support.apple.com/kb/HT1203
    For #2, itunes doesn't have the capability to monitor folders for new content. You'll need to get something like the free program 'itunes folder watch'.

  • How to create multiple buttons in ALV Toolbar in Webdynpro ABAP

    Hi all,
    I am trying to create multiple buttons in Webdynpro  ALV toolbar, please go through the code.
    What happening is, second button is replacing the first one.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
       DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
       DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
       DATA button1 TYPE REF TO cl_salv_wd_function.
       DATA button2 TYPE REF TO cl_salv_wd_function.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).
    How can I overcome this??
    Thanks
    Eshwar

    Hi Eshwar,
    The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).

  • Cannot set Flash button properties from sprite behaviour

    I'm puzzled...
    I'd like to set Flash button properties from behaviors on the
    sprite
    itself (unselect all buttons with a sendAllSprites, for
    example) but
    only this sample script works :
    on mouseEnter me
    sprite(spriteNum).selected = true
    end
    those ones won't:
    on mouseEnter me
    me.selected = true
    end
    on mouseEnter me
    selected = true
    end
    It must but obvious but I can't get it to work...
    Thanks.
    PJ

    The selected property is a property of the sprite. You need
    to
    reference the sprite specifically when you access it.
    When you are using
    me.selected=true
    the 'me' is referring to the current instance of the
    behaviour that is
    running. It is not referring to the sprite itself. Therefore,
    you need
    to use
    sprite(me.spriteNum).selected=true
    so that you correctly reference the sprite.
    You can use the syntax
    me.property=true
    only if the property in question is a property in that
    *script*.

  • Multiple buttons for a given validation

    I want the same validation to be done on the click of two buttons. In the "Conditional Validation Processing", I see we can
    "select a button" which allows us to select only one button.
    How can I select multiple buttons for a given validation?
    Is there a way or do I need to create another validation for the second button.
    Please advice.

    When you submit a page with a button the "request" value is set to the button name (not the displayed button label). After-submit events can check the request using :REQUEST or v('REQUEST') so you can build a condition like:   :REQUEST in ('APPLY','CREATE')..or you can use a built-in condition type that checks the request value like 'Request is Contained within Expression 1'.
    Scott

  • Notes interaction pauses slide that contains multiple buttons

    I have several slides, each with a Notes Interaction. As advised, each of the notes is set to Rest of Project and are not resized.
    On the slides with a Notes Interaction, there are multiple buttons made out of Smart Objects. When a button is clicked, an advanced action causes a certain text caption to appear.
    The problem is that the buttons work UNTIL the Notes Interaction appears on the slide. As soon as the Notes Interaction appears, the slide seems to be paused and the buttons that are supposed to show text captions no longer work.
    I'm hoping that someone can help with a solution to this.
    By the way, this only seems to happy when previewing in HTML web browser.

    Jay,
    I had replied in an earlier thread that you need to have ONLY ONE notes interaction in the entire project - Not on every slide. The interaction is designed to be placed only once inside a project. So, placing it in the first slide of your project and setting 'Rest of Project' on it should cater to your need.
    You can choose slide notes or project based notes in the edit panel of the interaction.
    Marcellus

  • Setting multiple targets for AppDeployments or Libraries in wlst off-line

    I am currently struggling to add targets/change to Apps and libraries in wlst offline mode. Setting one target is succesfull, but every way i can think of setting multiple targets does fail.
    If someone has a good hint.....
    What i tried (with errors and outcomes) ;
    readDomain('/u01/app/oracle/user_projects/domains/bip_domain')
    cd('/AppDeployment/wsm-pm')
    et=get('Target')
    print etarray(weblogic.management.configuration.TargetMBean,[Proxy for bi_cluster: Name=bi_cluster, Type=Cluster, Proxy for AdminServer: Name=AdminServer, Type=Server])
    set('Target',et)Error: set() failed. Do dumpStack() to see details.
    dumpStack()com.oracle.cie.domain.script.jython.WLSTException: java.lang.IllegalArgumentException: Param type [Lweblogic.management.configuration.TargetMBean; not supported
    Caused by: java.lang.IllegalArgumentException: Param type [Lweblogic.management.configuration.TargetMBean; not supported
            at com.oracle.cie.domain.script.jython.WLScriptContext.set(WLScriptContext.java:1296)
    s
    cmo.setTargets(et)>cd('/Clusters/bi_cluster')>tcl=cmo>cd('/AppDeployment/wsm-pm')>newTargets=array([,Class.forName('weblogic.management.configuration.TargetMBean'))newTargets.append(tcl)
    print newTargets
    array(weblogic.management.configuration.TargetMBean,[Proxy for bi_cluster: Name=bi_cluster, Type=Cluster])
    set('Target',newTargets)Error: set() failed. Do dumpStack() to see details.
    dumpStack()com.oracle.cie.domain.script.jython.WLSTException: java.lang.IllegalArgumentException: Param type [Lweblogic.management.configuration.TargetMBean; not supported
    Caused by: java.lang.IllegalArgumentException: Param type [Lweblogic.management.configuration.TargetMBean; not supported
    set('Target','bi_cluster')>print get('Target')array(weblogic.management.configuration.TargetMBean,[Proxy for bi_cluster: Name=bi_cluster, Type=Cluster)set('Target','bi_cluster,AdminServer')
    print get('Target')
    Error: getTargets() failed. Do dumpStack() to see details.
    dumpStack()com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.ScriptException: com.oracle.cie.domain.script.ScriptException: No JMSServer object with name AdminServer
    set('Target','AdminServer')
    print get('Target')array(weblogic.management.configuration.TargetMBean,[Proxy for AdminServer: Name=AdminServer, Type=Server])
    bTargets=array([],Class.forName('javax.management.ObjectName'))
    cd('/AppDeployment/wsm-pm')set('Target',bTargets)
    Error: set() failed. Do dumpStack() to see details.
    dumpStack()com.oracle.cie.domain.script.jython.WLSTException: java.lang.IllegalArgumentException: Param type [Ljavax.management.ObjectName; not supported
    >
    cmo.
    cmo.setTargets(newTargets)
    ls()...
    -rw- StagingMode nostage
    -rw- Target bi_cluster
    -rw- ValidateDdSecurityData false
    print get('Target')array(weblogic.management.configuration.TargetMBean,[Proxy for bi_cluster: Name=bi_cluster, Type=Cluster])
    cd('/Servers/AdminServer')
    tsvr=cmo
    cd('/AppDeployment/wsm-pm')
    newTargets.append(tsvr)
    print newTargetsarray(weblogic.management.configuration.TargetMBean,[Proxy for bi_cluster: Name=bi_cluster, Type=Cluster, Proxy for AdminServer: Name=AdminServer, Type=Server])
    cmo.setTargets(newTargets)Error: setTargets() failed. Do dumpStack() to see details.
    dumpStack()com.oracle.cie.domain.script.jython.WLSTException: java.lang.NullPointerException
    at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:51)
    at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1538)
    at com.oracle.cie.domain.script.jython.ScriptInvocationHandler.invoke(ScriptInvocationHandler.java:143)
    at $Proxy1.setTargets(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.WLST.main(WLST.java:29)
    Caused by: java.lang.NullPointerException
    at com.oracle.cie.domain.script.jython.ScriptInvocationHandler.set(ScriptInvocationHandler.java:175)
    at com.oracle.cie.domain.script.jython.ScriptInvocationHandler.invoke(ScriptInvocationHandler.java:103)
    ... 25 more

    Finally solved it myself. For the interest of others.
    With 2 calls of moveTargets, the target bi_cluster is replaced with BIP_Cluster_1 for all Library and AppDeployments.
    moveTargets('bi_cluster','BIP_Cluster_1','Library')
    moveTargets('bi_cluster','BIP_Cluster_1','AppDeployment')
    #=======================================================================================
    # moveTargets - target configBeans from oldDestination to newDestination
    #=======================================================================================
    def moveTargets(oldDest, newDest, cfgBean) :
      print 'Moving configBean ' + cfgBean + ' from ' + oldDest + ' to ' + newDest
      cd('/' + cfgBean)
      bag=ls(returnMap='true')
      for bean in bag:
         cd('/' + cfgBean + '/' + bean )
         workBean = cmo
         print "cfgBean " + workBean.getName() + " "
         # if oldDest is in Target of cfgBean
         if str(get('Target')).count(': Name=' + oldDest + ",")!=0:
           # unassign oldDest
           unassign(cfgBean,bean,"Target",oldDest)
           print " +- unassigned " + oldDest + " "
           # if newDest is not in Target of cfgBean
           if str(get('Target')).count(': Name=' + newDest + ",")==0:
             # assign newDest
             assign(cfgBean,bean,"Target",newDest)
             print " +- assigned " + newDest + " "

  • When button pressed: Multiple buttons

    Regarding the 'When Button pressed' condition available in various places (computations, branches, processes, etc), it offers me the option to select exactly one button.
    How can I make it so that I want the thing to fire when either Button 1 or 2 or 3 is pressed?
    Thanks

    Martin - Whenever a page is submitted with a button, the request value is set to a property from the button, either the button name for standard buttons or the request value attribute for item buttons. In either a PL/SQL expression condition or in some of the declarative condition types that look at the request value, you can compare it to a list of values that you're interested in.
    Note that the request value doesn't necessarily tell you which button was pressed. It tells you that some event set the request value. If your page can be submitted with a tab or with javascript that you put somewhere on the page, or if you've given multiple buttons the same request value, it's up to you to prevent ambiguity about the button-to-request mapping.
    Scott

  • IPhone SDK - Multiple buttons calling the same IBAction

    Hi,
    Can I call the same action with multiple buttons? I´ve just connected
    the action to the buttons in interface builder, but in the header file
    I can´t use - (IBAction)setOperator: (id)sender; as the parameter to the function, it always crash due to uncaught exception. If I use - (IBAction)setOperator; it
    works, but i can´t differentiate wich button was pressed.
    I don´t know if i can set the (id)sender parameter in the interface
    builder. Can anyone help me?
    Thanks,
    Pitteri

    .h file:
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    @interface CalculatorView : UIView {
    IBOutlet UITextField *txtResult;
    IBOutlet UIButton *btnMult;
    IBOutlet UIButton *btnDiv;
    @property (nonatomic, retain) UITextField *txtResult;
    @property (nonatomic, retain) UIButton *btnMult;
    @property (nonatomic, retain) UIButton *btnDiv;
    - (IBAction)setOperator:(id)sender;
    @end
    .m file:
    #import "CalculatorView.h"
    @implementation CalculatorView
    @synthesize btnDiv, btnMult, txtResult;
    - (IBAction)setOperator:(id)sender{
    //if btnMult pressed
    //bla bla bla
    //if btnDiv pressed
    //bla bla bla
    that´s my code. Hope u can help.
    thanks
    @end

  • Setting multiple keyframes at one time . . . Possible???

    Was working on a project the other night and the "producer" had brought in several clips consisting of multiple shots each with dissolves already in them. He was adamant that the shots stay "as is" so color correcting across them was a pain having to keyframe color corrections for each shot thru the transitions with the 3 way cc. I got it done but it was a hassle having to set all 20 something parameters and then having to do it all over again 30 frames later over and over again for something that was basically glorified b-roll clips. (The good news is that it worked very nicely.)
    So the question is . . . Is there a way to set keyframes for multiple parameters all at once? I know that there is a way to clear all the set keyframes at one time and find it hard to believe the wizkids at apple didn't think that an editor might want to set them all at one time.
    Thanks
    Eric

    I'm not sure how that would get around the problem I encountered the other night when i needed the settings to change over time several times within one clip. Even if I had set the keyframes in the viewer I would still have had to hit each one of the 20+ individual parameters and that's what I was hoping I could get around doing
    I mean they put in a "clear all" button but didn't think to put in a "set all" button . . . sometimes I miss my Avid lol.
    Thanks anyway
    E

  • I have an Apple ID with a single  e mail address. I want to set multiple addresses in the same ID. Can I? If so how?

    I have an Apple ID with a single  e mail address. I want to set multiple addresses in the same ID. Can I? If so how?

    Howdy there johnzcarp,
    As I understand it you want to have more than 1 email address under your Apple ID. You can have what are called Alternate Email addresses associated with your Apple ID and this article will help you get those setup:
    Manage your Apple ID primary, rescue, alternate, and notification email addresses
    Alternate email address
    You can add one or more alternate email addresses for use with Apple services such as Game Center, FaceTime, Find My Friends, iMessage, and OS X notifications.
    Go to My Apple ID (appleid.apple.com).
    Select “Manage your Apple ID” and sign in.
    Add an alternate address:
    Select Add Email Address, then enter your alternate address. Apple will send a verification email to that address. Didn't receive the email?
    Follow the instructions in the email to verify the address.
    Edit an alternate address:
    Select Edit next to the address, then enter the new address. Apple will send a verification email to that address. Didn't receive the email?
    Follow the instructions in the email to verify the address.
    Delete an alternate address: Select Delete next to the address.
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • How to set multiple senders for one account

    Hi all,
    I have a BIS account with my provider and a paid gmail account which collect for me mails from different address. Is it possible to set multiple senders for this account, thus it seems that I'm replying from one of these address and not only from my google address? In fact, it's important for me also that all mails come out from the same SMTP server (google).
    Thanks in advance.
    Best regards,
    Pierluigi

    For the BlackBerry to "send using" a specific email account, it must be set up on your BIS account as an email account, otherwise, you can send from that account.
    You can do that, and then block ALL incoming emails from those accounts, and allow only incoming mail from your one Gmail account, if you desire.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to set multiple alarms on E90?

    Hi guys,
    I want to set multiple alarms on a 24 hour period of the same day, please give hints on how this can be done, on my pervious handset I was able to set alarms for multiple dates & times.
    Solved!
    Go to Solution.

    Does the E90 not have the same multiple alarm features as the N95 & N82?
    Go into the clock, then press right for alarms. Then press Options > New Alarm and set it for the correct day and time. Then repeat the process to set mutiple alarms for the same day.

Maybe you are looking for

  • Startup Disk not there when reinstalling OSX (Early 2013 MBP retina)

    I had reinstalled the OSX on my MBP a few times so I am not unfamiliar with the process of rebooting from the boot menu, formatting via the disk utility and then reinstalling either via a backup or from the internet backup (as the retina does not hav

  • ASA 8.2.1 static nat translation

    Hello, i want to ask for this: On ASA version 8.2.1 is configured static translation like this: static (Inside,Outside)  5.5.5.100 192.168.1.5 netmask 255.255.255.255 what is a static 1:1 mapping between Outside and Inside IP. This translation create

  • SMS Related Issues of E series Devices

    Hi Nokian  Want to ask you some question   I am using Nokia E63 1) How to copy sms from memory card to phone memory Note i have already transferred messages from phone memory to Memory Card but now want to again change the memory to phone memory but

  • Driver update configuration error

    When i try to update my driver software for my iphone when registering to a non apple computer, it says that one of the drivers for my device cannot be installed. when i go into properties it says my device is not configured correctly so i cannot upd

  • Bad resolution waveform transferred from Lecroy oscilloscope to PC

    Hello, I am currently using Lecroy WavePro 7300A to analyze waves. When I tried to acquire the waveform from this oscilloscope to my nearby PC via Ethernet cable (using VICP::x.x.x.x as VISA address) I got problems with the resolution of the waveform