Canvas component won't receive focus

As you can see from the attached code, I have 2 TextInput
fields followed by a Canvas. I would like the canvas to receive
focus after I tab away from the second field but it doesn't, even
when I set the following properties of the Canvas:
1. focusEnabled = true
2. tabEnabled = true
3. tabChildren = false
The drawing of the focus aside, shouldn't the Canvas's
keyFocusChange event be firing after I tab out of the second field?
Any help would be GREATLY appreciated!
Thanks in advance,
Moshe

Ah, success! Apparently, to receive focus a component needs
to implement the IFocusManagerComponent interface. Strangely,
Canvas has all of the requisite methods so all that needs to be
done is creating an MXML component that implements
mx.managers.IFocusManagerComponent. Well, this is in addition to
setting the tabEnabled = true and focusEnabled = true (tabChildren
= false was just a wild guess I made early that turned out to be
unnecessary).
Anyway, hope this helps someone save a few minutes.
Cheers!
Moshe

Similar Messages

  • Applet Won't Receive Focus...Help!

    Hello, I am trying to program a Tetris applet, but for some reason I can't move the piece. The arrow keys move and rotate the piece and the space bar drops the piece. The code is too large to fit in a post, but I am including links so that you can see what I'm working with. The actual applet is at http://www.danielbakerdesigns.com/tetris/tetris.htm. There are five Java classes at http://www.danielbakerdesigns.com/tetris/Area.java, http://www.danielbakerdesigns.com/tetris/Board.java, http://www.danielbakerdesigns.com/tetris/Piece.java, http://www.danielbakerdesigns.com/tetris/Tetris.java, and http://www.danielbakerdesigns.com/tetris/Unit.java. Only the Area and Tetris classes are relevant to receiving key events (at least that I'm aware of).
    Could somebody please tell me why I can't move my pieces? I've tried everything I can think of (which probably means I am just majorly brain-farting someplace), but nothing seems to work.
    Thank you so much for your help!

    You dont have the error because there may be such class in your local class path.
    To solve this, you have to store the class file in correct directories.
    In the directory of storing tetris.htm, please create a directory com
    You should create directory like this
    com/sun/j3d/utils/timercom contain directory called sun. sun contain a directory called utils...
    Store J3DTimer in the directory of timer

  • [svn:fx-4.x] 14914: In adjustFocusRect, if the obj to receive focus isn' t this component, compensate for mirroring, if necessary.

    Revision: 14914
    Revision: 14914
    Author:   [email protected]
    Date:     2010-03-22 11:56:00 -0700 (Mon, 22 Mar 2010)
    Log Message:
    In adjustFocusRect, if the obj to receive focus isn't this component, compensate for mirroring, if necessary.  It is likely to be an icon with the component such as a radio button or checkbox.  This works as long as the focusObj is symmetric.
    QE notes:
    Doc notes: None
    Bugs: SDK-25786
    Reviewed By: Kevin, Jason
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-25786
    Modified Paths:
        flex/sdk/branches/4.x/frameworks/projects/framework/src/mx/core/UIComponent.as

    Revision: 14914
    Revision: 14914
    Author:   [email protected]
    Date:     2010-03-22 11:56:00 -0700 (Mon, 22 Mar 2010)
    Log Message:
    In adjustFocusRect, if the obj to receive focus isn't this component, compensate for mirroring, if necessary.  It is likely to be an icon with the component such as a radio button or checkbox.  This works as long as the focusObj is symmetric.
    QE notes:
    Doc notes: None
    Bugs: SDK-25786
    Reviewed By: Kevin, Jason
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-25786
    Modified Paths:
        flex/sdk/branches/4.x/frameworks/projects/framework/src/mx/core/UIComponent.as

  • Popup menu appears behind canvas component

    Has anybody encountered this problem?
    I attach the popup menu to the canvas component, like this:
    public void mousePressed(MouseEvent e)
         if (e.getSource() == psuCanvas && e.getButton() == MouseEvent.BUTTON3)
              pmenu.show((Component)psuCanvas, e.getX(), e.getY());
              contextText.setText("Right Click!!!");
    The popup menu is only visible when I click the edge of the Canvas component, that is how I know that the popup is actually showing but behind the Canvas component!!!
    Please help

    You mean your 1 step of calling "JPopupMenu.setDefaultLightWeightPopupEnabled(false);"?
    That method is meant specifically for using popup menus when you are mixing AWT and Swing components. The reason is because of the problem you first posted about. It's a way to get around that problem. But really, it's more of a hack that is used when dealing with old AWT-based components which you can't (or won't), for whatever reason, "update" to Swing versions. (Say from a 3rd-party library).
    It is not recommended to mix AWT and Swing components, as already mentioned. The provided link above is an article that explains the issues with this. The fact that you can doesn't mean you should.
    If you are writing this Canvas subclass yourself, and it's going to be typically used in a Swing application, you will have problems later, most likely. For example, why don't you try puting your Canvas class in a JScrollPane so you can make it bigger then the window and scrollable? You'll have scrollbar visibility issues. Fine, you can use java.awt.ScrollPane, I guess. Then I can think of several things one might do with JLayeredPanes which would create problems as well. And there is no simple "setDefaultLightWeightEnabled()" option to fix those.
    So eventually, as your app, or library, matures, you start running into these problems cuz you are using AWT components where you should be using Swing components, and you start making more hack-like fixes for all these problems like using setDefaultLightWeightPopupEnabled() and explicit sizing instead of layout managers and limiting yourself to what you can do with your components.
    That's why.

  • My husband and I shared the same apple id I accidentally deleted his number from the iCloud And now his phone won't receive phone calls or text what do I do

    My husband and I shared the same apple id I accidentally deleted his number from the iCloud And now his phone won't receive phone calls or text what do I do

    In preferences turn on iTunes sharing in iTunes preferences and keep iTunes turned on in both accounts. Or better yet put the iTunes library on the main HD rather than in an account and set the location of the library to that location in iTunes preferences.

  • E72 sends email, but won't receive

    I posted this last week at the end of a year old post, but only received word from the original poster telling that his fix was to get an I-Phone. After many years of dealing with Nokia idiosyncrasies, several months ago, I too gave up and got an I-Phone. It is beautifully reliable. Unfortunately, my daughter's phone died, and a friend gave me a new E72 for her. It looks like I'm back to Nokia reliability. Can anyone help restore my continually fading faith in Nokia? Here's my problem:
    I've set up email manually, through the set up wizard, and I'm attempting to point "Sync Email " to one the of many accounts now in my phone. The email accounts can send, but won't receive. I have gotten into a never ending loop:
    The help screen says to "To start synchronising email messages between your device an the e-mail server, select options>synchronise" However, there is no "synchronise" under options.
    If I go into "messaging">options>settings>email", all the emails accounts that I have created show, but if I go into "messaging">options>settings>sync email", it shows "Mailbox in Use" "None".
    When I click on "none", I get the message "No Mailbox defined. Define now?
    Sure, I'll try it again. I click "yes"
    My old friend the email set up wizard appears. Create another account.
    Goto 1
    I've contacted Nokia. First, I was told to pull the battery and wait 5-10 mins. Same problem. Next, I was told to do a factory reset. Same problem. Finally, I was told that if it wasn't a tested pop3 (gmail, yahoo, etc), Nokia doesn't support it. I doesn't seem to matter that every Nokia I have had in the past work with my email server.
    Has anyone found a Nokia-based solution to this problem?
    Thank you for putting up with my frustration and for offering any possible solutions that you can suggest.
    John

    Hey Jason,
    I have ran into this situation quite a few times in my experiences with fax issues,  it very well could be the digital line itself. My last suggestions for you would be to try a power reset on the printer, and also try a filter on the fax line to see if that could help the line. If you are still having issues with sending faxes, give us a call to our technical support to see if there are any more options for you.
    Press the Power button to turn on the product.
    With the product turned on, disconnect the power cord from the rear of the product.
    Unplug the power cord from the wall outlet.
    Wait at least 15 seconds.
    Plug the power cord back into the wall outlet.
    Reconnect the power cord to the rear of the product.
    If the product does not turn on by itself, press the Power button to turn it on.
    Here is an example of a filter:
    Please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region. http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    Have a great Monday
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • KIN One m won't receive mms messages

    My KIN ONEm won't receive mms messages, I've had the problem once or twice before and every time it's happened it shows this error message "someone sent you a message but it can't be retrieved right now" with the error code "3-4003" it's fixed itself in recent times, but this time it's been going on for a few hours and it won't get fixed, what should I do?

    I had the same problem and fixed it by going into:
    settings, wireless & networks "more", mobile networks, then you need to "enable" data access over Mobile networks
    It will then have a check mark on "data enabled"
    After I did that I immediately was able to send and receive MMS.

  • My iPad 2 won't receive text messages and is not sharing any data with my iPhone 4. Please help!

    My iPad 2 won't receive text messages and is not sharing any data with my iPhone 4. Please help!

    The iPad receives Text Messages through Apple's iMessage feature. Make sure this is turned on on your phone. Also, text messages received at your phone number are not shared with the iPad. Make sure that iMessage texts are being sent to your EMAIL ADDRESS

  • Calling a function every time a canvas component is viewed

    hi all,
    i have a function in a canvas component which i need to call
    every time i view that component. is there a way to generate an
    event each time a i view that component.. 'show' works only when
    the component turns from invisble to visible..
    thanx in advance

    the code is
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:custom=".*"
    backgroundColor="#ccccccc" width="100%" height="100%"
    creationComplete="findCreatePermission(); addListeners();"
    show="findCreatePermission();"
    >
    <mx:Script>
    <![CDATA[
    private function findCreatePermission():void
    if(myPermission & 2)
    createPermission = true;
    else
    createPermission = false;
    ]]>
    </mx:Script>
    <mx:ViewStack id="mainStack" width="100%" height="100%"
    >
    <mx:Canvas id="mainCanvas"
    show="createPatient.visible=false;patientList.visible=true;sample2();">
    <mx:VBox width="100%" height="100%">
    <custom:patientInfo id="patientList" label="Room search"
    backgroundColor="#ECECD9" width="100%" height="100%"
    visible="true" />
    <mx:HBox horizontalAlign="center" width="100%" >
    <mx:Button id="create" label="Create New Patient"
    height="30" styleName="buttonBlue"
    enabled="{createPermission}"
    click="{mainStack.selectedChild=createPatient;}" />
    </mx:HBox>
    </mx:VBox>
    </mx:Canvas>
    <custom:create_patient id="createPatient" label="Create
    Patient" width="100%" backgroundColor="#ECECD9" visible="false"
    returnStack="{mainStack}" returnCanvas="{mainCanvas}"
    show="patientList.visible=false;createPatient.visible=true;"/>
    </mx:ViewStack>
    </mx:Canvas>
    i need to call findcreatePermission() every tme this
    component is viewed

  • Problem with Canvas component.

    Hello all,
    I am building a sort of flowcharting software using Swing. The software is standalone. The "flowcharting" component is a sort of canvas, However it does not extend the Canvas class from AWT, but rather extends a JComponent. The paint() method simpy says g.fillRect(color) and this produces the backdrop. Ok, to the point, every once in a while, some components or text will not render at all on this canvas. If if I were to close and load the flowchart, the same component will not render, and usually it is text with user defined fonts that will not render. I would say they render correctly on 80% of the machines on which it has been installed. It may be a font problem, but other text with the same exact font will render. Assuming that the components are instructed to render(I am fairly convinced of this) are there any possible reasons that these components will not render. All components render on my machine, and some will not render on other machines. Has anyone ever dealt with anything like this? Perhaps my canvas should actually subclass Canvas from AWT? Any feedback is much appreciated.
    Thanks.

    Thanks,
    Actually, this canvas overrides the JComponent class and is not an AWT Canvas component. A couple of things I did notice however....
    Maybe overriding JPanel would be more suitable.
    Currently the paint() method is being overridden as opposed to the paintComponent() method. I think overriding paintComponent would be the right thing to do.
    Thanks for help anyways.

  • Mail won't receive mails once updated to 10.4.7

    Since I updated to 10.4.7, Mail does not receive any mails on my work network which I did not change any settings of Mail as well as Network Settings prior to and after the update. However it works ok on my home network.
    My work is using a proxy server but it works fine on Entourage (which i don't like it...)
    help will be lovely.
    ta ta
    Koman

    I too have updated recently to 10.4.7 and now mail (Version 2.1 (752/752.2) won't receive from my pop through the proxy. No settings changed.
    All I get is the '!' near the inbox folder, and when clicked it shows an error window advising that 'the connection failed'
    I have intel mac mini at school and need to get this sorted. I have tried renaming prefs to force newprefs but no change.
    I have not deleted the account...yet. to recreate it and try again.

  • Printer won't receive signal after updating to Yosemite

    I have ran a Xerox Phaser 3100 off of my iMac for quite some time and it has been totally fine. I just finished updating to Yosemite and now my printer won't receive anything. Window keeps saying ' Printer 'filter' failure'. I've tried adding and resetting the printer and nothing seems to work. Help!

    I have another idea on how to use the old driver. NO guarantees.
    For all who may be reading this -- this is for Yosemite -- it reduces security by relaxing sandboxing. It is a workaround, not a permanent fix.
    Use the Terminal utility to run the two commands below -
    sudo sh -c 'echo "Sandboxing Relaxed" >> /etc/cups/cups-files.conf'
    sudo launchctl stop org.cups.cupsd
    (sudo means superuser do - this is your admin user on OS X. It asks for your password - but it hides it from you when you type - for security)

  • I have an iPhone 4 and it's been receiving email kind of late, meaning if I make a purchase, at let's say Macy's on my phone, I won't receive the confirmation email immediately; my question is my iPhone maybe hacked? I read that that's one symptom...

    I have an iPhone 4 and it's been receiving email kind of late, meaning if I make a purchase, at let's say Macy's on my phone, I won't receive the confirmation email immediately; my question is my iPhone maybe hacked? I read that that's one symptom, so if my phone is infected, how do I fix it?

    Alejandro,
    Send yourself a test message and see what the response time is.
    Is your e-Mail system a push type or a poll type.
    If it is a polling type, there will be a delay because there is a timed polling sequences (that you can control to a degree)
    In Settings/Mail look for 'Fetch' to see how it is setup.
    -Alan

  • VERVE 450 - Won't receive text messages

    I bought this kit specifically for SMS messaging, but it has never worked since I've had it.
    It will Send messages - but not receive them.
    I sent a message to my mobile to 'activate' it - it didn't work.
    I sent Register to 00000 - it didn't work.
    I sent Reset to 00000 - it didn't work.
    I get a message saying that it can now send & receive messages,,,,, but it still won't receive.
    Because we can't actually get in touch with BT by email, I can't ask a specific question: how do I fix this.
    When I first bought the kit (3 handsets) we could ask BT for help - having said that, they obviously can't understand English, cos they kept saying: "send register to 00000" or "send reset to 00000" etc.  This went on for weeks before I gave up.
    Any ideas please ?

    I have almost  the same problems with BT7600 Txt enabled phones. although I have been able to send /register/reregister. I can only receive spoken text messages but can send OK.  Yes I have caller display.
    A moderator looked into this for me with no luck in solving.   Do you by any chance live in South Wales as apparently this is a common problem with exchanges in South Wales. (no Infinity here) and old lines.!!! 
    EDIT.
    Noticed from a previous post of yours.....
      Cornwall, not so far as the crow flies across the English/Bristol Channel. 

  • Af:table receives focus when clicked which causes scrolling of page

    We're using a flowing UI design; we have a listing of items on the page; so when the listing gets long, you use the browser's scroll bar to scroll down the list (as opposed to having an individually-scrolling content island).
    The issue we're running into is this: When the listing is long enough that the page contains a scrollbar, and you click one of the rows in the table, the page scrolls up so that the top of the table is aligned with the top of the browser window (in all browsers other than FireFox). I spent some time looking at the JavaScript in a debugging tool and discovered that the scrolling is due to the table receiving focus when AdfDhtmlTablePeer._grabFocus is called on the table's mousedown event.
    By itself this is just a minor annoyance, but when it happens while attempting to access a context menu it becomes a serious usability problem. If for example you right-click on row 4 in your table, the page scrolls up as soon as it detects the mousedown event on the table; at this point your cursor is no longer over row 4 in your table, maybe row 9; so when the context menu is subsequently displayed, it's related to row 9 rather than row 4 which you originally clicked.
    I created a very simple JSF page to confirm that the behavior could be reproduced outside the context of our application. This is the JSF code for the page:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="jmtest.jsf" id="d1">
    <af:form id="f1">
    <af:panelBorderLayout id="pbl1"
    inlineStyle="background:#ffffcc; height:150px;">
    <af:outputText value="Test 01" id="ot2"/>
    </af:panelBorderLayout>
    <af:table var="row" rowBandingInterval="0" id="t1"
    value="#{jmtest.testList}" fetchSize="200"
    contentDelivery="immediate" immediate="true"
    autoHeightRows="200">
    <af:column sortable="false" headerText="col1" id="c1" width="500">
    <af:outputText value="#{row}" id="ot1"/>
    </af:column>
    </af:table>
    </af:form>
    </af:document>
    </f:view>
    This is the simple bean that populates the table with 100 rows:
    package tmptst.jmarshal;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.ViewScoped;
    @ManagedBean
    @ViewScoped
    public class jmtest
    public String[] getTestList()
    String[] testList;
    testList = new String[100];
    int count = 0;
    while (count < 100)
    testList[count] = "Item " + count;
    count++;
    return testList;
    What I need is some JavaScript that can be used to suppress the focusing of the table that occurs inside HandleComponentMouseDown. There are ways that I could hack my way to roughly the desired result, but I'm hoping there are some valid ADF-approved hooks that could allow me to get the job done in a cleaner way. Or better yet, maybe some declarative switch or flowing page-geometry configuration we've overlooked.

    We're currently using 11.1.2.2.0 (this is for the .8 release of WebCenter Content). The plan is to migrate to 11.1.2.4.0 for .9; but for this release we've got to stick with what we're using.

Maybe you are looking for

  • How to get album art on your iPod nano. Read this.

    I have had problems getting artowrk on my nano from my computer but it was only because I didnt have USB 2.0 outlets on my computer. I used a different computer that had USB 2.0 and it worked fine. Just click the little button under your sources in i

  • Default value of date picker not showing in sql query

    Hi, I have a tabular form page with a query similar to the following: select emp_name, salary from emp_table where trunc(hire_date)=trunc(to_date(:P42_START_DATE)) where P42_START_DATE is the name of a date picker item. I set the source type of the d

  • Mouse button behaviour

    Hi! I have a problem with Premiere Pro. When trimming a clip, premiere will stop trimming, eventhough I haven't released the mouse button yet. The same happens with dragging a clip. You can imagine it's quite annoying to have your NLE decide when you

  • Why did the new ios wiped out my ipod?

    I have 2 ipod touches. My old one I use for my kids, and I bought a new one almost a year a go that I have my personal things on. I was trying to sync some music on the new one today but I got a message that the ios on the ipod need to be updated and

  • Itunes does not start anymore after upgrade to 6.05.20

    I upgraded itunes to the current version and after that itunes does not start anymore. I scanned for virus with an up-to-date scanner, scanned for adware with Windows defender and ewido and used the tips from http://docs.info.apple.com/article.html?a