How to realize component's event notify?

Now, I created a component form JPane call MyPane, in addition a write a method for it. At last, MyPane implement MouseEvent to call it.
e.g: public void MyFun() { ... }
MyPane be used in an application(MyApp), now I want to realize when user click on MyPane, how can notify MyApp MyPane carry out a method MyFun()?
It's like to message map.

in your mouse listener for the pane, have it call MyFun(), that assumes you can make MyFun() visible to the mouse handler.

Similar Messages

  • How to override component default events

    How to override the scroll panel default click event to custom event.

    Events bubble by default... It sounds like you want to look at the Event class' stopImmediatePropagation method.

  • How to realize the other three events triggered by a sequence of events occurs?

    How to realize the other three events triggered by a sequence of events that occurs between Labview, and the time interval between three events for the 50ms?
    1110340053

    Are you another student who feels the need to post their "student ID" number as a part of the message?  There is really no need to do that, it is meaningless to us.
    You should ask your instructor to answer your questions rather than allowing them to turn the whole class of students loose on the forums usually asking the same identical question.
    At least in your case, the question is different from most we've seen.  Unfortunately, you haven't asked a clear enough question for us to understand what you are talking about.
    What "events" are you talking about?  Post a VI that demonstrates the code that you have written so far.

  • How can i delete an event on ical without notifying

    Hello
    how can i delete an event on ical without notifying. All I want to do is delete the event and not notify anyone.
    Thanks

    I was just experiencing this problem on Mountain Lion. The calendar I wanted to delete was on iCloud. So, I logged into iCloud from a web browser, and selected Calendar. On the current incarnation of iCloud Calendar the calendars are listed on the left. I selected the "Edit" link at the top of that list and chose delete. It indicated that the items would be deleted, but there was nothing about notifications. Then, when I went back to iCal on my Mac, I selected the calendar to be deleted, right clicked, and slected refresh...
    ... gone.
    It probably would have disappeared on it's own eventually. I'd be curious to see if theis works for others, so please confirm.
    Good luck.

  • How to listen a key event without having any window component

    Hi all,
    I would like to know how can I listen key events from an application that doesn't use windows
    Thanks

    yoiu can make a Thread run inside your application. This will listen for inputs in the command line. For examplethis is part of a chat server (on the console) with let the server manager to enter messages or commands.
    The message or command entered on the console by the user is catched and processed as a String. The string is passed to the processConsole() method, you must define yourself.
    Th Thread is never stopped, so the user may enter any message at any time
    The core of you application should also be a Thread for better performance, but maybe it will also work without. Jst try and provide needed importstatements.
    Runnable runInput = new Runnable() {
            public void run() {
              while(true) {
                try {
                  byte buffer[] = new byte[255];
                  System.out.print(prompt);
                  System.in.read(buffer);//, 0, 255);
                  String inputString = new String(buffer, "Default");
                  processConsole(inputString);
                catch(NullPointerException npe) {
                  System.out.println("Syntax error");
                catch(Exception e) {e.printStackTrace(); }
          Thread inputThread = new Thread(runInput);
          inputThread.start();

  • How can I get the events from a java program?

    I want to make a monitor to watch a java program.How can I get the events from the GUI of this program some as mouse cliking, keyinput. So I can watch these in my monitor.
    Thanks

    Hi,
    To put a monitor to the events occuring in the GHUI u need to register required components with the appropriate EventListeners.
    Liek if u want to get notified when a mouse is clicked, then u need to add The MouseListener to the component which u want to be monitored.
    Say
    myFrame which is the JFrame object which shuld be monitored for the events.
    Then in ur program u have to add following code
    myFrame.addMouseListener( someObectReference );
    Here the someObjectReference should be an instance to a concrete class ..i.e. U write a class like the following
    public class MyMouseListener implements MouseListener {
    // override the followig methods
    public void mouseClicked(MouseEvent me){ sop("MOUSE CLICKED ON THE FRAME");}
    public void mousePressed(MouseEvent me){}
    public void mouseReleased(MouseEvent me){}
    If u dont want to use another class for listening to the events. Then u can make teh current class monitor the events. To do so ur class should implement the appropriate listener and should override the required methods.
    and u should say myFrame.addMouseListenet( this );
    thats it

  • How do I set an event to repeat every 4 weeks on iCal on my ipad 2?

    How do I schedule an event to repeat every 4 weeks in iCal on my iPad 2?

    Wow, I'm so used to setting up most repeated events on my mac in BusyCal that I didn't realize how limiting iPad/iCal was. I'll be curious to see if anyone has a trick to accomplish this. Thanks for posting this "issue".

  • HT4528 how do I create an event in my calander that repeats the second thursday of every month

    how do i create an event in my calander that repeats the second thursday of every month

    This should get you started down the pathJust replace User data with your cluster and do the data integrity check in the value change event use a simple one button dialog to notify the user which values are out of compliance and disable and grey the OK button untill all conditions are met.
    Jeff
    Attachments:
    Prompt(Date).vi ‏50 KB

  • How a custom component is called when we install a custom component in UCM.

    How a custom component is called when we install a custom component in UCM.
    On what event the component services will be activated and called.
    Suppose i create a Custom service name MULTIPLECHECKIN then this service will be called on what event and where it will be defined to call.

    Saurabh,
    the code is packed in the component (see component\Security Filter\java\Security Filter\ModifyAttributesFilter.java - the first Security Filter is the component name, the other Security Filter is the Java package name).
    What is important:
    - your class must implement the FilterImplementor interface (you will need UCM standard classes - server.zip in your classpath) and its doFilter method
    How the filter is executed?
    - actually, in this case you don't need any new service - you can use the standard 'hook', which is provided by standard checkin services
    - in Component Wizard create a new component, add your compiled class to it (make sure you follow the rules not to end up in classpath issues)
    - in Component Wizard click the 'Java Code' tab. Here you can add a Custom filter called validateCheckinData, which is executed by standard checkin services. If you parametrize the filter to call your class created above, you are done.
    'Working with Content Components' manual (e.g. here: http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/developer/using_components_10en.pdf) can give you a basic picture. A better resource is Bex Huff's book - I would recommend you to get it, because it has a step-by-step HelloWorld example which can guide you through Component Wizard. I could also send you my own component (send me an email at [email protected]) which implements a filter for user quotas, so you just need to "replace classes".
    As for the other half of your task, searching for the file in the database server will work only if you use database as your storage (ie. install and configure File Store Provider component accordingly). Of course, you could do a search for file in this case - just consider that you will be comparing two BLOBs rather than two relatively short check-sums (most likely strings or arrays of bytes). Besides, it will not work if you use filesystem as your storage.
    Jiri

  • How to call a function/event after a Remote Object's data is loaded?

    I'm making a call to a remote object that is loading a good
    amount of data. I've set up a "please wait" label that is supposed
    to display while the data is being loaded and then clear the label
    when the data finishes loading.
    At the moment I've got it set up like so...
    label = 'Loading data, please wait..."
    remoteObj.read.send();
    label = ''
    The problem with this is that the 'please wait' label doesn't
    even display because the actual call to the remote object I'm
    making finishes so quickly even though the data load does not. So
    what I need is possibly an IF statement to check if the data has
    finished loading. If it hasn't finished loading, the label stays in
    the "please wait" status, or if the data does finish loading, then
    the label clears out.
    What would be ideal is...
    remoteObj.read.send(); // gets the data
    if(data is loaded){
    label = '';
    }else{
    label = 'Please wait'
    I just don't know how to form the statement for the data
    loading in the IF statement.

    You are seeing the difference between data loading and UI
    rendereing.
    Reasonable amounts of data load very fast, expecially with
    RemoteObject. Bur rendering the UI is almost always the bottleneck,
    event with AS3 FP8+, which is about 30 percent faster than AS2!
    I have not found a perfect solution for this myself, but i
    think you will want to look into the component data events, to find
    one that fires after the component is actually rendered.
    Tracy

  • How to realize the screen-word identification?

    hi ,i am a chinese ,now i am doing a practical software which is named the base-on-pc electron dictionary ,and there is a necessary function which demands that when you move your mouse onto a word ,then ,at once ,there will come out a frame which shows the meaning of the world ,but i don't know how to realize the screen-world identification?
    is there anyone can help me ? god bless you !

    if you are using swing:
    - get mouse pointer screen location
    - get frame/window components and iterate recursively until you find the component
    - depending of the component you must to use some of its method to search de word, p.e
    - then you can obtain the definition and show a tooltip
    but think:
    - this solution is bounded to your app
    - it's no generic, you must define the "searchable" components and code it
    There area another more generic solution(and difficult, and interesting), if i remember right, the app babylon dictionary works capturing the area of the screen at the mouse pointer and then appling OCR technics to recognoice the word... it was good!

  • View raises Component Controller Event

    Hello,
    I defined an even onUpdate in the component controller. A custom controller subscribed to this event. For that I have a method handleOnUpdate in the custom controller. Now I want to raise this event in a view after pressing a submit button of this view.
    How can I raise the event?
    So data flow would be:
    1. Button pressed in view
    2. Raise event in component controller
    3. Handle raised event in custom controller
    Regards
    Rene

    Hi Rene,
    Your scenario is like:
    <b>View: OnSubmit -> Component Controller: OnUpdate -> Custom Controller:</b> <b>handleOnUpdate.</b>
    For this, in the code for <u>OnSubmit</u> in your view, you need to add code as
    wdThis.wdGet<ComponentControllerName>().onUpdate();
    and in the <u>OnUpdate</u> method in Component Controller:
    wdThis.wdGet<CustomContControllerName>().handleOnUpdate();
    Also, you need to <b>add the Component Controller to your View</b>, using Properties Tab
    <b>and Custom Controller in Component Controller</b>, using its properties tab.
    Hope it helps.
    Regards,
    Alka.

  • Send to tcl script Q931 event NOTIFY

    Hi
    Prompt please how to receive event NOTIFY in a TCL script?
    Thanks
    Jan 18 01:14:05.277: ISDN Se3/0:15 Q931: RX <- NOTIFY pd = 8 callref = 0xACBC
    Notification Ind i = 0xF9
    Display i = 'REMOTE HOLD '
    Jan 18 01:14:09.671: ISDN Se3/0:15 Q931: RX <- NOTIFY pd = 8 callref = 0xACBC
    Notification Ind i = 0xFA
    Display i = 'REMOTE RETRIEVE '

    Would an email be ok? There's an example script on how to send an email when saving the config. You would just have to tweak it to run every 30 days instead.
    Sent from Cisco Technical Support Android App

  • How do I restore past events to my iPad calendar?

    I use the calendar on my IPad a lot, but when I went to look at an event from 6 weeks ago, I realized all my events except the recurring events from more than 30 days ago were missing.  I found online that I should change my "sync" under settings->calendars to something more than 'the last month', which I did.  I changed it first to 'all events', waited about 30 minutes, and when my past events still didn't show up I tried again with '6 months'.  Still none of my past events are showing.  I don't use calendars on any other devices (Mac or phone).  Any other suggestions on how to restore my events?
    Thanks!

    Are all your past events present when you sign in to iCloud.com  with a web browser on your computer?
    If so, try this:
    Settings > Mail, Contacts, Calendars > In the Calendars section tap Sync > All Events
    Then
    Settings > iCloud > toggle off Calendars, delete from phone. Wait for it to finish then turn it back on

  • In iCal how do i set an event every 3 months

    In iCal how do i set an event every 3 months.

    Sk8trdad,
    I presume that your question relates to the Calendar App on the iPad.
    You have to use the "repeat>Custom" setting on the Desktop version of iCal.

Maybe you are looking for