Events across multiple JPanels

Hello, I'm returning to programming after an absence and appreciate the assistance. Here's my application and challenge:
I'm creating an application that animates an object based upon a number of factors (a mathematical function like the sin curve and a number of variables that impact its x and y coordinates).
The application is composed of
1) A JFrame, instantiated by the application's main class. This JFrame instantiates the next 2 panel components:
2) A JPanel that contains input components that change the variables impacting the animation (sliders, buttons, checkboxes, etc)
3) A JPanel subclass implementing runnable, managing the animation.
My challenge is the event model.
How do I notify the animation panel when events around variable changes are happening in the input panel? The application runs fine when I pack it all into one panel, but that won't allow me to scale.
(What would be even nicer, would be my ability to make the sub-classed JPanel usable in the NetBeans UI, but I don't want to press my luck)
The help is greatly appreciated!
Russell

growing_my_skills wrote:
Hello, I'm returning to programming after an absence and appreciate the assistance. Here's my application and challenge:
I'm creating an application that animates an object based upon a number of factors (a mathematical function like the sin curve and a number of variables that impact its x and y coordinates).
The application is composed of
1) A JFrame, instantiated by the application's main class. This JFrame instantiates the next 2 panel components:
2) A JPanel that contains input components that change the variables impacting the animation (sliders, buttons, checkboxes, etc)
3) A JPanel subclass implementing runnable, managing the animation.
My challenge is the event model.
How do I notify the animation panel when events around variable changes are happening in the input panel? The application runs fine when I pack it all into one panel, but that won't allow me to scale.
- Group the properties to some input classes,
- define events in the input panel
- fire the according event if a property of a input class changes
- listen in the parent (mediator)
- send the updated information to the animation panel
(What would be even nicer, would be my ability to make the sub-classed JPanel usable in the NetBeans UI, but I don't want to press my luck)
If you mean the NetBeans Platform, then you could place each panel in a separate TopComponent and pass the information via the Lookup.
-Puce

Similar Messages

  • How to display timed events across multiple days in month view?

    Simple question I suppose, though I don't know if it has an answer. When I put an event spanning multiple days (say, a week long vacation) in iCal, and check the "All Day" box, it shows a nice, accurate, bar going across those days the event I'm entering covers. However, if I give it specific times for the event (e.g. the times of departure and return for said trip), even if those times are a week apart, the event still appears to only cover the starting date when viewed from the month perspective.
    Is there any way I can make the month calendar show all the days during which the event is "happening" so that at a glance I will realize that an entire week is busy?

    Hi,
    You can do it with keyboard shortcuts.
    Select the event. Press Cmd+X. Press Cmd and right or left arrow (depending if it is forward or back in months) until you are in the correct month. Press Cmd+V to pase on the same day in the new month.
    Best wishes
    John M

  • All-day events across multiple days

    Okay, this is a very specifc question about a very specific situaiton, but I am curious to know what is going on. When I have an all-day event scheduled for one day in iCal and I sync it with my phone (Motorola v551) it shows up as a nice little note at the top of my calendar on my phone. When I have an all-day event scheduled across multiple days in iCal it shows up as an actual event across all the hours of the day for as long as I have it scheduled on my phone.
    I have discovered a work-around by taking that one-day, all-day event and having it repeat the number of days of the event, but it just doesn't look right in iCal.

    The calendar on your phone likely doesn't support events that span mutiple days. The solution of a repeating event is the correct answer.

  • How to share projects/events across multiple users

    what's the best way to share projects and events for multiple users on the same computer?
    i want to be able to open fcpx in one user account and have access to all events and projects that i have access to as another user. basically, fcpx should look exactly the same in both accounts.

    Welcome User in OTN,
    to make two projects can access its classes you should goto the project property ---> Dependencies then add the other project.
    in your case:
    try to goto you Model project property ----> Dependencies ---> Edit Dependencies .
    you will find your ViewController project. Expand it thin check to Build Output.
    you can make this for ViewContoller project also as:
    goto you ViewContoller project property ----> Dependencies ---> Edit Dependencies .
    you will find your Model project. Expand it thin check to Build Output.
    Sameh Nassar

  • Multiple JPanels on top of each all receiving mouse events

    I have multiple JPanels that are painted on top of each other. Each one has mouse listeners that listen for mouse enters, exits, etc. However, it appears that Swing is only propagating the mouse events for the most visible panel (the one that is on top of all of the others). Is there a way to configure Swing in such a way that all JPanels on the screen will get the mouse events, even if they aren't entirely visible on the screen?
    Thanks,
    -- Ryan

    Hi,
    You can implement mouse listener for panel and you can identify buttons in the panel with the mouse event of panel using MouseEvent.getComponentAt(MouseEvent.getPoint()) instanceof JButton or not.
    I hope this will help,
    Kishore.

  • Events Spanning Multiple Days

    I'm converting to iCal from another application I've used for years. Does iCal support any way to insert and display a line, banner, bar, etc. accross multiple days in the Month View so that I can display the fact that I'm on the road or on vacation, etc. for the days covered by the line, banner, bar, etc?
    I would be happy to provide a picture of what the application I've been using does to support this need.
    PowerBook G4   Mac OS X (10.4.8)   iCal v2.0.4 (1055)

    Regal909,
    Is this what you are looking for? Creating an all-day or multi-day event:You can create an event that lasts one or more complete days (for example, for a vacation), or an event that spans multiple days with different start and end times.
    To create an all-day event, make sure you're in Day or Week view, then double-click in the white area at the top of the iCal window (just below the date). If you want your all-day event to last multiple days, drag a corner of the event across the days in the main calendar view (or type the end date in the Info drawer).
    To create a multi-day event, make sure you're in Day or Week view, then drag from the start time to the end time of the event (you can drag across multiple days). You can also type the start and end dates and times in the event's Info drawer.
    All-day events are shown across the top of the day in the main calendar view. 


    Tip: You can also make any event an all-day event by selecting the "all-day event" checkbox in the event's Info drawer.;~)

  • Cache synchronisation via events acrsoss multiple clients

    I have a number of TopLink (9.0.3) clients (using SoftCacheWeakIdentityMap) connected to a single server via RMIRemoteSessions and want to keep the objects in the local caches of all the clients up-to-date when any one of the clients updates one of these objects (through a UnitofWork). I'm looking for some advice as to the most appropriate way to do this in TopLink.
    Calling refreshObject on relevant objects in each client before I access them works, but am looking for a more "automatic" mechanism -- such as events or even "automatic cache synchronisation".
    I've tried using events but it doesn't work as I expected. I've specified event methods in the Mapping Workbench for the relevant classes, but these ONLY get called in the client session of the client that makes the change (and the server session), and NOT in any of the other client sessions. Is this the intended behaviour or am I doing something wrong here?
    I've also looked at the cache synchronisation mechanisms but this seems to be more targeted at synchronisation of caches across multiple servers. Is this correct or would this be an appropriate mechanism to use in my case?
    Alternatively, is there some way I can find out if an object is out-of-date in the client cache so I can then do a refresh before I access it?
    Any guidance / comments would be most appreciated...
    Thanks

    Roger,
    a.1) TopLink's cache-sync will notify all connected caches of changes through other TopLink sessions. This will update the object with the values changes to keep the cached objects from being stale/out-of-sync with the database.
    a.2) If your clients are not all TopLink enabled then I would recommend starting with optimistic locking to detect when you write against a stale object, a weak cache to minimize stale objects and possibly adding a notification system from the database. The notification system has been successful in very read intensive systems only.
    b) There is a setting on a query and more globally on a descriptor to refreshIfNewerVersion. This works with the optimistic locking policy to ensure that when the refresh row is returned the cost of repopulating object is not incurred if the version match.
    There is some new functionality coming in 10.0.3 to handle cache invalidation/expiry. This will allow objects to be expired a fixed time after reading, at a regular point in time daily, or through API. This API will also allow you to ask if an object has been invalidated/expired.
    A How-to for this functionality in the 10.0.3 preview is available at: http://otn.oracle.com/products/ias/toplink/preview/howto/cacheexpiry.htm
    Doug

  • Simple FocusTraversalPolicy (multiple JPanels)

    I've seen quite a few posts on this topic, so I thought I'd share my own simple solution. It solves the problem of the tab order when you have multiple JPanels and want to enforce a specific tab order.
    class MyFocusTraversalPolicy extends FocusTraversalPolicy {
        Vector components;
        public MyFocusTraversalPolicy(Vector components) {
            this.components = components;
        public Component getComponentAfter(Container root, Component comp) {
            int ix = components.indexOf(comp) + 1;
            Component c;
            if(ix >= components.size())
                c = getFirstComponent(root);
            else
                c = (Component)components.get(ix);
            return c.isEnabled() ? c : getComponentAfter(root, c);
        public Component getComponentBefore(Container root, Component comp) {
            int ix = components.indexOf(comp) - 1;
            Component c;
            if(ix < 0)
                c = getLastComponent(root);
            else
                c = (Component)components.get(ix);
            return c.isEnabled() ? c : getComponentBefore(root, c);
        public Component getDefaultComponent(Container root) {
            return (Component)components.get(0);
        public Component getFirstComponent(Container root) {
            return (Component)components.get(0);
        public Component getLastComponent(Container root) {
            return (Component)components.get(components.size() - 1);
    }Create the Swing components as usual, add the components to a vector, in the order you want them to be tabbed:
    Vector comps = new Vector();
    comps.add(textField1);
    comps.add(comoboBox1);
    comps.add(((JSpinner.DefaultEditor)spinner1.getEditor()).getTextField()); 
    MyFocusTraversalPolicy policy = new MyFocusTraversalPolicy(comps);
    setFocusTraversalPolicy(policy);Note how the JSpinner component is added. This works fine with tabbing forwards and backwards; skips disabled components as expected.

    Hi AikoMuto,
    I want to traverse focus among some components(not all the components)
    lie in multiple panels which are in different classes. Following is my
    class structure.
    Class Test extends JPanel{
    PanelA panelA;
    PanelB panelB;
    PanelC panelC;
    public void jbInit()
    Vector comps = new Vector();
    comps.add(panelA.fieldA);
    comps.add(panelB.fieldB);
    for(int i=0;i<panelC.buttons.length;i++){
    comps.add(panelC.buttons);
    MyFocusTraversalPolicy policy = new MyFocusTraversalPolicy(comps);
    setFocusTraversalPolicy(policy);
    Class PanelA extends JPanel{
    JTextField fieldA;
    JScrollbar scrollA;
    Class PanelB extends JPanel{
    JTextField fieldB;
    JScrollbar scrollB;
    Class PanelC extends JPanel{
    JButton[] buttons;
    I want to traverse focus among fieldA -> fieldB -> buttons[0]
    -> buttons[1] -> ................ -> buttons[buttons.length -1].
    I used your code and checked whether it's working for my example. Setting traversal policy is done in parent panel i.e. in Test class. But
    unfortunately it doesn't capture both Tab and Tab+Shift keys. I
    debugged the code and found that it doesn't call either of
    getComponentAfter() or getComponentBefore() methods for above key
    events.
    I guess your code is not working as the panels are in different classes.
    Could you please help me to get this done?
    Thanks & Regards

  • EtherChannel Across Multiple Slots

    The examples I have seen for EtherChannel always bundle multiple ports on the same slot.  It seems that bundleing ports across multiple slots would increase the resilency.  For example when linking two core switches together.  I assume this would allow the link to stay up if the card in a given slot failed.  Is this supported?  If so, are there any concerns?   

    Disclaimer
    The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.
    Liability Disclaimer
    In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.
    Posting
    It seems that bundleing ports across multiple slots would increase the resilency.  For example when linking two core switches together.  I assume this would allow the link to stay up if the card in a given slot failed.  Is this supported?  If so, are there any concerns?   
    Across slots is indeed done to increase resiliency.
    Concerns?  Yes, on some chassis, different cards may have different QoS architectures.  You may have to configure platform to ignore this.  Also, you can channel across different media (fiber and copper).
    At least on 6500 VSS, ingress traffic will use same 6500 egress link (this to avoid transiting VSL).

  • Sync Thunderbird across multiple devices

    Can anyone tell me how to sync my Thunderbird email accounts across multiple devices?  I've got this weird situation where incoming emails are showing up on one device but not another, and the contents of the inboxes are different across iMac; Macbook; iPad and iPhone.  I'm using IMAP  but just can't get the inboxes to look the same across each device.  I use this account for work so it's very frustrating.

    I have the same setup here for me any my wife. We each have a separate apple ID used for iCloud (but share one ID for iTunes).
    We each have personal calendars but we also have a shared one (named shared). On icloud.com we have that calendar shared where we can each add/edit the events. And it is shared accross our iPad and iPhones.

  • Sharing an iTunes Library across multiple user account and a network.

    Sharing an iTunes Music Library across multiple user accounts.
    Hello Everybody!
    Firstly, this was designed to be run in Mac OS X 10.4 Tiger. It will not work with earlier versions of Mac OS X! Sorry.
    Here's a handy tip for keeping your hard drive neat and tidy, it also saves space, what in effect will be done is an iTunes music library will be shared amongst multiple users on the same machine. There are advantages and disadvantages to using this method.
    • Firstly I think it might be worthwhile to state the advantages and disadvantages to using this approach.
    The advantages include:
    - Space will be saved, as no duplicate files will occur.
    - The administrator will be able to have complete control over the content of the iTunes library, this may be useful for restricting the content of the Library; particularly for example if computer is being used at and education institution, business or any other sort of institution where things such as explicit content would be less favorable.
    - The machine will not be slowed by the fact that every user has lots of files.
    The disadvantages to this system include.
    - The fact that the account storing the music will have to be logged in, and iTunes will have to be active in that account.
    - If the account housing the music is not active then nobody can use the iTunes library.
    - There is a certain degree of risk present when an administrator account must be continually active.
    - Fast User Switching must be enabled.
    Overview:
    A central account controls all music on the machine/network, this is achieved by storing iTunes files in a public location as opposed to in the user's directory. In effect the system will give all users across the machine/network access to the same music/files without the possibility of files 'doubling up' because two different users like the same types of music. This approach saves valuable disk space in this regard and may therefore prove to be useful in some situations.
    This is a hearty process to undertake, so only follow this tutorial if you're willing to go all the way to the end of it.
    Process:
    Step 1:
    Firstly, we need to organize the host library, I tidied mine up, removing excess playlists, random files, things like that. this will make thing a bit easier in the later stages of this process.
    Once the library is tidied up, move the entire "iTunes" folder from your Home directory to the "//localhost" directory (The Macintosh HD) and ensure that files are on the same level as the "Applications", "Users", "Library" and "System" directories; this will ensure that the files in the library are available to all users on the machine (this also works for networks)
    Optionally you can set the ownership of the folder to the 'administrator' account (the user who will be hosting the library.), you may also like to set the permissions of 'you can' to "Read & Write" (assuming that you are doing this through the user who will host the library); secondly you should set the "Owner" to the administrator who will be hosting the library and set their "access" to "Read & Write" (this will ensure that the administrator has full access to the folder). The final part of this step involves setting access for the "Others" tab to "Read Only" this will ensure that the other users can view but not modify the contents on the folder.
    Overview:
    So far we have done the following steps:
    1. Organized the host library.
    2. Placed the iTunes directory into a 'public' directory so that other users may use it. (this step is essential if you plan on sharing the library across multiple accounts on the same machine. NOTE: this step is only necessary if you are wanting to share you library across multiple accounts on the same machine, if you simply want to share the music across a network, use the iTunes sharing facility.
    3. set ownership and permissions for the iTunes music folder.
    Step 2:
    Currently the administrator is the only user who can use this library, however we will address this soon. In this step we will enable iTunes music sharing in the administrator's account, this will enable other users to access the files in the library.
    If you are not logged in as the administrator, do so; secondly, open iTunes and select "Preferences" from the "iTunes" menu, now click the "Sharing" tab, if "share my library on my local network" is not checked, the radio buttons below this will now become active, you may choose to share the entire libraries contents, or share only selected content.
    Sharing only selected content may be useful if their is explicit content in the library and minors use the network or machine that the library is connected to.
    If you have selected "share entire library" go to Step 3, if you have selected share "share selected playlists" read on.
    After clicking "share selected playlists" you must then select the playlists that you intend to share across your accounts and network. Once you have finished selecting the playlists, click "OK" to save the settings.
    Overview:
    In this step we:
    1. Enabled iTunes sharing in the administrator's account, now, users on the local network may access the iTunes library, however, users on the same machine may not.
    Step 3:
    Now we will enable users on the same machine to access the library on the machine. This is achieved by logging in as each user, opening iTunes, opening iTunes preferences, and clicking "look for shared music". now all users on the machine may also access the library that the administrator controls.
    This in effect will mean that the user will not need to use their user library, it will be provided to them via a pseudo network connection.
    As a secondary measure, I have chosen to write a generic login script that will move any content from the user's "Music/iTunes/iTunes Music" directory to the trash and then empties the user's trash.
    This is done through the use of an Automator Application: this application does the following actions.
    1. Uses the "Finder" action "Get Specified Finder Items"
    1a. The user's "~/Music/iTunes/iTunes Music" folder
    2. Uses the "Finder" action "Get Folder Contents"
    3. Uses the "Finder" action "Move to Trash"
    4. Uses the "Automator" action "Run AppleScript"
    4a. with the following:
    on run {input, parameters}
    tell application "Finder"
    empty trash
    end tell
    return input
    end run
    IMPORTANT: Once the script is adapted to the user account it must be set as a login item. in order to keep the script out of the way i have placed it in the user's "Library" directory, in "Application Support" under "iTunes".
    Overview:
    Here we:
    1. Enabled iTunes sharing in the user accounts on the host machine, in effect allowing all users of the machine to view a single iTunes library.
    2. (Optional) I have created a login application that will remove any content that has been added to user iTunes libraries, this in effect stops other users of the machine from adding music and files to iTunes.
    Step 4:
    If it is not already enabled, open system preferences and enable Fast User Switching in Accounts Options.
    Summary:
    We have shared a single iTunes library across multiple user account, while still allowing for network sharing. This method is designed to save space on machines, particularly those with smaller hard drives.
    I hope that this hint proves to be helpful and I hope everybody will give me feedback on my process.
    regards,
    Pete.
    iBook G4; 60GB Hard Drive, 512MB RAM, Airport Extreme   Mac OS X (10.4.6)   iWork & iLife '06, Adobe CS2, Final Cut Pro. Anything and Everything!!!

    how to share music between different accounts on a single computer

  • How can I display selected tags across multiple e-mail addresses?

    I receive email on a specific topic but via several e-mail addresses. How can I view selected tags where the resulting e-mails span several (7) email addresses. They are all active on my Thunderbird, but as far as I know, I can only display the selected tag on one of them at a time.
    Any assistance greatly appreciated as this is a very big problem for me.
    thanks, Ron75

    This solution does not appear to work across multiple e-mail addresses.
    Perhaps I should have said "work across multiple e-mail address at the same time. I get e-mail on specific topics via several email addresses and wish to view all the tagged emails regardless of which email account in which they reside.
    I could not get this solution to select more than one email account at a time.

  • Sharing one iTunes library across multiple accounts on the same Mac

    Hello, I've poked around at some of the posts dealing with sharing one iTunes music library across multiple accounts on the same Mac but it seems like this can only be done if the libary is moved to a shared folder. I realize this can be done but I was trying to share it the way it is described in a post on Apple support (See link below.). That post seemed to imply that you don't have to move the library from its original location (owned by account A, e.g.), rather just make a couple preference changes in the accounts, use fast user switching and voila. That doesn't seem to work. So my question is this: Is the only way to share one iTunes music library across multiple accounts on the same Mac to move it to a shared folder? I'm running 10.4.8 on an Intel iMac. Thanks in advance!
    http://docs.info.apple.com/article.html?artnum=93195

    After reading this and several other related threads, I am becoming thoroughly confused about all of this. I have a situation similar to the one that pokerpal described in the post dated January 7 at 8:06 pm, except that the music files on my system are located on an external hard drive. Everything else is pretty much the same though - I am the admin user (and the main iTunes user and maintainer) and my girlfriend is a standard user who has no music in her own iTunes library. She can see and listen to and make playlists from and sync her iPod with the music in this library from her account, and I can do the same thing, independent of her, from my account. And if I make a change to information within a song, she doesn't see it, and vice versa, and I understand that. What I don't understand is why when I add a song or an album to the music files by importing a CD or downloading something from the iTunes Music Store, she has no way of knowing that unless I tell her, and then she can add it to her library by using the "Add to Library" function. Is there no way of automatically updating her library files to add the new song(s)? We have almost 15,000 songs and videos in that library, and I don't even want to think about what might have to happen if the answer to my question is "no." Interestingly enough, if I put an update to a Word document in the same exact location (on the hard drive), we can update that and pass it back and forth all day - why is that such a difficult task for iTunes to accomplish?
    Sorry I went on so long, but this has been building up for some time, and none of the solutions I've read about here have really been of any help, so I'm a bit frustrated and, as I said at the beginning, confused.
    iMac G5, MacBook   Mac OS X (10.4.8)  

  • How do you split the print job across multiple printers to shorten the prin

    i
    Can any one you provide some information on below questions.
    Check printing by XML template (XML Publisher).
    1. When printing checks, how do you print the checks from one printer tray and the overflow remittance pages from another printer tray?
    2. When printing a large batch of checks using XML and PDF output, how do you split the print job across multiple printers to shorten the print time?
    I appreciate if you could give some information on above 2 questions.
    Regards,
    Ramarao.

    Probably sould just do them individually.
    How to get all the iWork apps, iPhoto, and iMovie for free on an eligible iPhone or iPad
    http://www.imore.com/how-get-all-iwork-apps-iphoto-and-imovie-free-eligible-ipho ne-or-ipad
    About Free Apple Apps for iOS 7 compatible devices
    http://support.apple.com/kb/HT5913
     Cheers, Tom

  • APO gATP vs R/3 ATP - To check sales order ATP across multiple plants

    Hi There,
    I am trying to evaluate gATP functionality for SD sales orders.
    The primary requirement is to have sales order ATP checking take place across multiple plants.
    E.G.
    Sales order line is entered for qty 100
    60 is available in plant A, 40 is available in plant B
    System checks both plants and creates 2 lines - one for delivery from plant A and one for delivery from plant B
    (we are currently heading down the road of writing ABAP to do this 'multi-plant' check in R/3 but the more complex the requirements get the more interested I am in understanding more about APO/gATP)
    I would like to understand the benefit of implementing APO / gATP as opposed to using standard R/3 ATP and perhaps writing custom ABAP code to search for inventory across multiple plants.
    I would appreciate any insight regarding what is required to setp gATP to perform such checking and any other feedback regarding this issue - especially if you have had to implement something similar at your company.
    I have looked here but not much clear help:
    http://help.sap.com/saphelp_scm50/helpdata/en/26/c2d63b18bc7e7fe10000000a114084/frameset.htm
    Thanks,
    Niall

    Hi Niall
    you are probably looking at RBATP (Rule based ATP). Look at transaction /sapapo/rba04 in APO where you develop your own location and product substitution rules. Going down an ABAP road in R/3 may work short-term but not long-term as the requirements may get more complex.
    Regards
    Srinivas

Maybe you are looking for

  • Need to build a report similar to t-code  MCTA  but with some modifications

    HI ABAPers this query is as assignment for me (i am undergoing abap training) there is build in transaction in sap (MCTA) for SIS: CUSTOMER ANALYSIS SELECTION. THE DETIALS OF THIS TRANCTION ARE AS FOLLOWS. T-CODE:- MCTA Pacakage:- MCV Transaction tex

  • Crashes when changing editing data model

    Reports 6i crashes (My windows (Unix) disappears) often when I am changing the data model (i.e removing and adding columns). I did figure out one thing and that is you when you delete a column that has a data link without removing the data link first

  • I want to change back from pages 5 to the last version

    But I don't have an iqorks folder in my applications folder, help please?

  • Workflow approval from mobile in ECC5

    Hi All   We are already having workflow approval in R/3 where it happening from SAP inbox now my client want to migrate to mobile phone. Its it possible from ECC5 we dont have portal. How to implement it. Do we need to install any 3rd party like syba

  • How to enter licence key in trail

    I downloaded Photoshop CS6 Extended and used in for a few weeks, then purchased it.  Do I need to go through the download and installation nightmare AGAIN or can I somehow deavtivate this trial then  just enter the key into the trial.  If so how?  th