Events in my objects!!!

how can I make so that my objects define and do activate events (although they are not graphic objects)?
I have thought of creating a thread of events dispatch. But there is not a form easier of making it?
May be inner classes. But what does it happen to the objects sources that multiple objects listeners have?
PD: Forgive my English. I am learning...
Salu2

I have something this (please, some patience :-) ):
//Example: handle event (the event is Beep)
interface AlarmListener{
void Beep(String hour); //declare a event handler
//The class that "raise" an event Beep
class Clock{
AlarmListener theAlarmListener; //Referecne to an listener object
//Register an listener object
public addAlarmListener(AlarmListener theAlarmListener){
this.theAlarmListener = theAlarmListener;
private ringAlarm(){
theAlarmListener.Beep("10:00 P.M."); //Raise Beep event
class Guy implements AlarmListener{
public Guy(){
Clock clock = new Clock();
clock.addAlarmListener(this);
//Handle Beep event
void Beep(String hour){
System.out.println("Ohhh, its time of wake up!!!");
//End
But, in this model my source object have only an listener object.
This can be improved by a array, like this:
class Clock{
AlarmListener[] theAlarmListener = new AlarmListener[10];
private int i = 0;
//Register an listener object
public addAlarmListener(AlarmListener theAlarmListener){
this.theAlarmListener[i++] = theAlarmListener;
//More code...
making to a side the limitation of size of an array (although this can be managed somehow if it is necessary), the problem begining to be more and more complex... i.e., it is necessary to create a method for unregister a listener...
And, what about with multi-threads programs??? The addAlarmListener method should be synchronized or something??
It should have an easier way!
PD: I think that I have used the Delegate pattern in conjunction with some other pattern.
PD: Forget my English. It is terrible
Saludos

Similar Messages

  • Events in Abap Objects

    What are events. how to create and handle this events.

    HI,
    By triggering an event, an object or a class announces a change of state, or that a certain state has been achieved.Events link objects or classes more loosely than direct method calls do. Method calls establish precisely when and in which statement sequence the method is called. However, with events, the reaction of the object to the event is determined by the triggering of the event itself.
    Events are most often used in GUI implementations.Other external object models, such as COM, ActiveX Controls etc, also provide events.
    At the moment of implementation, a class defines its instance events (using the statement EVENTS) and static events (using the statement CLASS-EVENTS)
    Classes or their instances that receive a message when an event is triggered at runtime and want to react to this event define event handler methods.
    Statement : (CLASS-)METHODS  | FOR ALL INSTANCES.
    Every object that has defined events has an internal table: the handler table. All objects that have registered for events are entered in this table together with their event handler methods.Objects that have registered themselves for an event that is still “live” also remain “live”. The methods of these objects are called when the event is triggered, even if they can no longer be reached using main memory references.
    If several objects have registered themselves for an event, then the sequence in which the event handler methods are called is not defined, that is, there is no guaranteed algorithm for the sequence in which the event handler methods are called.
    If a new event handler is registered in an event handler method for an event that has just been triggered, then this event handler is added to the end of the sequence and is then also executed when its turn comes.
    If an existing event handler is deregistered in an event handler method, then this handler is deleted from the event handler method sequence.
    Events are also subject to the visibility concept and can therefore be either public, protected or private. Visibility establishes authorization for event handling :
         all users
         only users within that class or its subclasses
         only users in that class.
    Event handler methods also have visibility characteristics. Event handler methods, however, can only have the same visibility or more restricted visibility than the events they refer to.
    The visibility of event handler methods establishes authorization for SET-HANDLER statements: SET HANDLER statements can be made
         anywhere
         in that class and its subclasses
         only in that class
    Regards,
    Balaji Reddy G
    **Rewards if answers are useful

  • Event Bubbling Custom Object not inheriting from control

    One of the new things flash flex and xaml have are ways which
    the event easily bubbles up to a parent that knows how to handle
    the event. Similar to exceptions travel up until someone catches
    it.
    My goal is to use the frameworks event system on custom
    objects. My custom objects are:
    ApplicationConfiguration
    through composition contains:
    SecurityCollection which contains many or no SecurityElements
    and
    FileSystemCollection.cs which contains many or no
    FileSystemElement objects
    ect ect basically defining the following xml file with custom
    objects.
    [code]
    <ApplicationConfiguration>
    <communication>
    <hardwareinterface type="Ethernet">
    <ethernet localipaddress="192.168.1.2" localport="5555"
    remoteipaddress="192.168.1.1" remoteport="5555" />
    <serial baudrate="115200" port="COM1" />
    </hardwareinterface>
    <timing type="InternalClock" />
    </communication>
    <filesystem>
    <add id="location.scriptfiles" value="c:\\" />
    <add id="location.logfiles" value="c:\\" />
    <add id="location.configurationfiles" value="c:\\" />
    </filesystem>
    <security>
    <add id="name1" value="secret1" />
    <add id="name2" value="secret2" />
    </security>
    <logging EnableLogging="true"
    LogApplicationExceptions="true" LogInvalidMessages="true"
    CreateTranscript="true" />
    </ApplicationConfiguration>
    [/code]
    basically these custom objects abstract the xml details of
    accessing attributes, writing content out of the higher application
    layers.
    These custom objects hold the application configuration which
    contains the users options. The gui application uses these
    parameters across various windows forms, modal dialog boxes ect.
    The gui has a modal dialog that allows the user to modify these
    parameters during runtime.
    basically i manage: load, store, new, edit, delete of these
    configuration files using my custom objects.
    Where would event propagation help in custom objects like
    described above?
    ConfigurationSingleton.getInstance().ApplicationConfiguration.CommunicationElement.Hardwar eInterfaceElement.EthernetElement.RemoteIPAddress
    =
    System.Net.IPAddress.Parse(this.textBoxRemoteEthernetIpAddress.Text);
    The EthernetElement should propagate a changed event up to
    the parent ApplicationConfiguration which would persist this to the
    registry, db, file or whatever backend.
    currently this logic is maintained else where. I serialize
    the root node which compositely serializing the nested nodes and i
    check of the serialization is different from that in the backend
    … This tells me if the dom was modified. It works but i would
    like an event driven system.
    how should i implement bubbling using custom objects?
    3 implementation ideas:
    1) A simple way is to implement a singleton event manager:
    EventManager.RegisterRoutedEvent
    http://msdn2.microsoft.com/en-us/library/ms742806.aspx
    I like this idea but how can you tell which object is nested
    in who… this way the event can be stopped and discontinue
    propagation?
    2) If i use binders as discussed in Apress’s book:
    Event-Based
    Programming Taking Events to the Limit
    basically a binder connects the events between seperate
    objects together… although it would work for my app, I would
    like a more generalized approach so i can reuse the event system on
    future project.
    3) how does flash flex handle this..
    objectproxy.as?
    http://www.gamejd.com/resource/apollo_alpha1_docs/apiReference/combined/mx/utils/ObjectPro xy.html#getComplexProperty()
    >Provides a place for subclasses to override how a complex
    property that needs to be either proxied or daisy chained for event
    bubbling is managed.
    how does these systems all work....? Reflection ?
    this way i can simulate this on my own custom classes.
    Thanks!

    I have a strong sensation that the OSMF project is quite dead.
    no new submits since 2010, the contact form on the offical OSMF
    project website http://www.opensourcemediaframework.com/
    returns a PHP error.
    and many unanswered questions about OSMF in this forum.
    i think it would be wise to not use OSMF if possible, although
    I'm also stuck with it since we are utilizing HDS/PHDS
    protocols which are utilized in the framework.
    otherwise its quite a head-ache.
    I'm unable to get to a video element coming from a proxied element
    that is being produced via an HDS connection.
    and haven't found any solution that works.

  • Why and how to use events in abap objects

    Dear all,
      Please explain me why and how to use events in abap objects with real time example
    regards
    pankaj giri

    Hi Pankaj,
    I will try to explain why to use events... How to use is a different topic.. which others have already answered...
    This is same from your prev. post...
    Events :
    Technically speaking :
    " Events are notifications an object receives from, or transmits to, other objects or applications. Events allow objects to perform actions whenever a specific occurrence takes place. Microsoft Windows is an event-driven operating system, events can come from other objects, applications, or user input such as mouse clicks or key presses. "
    Lets say you have an ALV - An editable one ...
    Lats say - Once you press some button  you want some kind of validation to be done.
    How to do this ?
    Raise an Event - Which is handled by a method and write the validation code.
    Now you might argue, that I can do it in this way : Capture the function code - and call the validate method.
    Yes, in this case it can be done.. But lets say .. you change a field in the ALV and you want the validation to be done as soon as he is done with typing.
    Where is the function code here ? No function code... But there is an event here - The data changed event.
    So you can raise a data changed event that can be handled and will do the validation.
    It is not user friendly that you ask the user to press a button (to get the function code) for validation each time he enters a data.
    The events can be raised by a system, or by a program also. So in this case the data changed event is raised by a system that you can handle.
    Also, Lets say on a particular action you want some code to trigger. (You can take the same example of validation code). In this case the code to trigger is in a separate class. The object of which is not available here at this moment. (This case happens very frequently).
    Advantage with events : Event handlers can be in a separate class also.
    e.g : In the middle of some business logic .. you encounter a error. You want to send this information to the UI (to user - in form of a pop up) and then continue with some processing.
    In many cases - A direct method call to trigger the pop up is not done. Because (in ideal cases) the engine must not interact with UI directly - Because the UI could be some other application - like a windows UI but the error comes from some SAP program.
    So - A event is raised from the engine that is handled in the UI and a pop up is triggered.
    Here -- I would have different classes (lets say for different Operating Systems). And all these classes must register to the event ERROR raised in application.
    And these different classes for different Operation systems will have different code to raise a pop-up.
    Now you can imagine : If you coded a pop-up for Windows (in your application logic) .. it will not work for Mac or Linux. But of you raise a event.. that is handled separately by a different UI classes for Win, Linux or Mac  they will catch this event and process accordingly.
    May be I complicated this explanation .... but I couldn't think of a simpler and concrete example.
    Cheers.
    Varun.

  • What is the equivalent for 'On Change of' Event in ABAP OBJECTS?

    What is the equivalent for 'On Change of' Event in ABAP OBJECTS?  and how to use it in LOOP control?

    hi,
    There is no such Equivalent in OO ABAP.
    You have to Raise your own Event within tha class checking the value of the field whose value is changing.
    Regards
    Sumit Agarwal

  • BPM -- Unable to deliver event 'RECEIVED' of object

    Hi XI Experts,
    I have completed a scenario depicting 'BpmPatternCollectMessage', where in IP is going to run with a infinite loop and when a Stop message is sent, IP should stop and tranform the messages collected to send it to target.
    I have sent start messages and noticed that it is running in a infinite loop. And when I have sent stop message, it is throwing a warning "Unable to deliver event 'RECEIVED' of object" and is not stoping the IP.
    FYI -- I have designed IP with a block of necessary branches. Block has two branches, one to receive a collect message in infinite loop and other to receive a stop message.
    Please help me in resolving this issue.
    Regards,
    Suraj Kumar

    Hi,
    please have a look at this thread:
    http->XI->RFC BPM Error
    Regards
    Patrick

  • Event on ClassFactory Object....inside a DataGridColumn

    HI,
    Follwing code used to create a textbox inside a
    datagridcolumn.
    This code working fine ...
    var dgc:DataGridColumn=new DataGridColumn();
    var factory:ClassFactory = new ClassFactory(TextInput);
    factory.properties = {text: "TextInput"};
    dgc.itemRenderer=factory;
    Any idea how to add an event to that TextInput???
    I wanna fire an onChange event on TextInput.. how to do it???
    Thanx in Advance

    If i understood right, you want to do some action in your
    main application file when the TextInput (item renderer) throws
    some event.
    In order to achieve this. In your main application, add a
    listener to the application object for the event thrown by your
    custom component. In order to find out which object instance of the
    custom component invoked the event, send some object with data to
    identify the object instance in the event.
    Hope this helps.

  • Event for ABAP Objects

    Dear All,
    Would you mind tell me the concept of the event in the ABAP objects.
    Regards,
    Luke

    hI
    Triggering and Handling Events
    In ABAP Objects, triggering and handling an event means that certain methods act as triggers and trigger events, to which other methods - the handlers - react. This means that the handler methods are executed when the event occurs.
    This section contains explains how to work with events in ABAP Objects.  For precise details of the relevant ABAP statements, refer to the corresponding keyword documentation in the ABAP Editor.
    Triggering Events
    To trigger an event, a class must
    ·        Declare the event in its declaration part
    ·        Trigger the event in one of its methods
    Declaring Events
    You declare events in the declaration part of a class or in an interface. To declare instance events, use the following statement:
    EVENTS ) TYPE type ..
    To declare static events, use the following statement:
    CLASS-EVENTS ... ...
    It links a list of handler methods with corresponding trigger methods.  There are four different types of event.
    It can be
    ·        An instance event declared in a class
    ·        An instance event declared in an interface
    ·        A static event declared in a class
    ·        A static event declared in an interface
    The syntax and effect of the SET HANDLER depends on which of the four cases listed above applies. 
    For an instance event, you must use the FOR addition to specify the instance for which you want to register the handler.  You can either specify a single instance as the trigger, using a reference variable ...
    The registration applies automatically to the whole class, or to all of the classes that implement the interface containing the static event.  In the case of interfaces, the registration also applies to classes that are not loaded until after the handler has been registered.
    Timing of Event Handling
    After the RAISE EVENT statement, all registered handler methods are executed before the next statement is processed (synchronous event handling).  If a handler method itself triggers events, its handler methods are executed before the original handler method continues. To avoid the possibility of endless recursion, events may currently only be nested 64 deep.
    Handler methods are executed in the order in which they were registered.  Since event handlers are registered dynamically, you should not assume that they will be processed in a particular order. Instead, you should program as though all event handlers will be executed simultaneously.
    http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm

  • Event handling in objects

    hello friends,
                        i want to use the event RAISE_LINK_CLICK for single click.
    but i dont want 2 use this event for alv table.
                       i am displaying vendor name in my top of page,if the user click of the vendor name a new window should pop-up displaying the vendor details.
            my code for top of page is
                      DATA: lr_grid TYPE REF TO cl_salv_form_layout_grid,
              lr_grid_1 TYPE REF TO cl_salv_form_layout_grid,
              lr_flow TYPE REF TO cl_salv_form_layout_flow,
              lr_label TYPE REF TO cl_salv_form_label,
              lr_text TYPE REF TO cl_salv_form_text,
              l_text TYPE string.
        CREATE OBJECT lr_grid.
        lr_grid_1 = lr_grid->create_grid( row = 1 column = 1 ).
        lr_text = lr_grid_1->create_text( row = 1 column = 1 colspan = 2 text = <b>vendor_name</b> ).
        lr_grid_1 = lr_grid->create_grid( row = 2 column = 1 ).
        lr_flow = lr_grid_1->create_flow( row = 2 column = 1 ).
        lr_text = lr_flow->create_text( text = 'Reconcillation Statement'(t02) tooltip = 'Reconcillation Statement'(t02) ).
        alv->set_top_of_list( lr_grid ).
            do uc the VENDOR NAME in bold,wen the user clicks on it the pop should appear.
            so how to use the event RAISE_LINK_CLICK for this purpose,or is there another way through

    hello friends,
                        i want to use the event RAISE_LINK_CLICK for single click.
    but i dont want 2 use this event for alv table.
                       i am displaying vendor name in my top of page,if the user click of the vendor name a new window should pop-up displaying the vendor details.
            my code for top of page is
                      DATA: lr_grid TYPE REF TO cl_salv_form_layout_grid,
              lr_grid_1 TYPE REF TO cl_salv_form_layout_grid,
              lr_flow TYPE REF TO cl_salv_form_layout_flow,
              lr_label TYPE REF TO cl_salv_form_label,
              lr_text TYPE REF TO cl_salv_form_text,
              l_text TYPE string.
        CREATE OBJECT lr_grid.
        lr_grid_1 = lr_grid->create_grid( row = 1 column = 1 ).
        lr_text = lr_grid_1->create_text( row = 1 column = 1 colspan = 2 text = <b>vendor_name</b> ).
        lr_grid_1 = lr_grid->create_grid( row = 2 column = 1 ).
        lr_flow = lr_grid_1->create_flow( row = 2 column = 1 ).
        lr_text = lr_flow->create_text( text = 'Reconcillation Statement'(t02) tooltip = 'Reconcillation Statement'(t02) ).
        alv->set_top_of_list( lr_grid ).
            do uc the VENDOR NAME in bold,wen the user clicks on it the pop should appear.
            so how to use the event RAISE_LINK_CLICK for this purpose,or is there another way through

  • Events in USER objects type not getting triggered in PFCG

    Hi,
    We need to send some notifications to the concern person at the time of assiging roles to the user . There is an object type USER and has events like created,cloned, deleted, roles_changed. But these events not getting triggered.
    I need to trigger the workflow. How do we activate the events as the entry doesnot exits in SWE2 tooo . Is ther any other way?

    HI munish
    If the entry is not in swe2 Put the entry for the business object USER and use the receiver type as your workflow number.
    Regards
    vijay

  • Events in Service Objects

    Hi,
    Is it possible to have a service object checking permanently for events
    posted by other service objects? I have not been able to start this type of
    object.
    Thanks,
    Guillermo Turk
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    I have something this (please, some patience :-) ):
    //Example: handle event (the event is Beep)
    interface AlarmListener{
    void Beep(String hour); //declare a event handler
    //The class that "raise" an event Beep
    class Clock{
    AlarmListener theAlarmListener; //Referecne to an listener object
    //Register an listener object
    public addAlarmListener(AlarmListener theAlarmListener){
    this.theAlarmListener = theAlarmListener;
    private ringAlarm(){
    theAlarmListener.Beep("10:00 P.M."); //Raise Beep event
    class Guy implements AlarmListener{
    public Guy(){
    Clock clock = new Clock();
    clock.addAlarmListener(this);
    //Handle Beep event
    void Beep(String hour){
    System.out.println("Ohhh, its time of wake up!!!");
    //End
    But, in this model my source object have only an listener object.
    This can be improved by a array, like this:
    class Clock{
    AlarmListener[] theAlarmListener = new AlarmListener[10];
    private int i = 0;
    //Register an listener object
    public addAlarmListener(AlarmListener theAlarmListener){
    this.theAlarmListener[i++] = theAlarmListener;
    //More code...
    making to a side the limitation of size of an array (although this can be managed somehow if it is necessary), the problem begining to be more and more complex... i.e., it is necessary to create a method for unregister a listener...
    And, what about with multi-threads programs??? The addAlarmListener method should be synchronized or something??
    It should have an easier way!
    PD: I think that I have used the Delegate pattern in conjunction with some other pattern.
    PD: Forget my English. It is terrible
    Saludos

  • Listen for an events for Swing objects in a separate class?

    Hi all, sorry if this is in the wrong section of the forum but since this is a problem I am having with a Swing based project I thought i'd come here for help. Essentially i have nested panels in separate classes for the sake of clarity and to follow the ideas of OO based development. I have JPanels that have buttons and other components that will trigger events. I wish for these events to effect other panels, in the Hierachy of my program:
    MainFrame(MainPanel(LeftPanel, RightPanel, CanvasPanel))
    Sorry I couldnt indent to show the hierarchy. Here LeftPanel, RightPanel and CanvasPanel are objects that are created in the MainPanel. For example i want an event to trigger a method in another class e.g. LeftPanel has a button that will call a method in CanvasPanel. I have tried creating an EventListner in the MainPanel that would determine the source and then send off a method to the relevant class, but the only listeners that respond are the ones relevant to the components of class. Can I have events that will be listened to over the complete scope of the program? or is there another way to have a component that can call a method in the class that as an object, it has been created in.
    Just as an example LeftPanel has a component to select the paint tool (its a simple drawing program) that will change a color attribute in the CanvasPanel object. Of course I realize i could have one massive Class with everything declared in it, but I'd rather learn if it is possible to do it this way!
    Thanks in advance for any help you can offer
    Lawrence
    Edited by: insertjokehere on Apr 15, 2008 12:24 PM

    Thanks for the response, ive added ActionListneres in the class where the component is, and in an external class. The Listeners work inside the class, but not in the external class
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    public class LeftPanel extends JPanel implements ActionListener {  
        /* Constructing JButtons, null until usage of the constructor */
        JButton pencilBut;
        JButton eraserBut;
        JButton textBut;
        JButton copyBut;
        JButton ssincBut;
        JButton ssdecBut;
        ActionListener a = new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.out.print("\nNot supported yet.");
        /* The Top Panel contains the title of program */
        public LeftPanel(Dimension d){
            /* Sets up the layout for the Panel */
            BoxLayout blo = new BoxLayout(this,BoxLayout.Y_AXIS);
            this.setLayout(blo);
            /* Sets Up the Appearance of the Panel */
            this.setMinimumSize(d);
            this.setBackground(Color.RED);
            this.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
            /* Pencil Tool */
            pencilBut = new JButton("Pencil");
            pencilBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            pencilBut.setActionCommand("pencil");
            pencilBut.addActionListener(a);
            this.add(pencilBut);
            /* Eraser Tool */
            eraserBut = new JButton("Eraser");
            eraserBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            eraserBut.addActionListener(a);
            this.add(eraserBut);
            /* Text Tool */
            textBut = new JButton("Text");
            textBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            textBut.addActionListener(a);
            this.add(textBut);
            /* Copy Previous Page */
            copyBut = new JButton("Copy Page");
            copyBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            copyBut.addActionListener(a);
            this.add(copyBut);
            /* Stroke Size Increase */
            ssincBut = new JButton("Inc");
            ssincBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            ssincBut.addActionListener(a);
            this.add(ssincBut);
            /* Stroke Size Decrease */
            ssdecBut = new JButton("Dec");
            ssdecBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            ssdecBut.addActionListener(a);
            this.add(ssdecBut);
            System.out.print("\nLeftPanel Completed");
        public void actionPerformed(ActionEvent e) {
            System.out.print("\nAction Performed");
        }But this is not picked up in my external class here
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    public class MainPanel extends JPanel implements ActionListener {
        /* Creates a new the main JPanel that is used in the FlipBookFrame to contain all of the elements */
        public MainPanel(){
            /* TopPanel constraints*/
            tpcs.gridx = 1;
            tpcs.gridy = 0;
            tpcs.gridwidth = 1;
            tpcs.gridheight = 1;
            tpcs.fill = GridBagConstraints.BOTH;
            tpcs.weightx = 0.0;
            tpcs.weighty = 1.0;
            /* LeftPanel Constraints*/
            lpcs.gridx = 0;
            lpcs.gridy = 0;
            lpcs.gridwidth = 1;
            lpcs.gridheight = 3;
            lpcs.fill = GridBagConstraints.BOTH;
            lpcs.weightx = 1.0;
            lpcs.weighty = 1.0;
            /* CentrePanel Constraints*/
            cpcs.gridx = 1;
            cpcs.gridy = 1;
            cpcs.gridwidth = 1;
            cpcs.gridheight = 1;
            cpcs.fill = GridBagConstraints.NONE;
            cpcs.weightx = 0.0;
            cpcs.weighty = 0.0;
            /* RightPanel Constraints*/
            rpcs.gridx = 2;
            rpcs.gridy = 0;
            rpcs.gridwidth = 1;
            rpcs.gridheight = 3;
            rpcs.fill = GridBagConstraints.BOTH;
            rpcs.weightx = 1.0;
            rpcs.weighty = 1.0;
            /* BottomPanel Constraints*/
            bpcs.gridx = 1;
            bpcs.gridy = 2;
            bpcs.gridwidth = 1;
            bpcs.gridheight = 1;
            bpcs.fill = GridBagConstraints.BOTH;
            bpcs.weightx = 0.0;
            bpcs.weighty = 1.0;   
            this.setLayout(gblo);   //Sets the Layout of the panel to a GridBagLayout
            this.add(tp, tpcs); //Adds the TopPanel to the MainPanel using the TopPanel layout
            this.add(lp, lpcs); //Adds the LeftPanel to the MainPanel using the LeftPanel layout
            this.add(cp, cpcs); //Adds the CanvasPanel to the MainPanel using the CanvasPanel layout
            this.add(rp, rpcs); //Adds the RightPanel to the MainPanel using the RightPanel layout
            this.add(bp, bpcs); //Adds the BottomPanel to the MainPanel using the BottomPanel layout
            gblo.layoutContainer(this); //Lays Out the Container
        public PanelSizes getPanelSizes(){
            return ps;
        public void actionPerformed(ActionEvent e) {
            System.out.print("\nExternal Class finds event!");
            /*String command = e.getActionCommand();
            if (command.equals("pencil")){
                System.out.print("\nYESSSSSSSSSSSSSSSSSSSSS!");
        /* Create of objects using the PanelSizes funtions for defining the */
        PanelSizes ps = new PanelSizes();   //Creates a new PanelSizes object for sizing the panel
        CanvasPanel cp = new CanvasPanel(ps.getCentrePanelDimension()); //Creates a new Canvas Panel
        TopPanel tp = new TopPanel(ps.getHorizontalPanelDimension()); //Creates the TopPanel
        BottomPanel bp = new BottomPanel(ps.getHorizontalPanelDimension()); //Creates the BottomPanel
        LeftPanel lp = new LeftPanel(ps.getVerticalPanelDimension()); //Creates the LeftPanel
        RightPanel rp = new RightPanel(ps.getVerticalPanelDimension());   //Creates the RightPanel
        /* I have chosen to create individual constraints for each panel to allow for adding of all
         components a the end of the constructor. This will use slightly more memory but gives clarity
         in the code */
        GridBagConstraints cpcs = new GridBagConstraints();
        GridBagConstraints tpcs = new GridBagConstraints();
        GridBagConstraints bpcs = new GridBagConstraints();
        GridBagConstraints lpcs = new GridBagConstraints();   
        GridBagConstraints rpcs = new GridBagConstraints();
        GridBagLayout gblo = new GridBagLayout();
    }Any help will be greatly appreciated :-)

  • Find the Wait events for an objects.

    Hi Gurus.
    I need you help to find out the wait events for a particular table and index when batch export job running from the application. I have done some work around to to find out, but i am not able to figure out the issue or what are the wait events. i am working on linux 4node rac 11gR2.
    Below are the steps i have done.
    1. find object_id for a table finding the wait events to that object_id.
    SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='ACCOUNT_DETAIL_DENORM';
    DATA_OBJECT_ID
    82646
    88518
    84184
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=82646;
    no rows selected
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=88518;
    no rows selected
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=84184;
    no rows selected
    2. find the object id for the index of that table and finding the wait events to that object_id.
    SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='XAK2ACCOUNT_DETAIL_DENORM';
    DATA_OBJECT_ID
    88655
    SID EVENT WAIT_CLASS WAIT_CLASS#
    1 rdbms ipc message Idle 6
    2 heartbeat monitor sleep Idle 6
    3 rdbms ipc message Idle 6
    4 wait for unread message on broadcast channel Idle 6
    6 SQL*Net message from client Idle 6
    7 SQL*Net message from client Idle 6
    8 SQL*Net message from client Idle 6
    9 SQL*Net message from client Idle 6
    10 SQL*Net message from client Idle 6
    11 SQL*Net message from client Idle 6
    12 SQL*Net message from client Idle 6
    13 SQL*Net message from client Idle 6
    1876 SQL*Net message from client Idle 6
    1877 VKTM Logical Idle Wait Idle 6
    1878 rdbms ipc message Idle 6
    1879 rdbms ipc message Idle 6
    1880 rdbms ipc message Idle 6
    1881 SQL*Net message from client Idle 6
    3200 SQL*Net message from client Idle 6
    3210 SQL*Net message from client Idle 6
    3212 db file sequential read User I/O 8
    3213 SQL*Net message from client Idle 6
    3214 SQL*Net message from client Idle 6
    3216 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 SQL*Net message from client Idle 6
    3757 SQL*Net message from client Idle 6
    1326 SQL*Net message from client Idle 6
    1876 Streams AQ: waiting for time management or cleanup tasks Idle 6
    1877 VKTM Logical Idle Wait Idle 6
    1878 rdbms ipc message Idle 6
    1879 rdbms ipc message Idle 6
    1880 rdbms ipc message Idle 6
    1882 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 rdbms ipc message Idle 6
    3758 SQL*Net message from client Idle 6
    3759 PX Deq: Execution Msg Idle 6
    3200 SQL*Net message from client Idle 6
    3210 SQL*Net message from client Idle 6
    3212 db file sequential read User I/O 8
    3213 SQL*Net message from client Idle 6
    3214 SQL*Net message from client Idle 6
    3216 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 SQL*Net message from client Idle 6
    3757 SQL*Net message from client Idle 6
    3786 SQL*Net message from client Idle 6
    3787 SQL*Net message from client Idle 6
    1 heartbeat monitor sleep Idle 6
    2 wait for unread message on broadcast channel Idle 6
    314 rdbms ipc message Idle 6
    315 Streams AQ: qmn coordinator idle wait Idle 6
    627 pmon timer Idle 6
    628 rdbms ipc message Idle 6
    629 Streams AQ: waiting for messages in the queue Idle 6
    940 Streams AQ: waiting for time management or cleanup tasks Idle 6
    941 VKTM Logical Idle Wait Idle 6
    942 rdbms ipc message Idle 6
    1253 rdbms ipc message Idle 6
    1254 rdbms ipc message Idle 6
    1256 Space Manager: slave idle wait Idle 6
    1566 DIAG idle wait Idle 6
    1567 rdbms ipc message Idle 6
    1568 Streams AQ: qmn slave idle wait Idle 6
    1879 rdbms ipc message Idle 6
    1880 smon timer Idle 6
    1881 rdbms ipc message Idle 6
    2192 PING Idle 6
    2193 rdbms ipc message Idle 6
    2194 rdbms ipc message Idle 6
    2505 rdbms ipc message Idle 6
    2506 rdbms ipc message Idle 6
    2818 rdbms ipc message Idle 6
    2819 rdbms ipc message Idle 6
    2821 PX Deq: reap credit Other 0
    3131 DIAG idle wait Idle 6
    3132 jobq slave wait Idle 6
    3444 rdbms ipc message Idle 6
    3445 jobq slave wait Idle 6
    3757 ges remote message Idle 6
    3758 rdbms ipc message Idle 6
    3759 VKRM Idle Idle 6
    4070 gcs remote message Idle 6
    4072 rdbms ipc message Idle 6
    4383 gcs remote message Idle 6
    4385 PX Deq: Execution Msg Idle 6
    4696 rdbms ipc message Idle 6
    4697 rdbms ipc message Idle 6
    1 rdbms ipc message Idle 6
    2 heartbeat monitor sleep Idle 6
    3 rdbms ipc message Idle 6
    4 wait for unread message on broadcast channel Idle 6
    6 SQL*Net message from client Idle 6
    From this output, what are the waits events i need to take into consideration.
    Is this the right approach to follow?
    Please let me know.
    Thanks in advance.

    user13162661 wrote:
    Hi Gurus.
    I need you help to find out the wait events for a particular table and index when batch export job running from the application. I have done some work around to to find out, but i am not able to figure out the issue or what are the wait events. i am working on linux 4node rac 11gR2.
    Below are the steps i have done.
    1. find object_id for a table finding the wait events to that object_id.
    SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='ACCOUNT_DETAIL_DENORM';
    DATA_OBJECT_ID
    82646
    88518
    84184
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=82646;
    no rows selected
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=88518;
    no rows selected
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=84184;
    no rows selected
    2. find the object id for the index of that table and finding the wait events to that object_id.
    SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='XAK2ACCOUNT_DETAIL_DENORM';
    DATA_OBJECT_ID
    88655
    SID EVENT WAIT_CLASS WAIT_CLASS#
    1 rdbms ipc message Idle 6
    2 heartbeat monitor sleep Idle 6
    3 rdbms ipc message Idle 6
    4 wait for unread message on broadcast channel Idle 6
    6 SQL*Net message from client Idle 6
    7 SQL*Net message from client Idle 6
    8 SQL*Net message from client Idle 6
    9 SQL*Net message from client Idle 6
    10 SQL*Net message from client Idle 6
    11 SQL*Net message from client Idle 6
    12 SQL*Net message from client Idle 6
    13 SQL*Net message from client Idle 6
    1876 SQL*Net message from client Idle 6
    1877 VKTM Logical Idle Wait Idle 6
    1878 rdbms ipc message Idle 6
    1879 rdbms ipc message Idle 6
    1880 rdbms ipc message Idle 6
    1881 SQL*Net message from client Idle 6
    3200 SQL*Net message from client Idle 6
    3210 SQL*Net message from client Idle 6
    3212 db file sequential read User I/O 8
    3213 SQL*Net message from client Idle 6
    3214 SQL*Net message from client Idle 6
    3216 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 SQL*Net message from client Idle 6
    3757 SQL*Net message from client Idle 6
    1326 SQL*Net message from client Idle 6
    1876 Streams AQ: waiting for time management or cleanup tasks Idle 6
    1877 VKTM Logical Idle Wait Idle 6
    1878 rdbms ipc message Idle 6
    1879 rdbms ipc message Idle 6
    1880 rdbms ipc message Idle 6
    1882 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 rdbms ipc message Idle 6
    3758 SQL*Net message from client Idle 6
    3759 PX Deq: Execution Msg Idle 6
    3200 SQL*Net message from client Idle 6
    3210 SQL*Net message from client Idle 6
    3212 db file sequential read User I/O 8
    3213 SQL*Net message from client Idle 6
    3214 SQL*Net message from client Idle 6
    3216 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 SQL*Net message from client Idle 6
    3757 SQL*Net message from client Idle 6
    3786 SQL*Net message from client Idle 6
    3787 SQL*Net message from client Idle 6
    1 heartbeat monitor sleep Idle 6
    2 wait for unread message on broadcast channel Idle 6
    314 rdbms ipc message Idle 6
    315 Streams AQ: qmn coordinator idle wait Idle 6
    627 pmon timer Idle 6
    628 rdbms ipc message Idle 6
    629 Streams AQ: waiting for messages in the queue Idle 6
    940 Streams AQ: waiting for time management or cleanup tasks Idle 6
    941 VKTM Logical Idle Wait Idle 6
    942 rdbms ipc message Idle 6
    1253 rdbms ipc message Idle 6
    1254 rdbms ipc message Idle 6
    1256 Space Manager: slave idle wait Idle 6
    1566 DIAG idle wait Idle 6
    1567 rdbms ipc message Idle 6
    1568 Streams AQ: qmn slave idle wait Idle 6
    1879 rdbms ipc message Idle 6
    1880 smon timer Idle 6
    1881 rdbms ipc message Idle 6
    2192 PING Idle 6
    2193 rdbms ipc message Idle 6
    2194 rdbms ipc message Idle 6
    2505 rdbms ipc message Idle 6
    2506 rdbms ipc message Idle 6
    2818 rdbms ipc message Idle 6
    2819 rdbms ipc message Idle 6
    2821 PX Deq: reap credit Other 0
    3131 DIAG idle wait Idle 6
    3132 jobq slave wait Idle 6
    3444 rdbms ipc message Idle 6
    3445 jobq slave wait Idle 6
    3757 ges remote message Idle 6
    3758 rdbms ipc message Idle 6
    3759 VKRM Idle Idle 6
    4070 gcs remote message Idle 6
    4072 rdbms ipc message Idle 6
    4383 gcs remote message Idle 6
    4385 PX Deq: Execution Msg Idle 6
    4696 rdbms ipc message Idle 6
    4697 rdbms ipc message Idle 6
    1 rdbms ipc message Idle 6
    2 heartbeat monitor sleep Idle 6
    3 rdbms ipc message Idle 6
    4 wait for unread message on broadcast channel Idle 6
    6 SQL*Net message from client Idle 6
    From this output, what are the waits events i need to take into consideration.
    Is this the right approach to follow?
    Please let me know.
    Thanks in advance.what actual problem are you trying to solve?
    post SQL & results that have you concerned about wait events

  • Cut or Inverse Masking via Blend.Layer + Blend.Erase = no mouse event listener for objects behind "glass wall"

    I've successfully erased unwanted graphics using Blend and I can drag a desired object that is behind the erased area, but the dragged object does not have mouse events unless I drag if from behind the erased area.  Does anyone know a good work around or how I can force the event to be dispatched when the object behind the "glass wall" is clicked?  I can't find documentation anywhere that addresses this situation.  If an object behind can not be selected how is it really erased?  Thanks in advance!

    Yes, and I want to keep it behind.  It's visible and can be dragged, but
    since behind the transparent area that has been erased using Blend.Erase it
    no longer receives click events.  Thanks for your response.
    Michelle

  • How to handle the events of business object (BAPI)

    Hi,
    How to register to BAPI event and handle?
    For example, for a business object 'inv', there is an event as 'created'.
    I want to insert entry in a z table when an inv is created.
    I assume that the 'created' event is triggered when an inv is created.
    How i can register to that event and handle that event so that i can
    insert an entry in z table.
    Thanks,
    Prasad

    ComponentListener?
    : jay

Maybe you are looking for