Accesing components of global class in another global class.

Hi,
I am not able to access Public TYPES defined on a class in other class.
Class cl_business_object : has public type tt_records type table of  <ztable> with default key.
and when i use it in method of cl_gui , get_records returning rt_records type cl_business_object=>tt_records after making the statement of Class definition cl_business_object load / entering the name of the class in properties tab's .. why does it happen ?
Regards.

Hi, Its ECC 6.0,
We did nto have this problem before, Its kind of new, have no idea why it behaves so ..
And the syntax error is not generated when we are cheking onthe class where it has been used (acessing other class types) , this is activated.
but another 3rd class where this activated class is used, throw up syntactical error showing error in class 2.
" saying components of global class are not accesible, class definition missing"..
but there are statements of class definition load already!!
Regards
Edited by: Trivvka on Aug 11, 2009 5:06 PM

Similar Messages

  • Converting MXML Components to ActionScript Classes

    I'm in the process of converting most (if not all) of my MXML
    components to Action Script classes. I've found this is easy, and
    doesn't require a lot of extra code when extending a simple
    container or control. However, several of my MXML components have
    several nested containers and controls - i.e. a component that
    contains several Labels, a ComboBox, a TextInput, a Button, and a
    DataGrid, plus several other containers needed for layout. To code
    the layout of all these containers and controls using MXML, it uses
    about 16 lines of code. To code the layout in ActionScript, it
    takes about 50+ lines of code (see attached).
    I'm just wondering if there are any best practices for
    creating ActionScript classes that include several (or even A LOT
    OF) containers and controls. It's very easy to layout in MXML, and
    is more visibly pleasing to look at and understand, but I feel it
    is best practice to code components as ActionScript classes. I know
    I should be using MVC, but it's a little late to rewrite the entire
    application now.
    Any thoughts?

    I can't specifically speak to how to write layout code in
    ActionScript, but you can look at the generated code that Flex
    creates to get an idea of how Flex does it. When you compile an
    app, the Flex compiler takes your MXML input and converts it to
    ActionScript classes before compiling the entire set of classes
    into a SWF. Because of this, you can look at the interim
    ActionScript code.
    You do this by setting the keep-generated-actionscript
    compiler option to true and looking in the /generated directory.
    hth,
    matt horn
    flex docs

  • How to refresh components of one jsf from another jsf (partialTriggers)

    This thread begins here:
    How to refresh components of one jsf from another jsf (partialTriggers)
    My apologies for post in other forum and thanks Frank for reply.
    I found a solution before read your post. I'm newbie and I ignore the use of colons. So, for do the problem that I explain in my post I must to change this code:
    public backing_home () {
    content = new RichPanelGroupLayout();
    content.setRendered (true);
    String[] partialTriggers = {"menu:menuItem1", "menu:menuItem2", "menu:menuItem3", "menu:menuItem4"}; //All id's of menuItems of the menuBar in menu.jsp
    this.content.setPartialTriggers(partialTriggers);
    Note that now I don't pass the item ID only. I add "menu:" before the ID. This allows to acces to name container ('menu' is de ID of subview). And that's all. This works!!
    Anyway, I test your propuse Frank. Thank you!
    Westh

    Westh,
    Yes this code appears to be correct. Was that your question?
    --Ric                                                                                                                                                                                   

  • Problem accesing instances from global activities

    Hi I&acute;m really new at this and I&acute;m not secure if I&acute;m doing this all right.
    I want to access to a particular instance, using instance id, from a global activity. I&acute;m using the next code:
    {color:#333333}*ordersProcess = ClientBusinessProcess()*{color}
    {color:#333333}*connectTo ordersProcess*{color}
    {color:#333333}*using processId = "SolicitudRevisionNegocio"*{color}
    {color:#333333}{color}
    {color:#333333}*display "instancias"*{color}
    {color:#333333}{color}
    {color:#333333}*instance = getInstance(ordersProcess, instance : "/SolicitudRevisionNegocio#Default-1.0/2/0@Chedraui_Agenda_Inteligente111")*{color}
    {color:#333333}{color}
    {color:#333333}*display instance.id*{color}
    But after displaying "instancias" the estudio generates the next error:
    Se ha producido un error inesperado durante la ejecuci&oacute;n del componente interactivo.
    Debido a: Fuego RMI: Fallo durante la invocaci&oacute;n. Para obtener detalles compruebe la cadena de excepciones.
    Debido a: No se puede recibir el mensaje debido a un error de serializaci&oacute;n.
    Debido a: fuegoblock.papi.Instance
    fuego.web.execution.exception.UnexpectedExecutionException:
    Se ha producido un error inesperado durante la ejecuci&oacute;n del componente interactivo.
    at fuego.web.papi.TaskExecutor.execute(TaskExecutor.java:187)
    at fuego.workspace.servlet.ExecutorServlet.doAction(ExecutorServlet.java:117)
    at fuego.workspace.servlet.BaseServlet.doPost(BaseServlet.java:228)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at fuego.workspace.servlet.AuthenticatedServlet.service(AuthenticatedServlet.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
    at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:66)
    at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:81)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:293)
    at fuego.web.execution.servlet.ServletExternalContext.forwardInternal(ServletExternalContext.java:197)
    at fuego.web.execution.servlet.ServletExternalContext.finishExecution(ServletExternalContext.java:103)
    at fuegoblock.base.web.DisplayController.service(DisplayController.java:88)
    at fuego.web.execution.servlet.ServletRedirector$ControllerRedirector.forward(ServletRedirector.java:197)
    at fuego.web.execution.servlet.ServletRedirector.redirect(ServletRedirector.java:58)
    at fuego.web.papi.TaskExecutor.processRedirect(TaskExecutor.java:224)
    at fuego.web.papi.TaskExecutor.execute(TaskExecutor.java:104)
    at fuego.workspace.servlet.ExecutorServlet.doAction(ExecutorServlet.java:117)
    at fuego.workspace.servlet.BaseServlet.doPost(BaseServlet.java:228)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at fuego.workspace.servlet.AuthenticatedServlet.service(AuthenticatedServlet.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
    at fuego.web.filter.SingleThreadPerSessionFilter.doFilter(SingleThreadPerSessionFilter.java:64)
    at fuego.web.filter.BaseFilter.doFilter(BaseFilter.java:63)
    at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
    at fuego.web.filter.CharsetFilter.doFilter(CharsetFilter.java:48)
    at fuego.web.filter.BaseFilter.doFilter(BaseFilter.java:63)
    at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Unknown Source)
    Caused by: fuego.rmi.RMIRuntimeException: Fuego RMI: Fallo durante la invocaci&oacute;n. Para obtener detalles compruebe la cadena de excepciones.
    at fuego.rmi.RemoteProxy.processBatch(RemoteProxy.java:175)
    at fuego.component.ExecutorClient.dispatch(ExecutorClient.java:191)
    at fuego.component.CustomExecution.next(CustomExecution.java:247)
    at fuego.papi.impl.rmi.RMIExecution.next(RMIExecution.java:109)
    at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:177)
    at fuego.web.execution.impl.WebInteractiveExecution.process(WebInteractiveExecution.java:54)
    at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:223)
    at fuego.web.papi.TaskExecutor.processResult(TaskExecutor.java:266)
    at fuego.web.papi.TaskExecutor.execute(TaskExecutor.java:101)
    ... 92 more
    Caused by: fuego.rmi.spi.SerializationException: No se puede recibir el mensaje debido a un error de serializaci&oacute;n.
    at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:105)
    at fuego.rmi.ClientCluster.send(ClientCluster.java:545)
    at fuego.rmi.ClientCluster.transact(ClientCluster.java:343)
    at fuego.rmi.RemoteProxy.processBatch(RemoteProxy.java:172)
    ... 100 more
    Caused by: java.io.NotSerializableException: fuegoblock.papi.Instance
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.writeArray(Unknown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.writeObject(Unknown Source)
    at fuego.component.Message.writeObject(Message.java:654)
    at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.writeObject(Unknown Source)
    at fuego.component.Batch.writeObject(Batch.java:153)
    at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.writeObject(Unknown Source)
    at fuego.rmi.Packet.write(Packet.java:242)
    at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:102)
    ... 103 more
    I dont knoa wath I&acute;m doing wrong or if I need to activate or configure something befora using Papo.
    Thanks in advance

    Hi, thanks a lot for your help, I tried to do the notification
    &lt;address&gt;instId = "/SolicitudRevisionNegocio#Default-1.0/2/0@Agenda_Inteligente111"&lt;/address&gt;
    &lt;address&gt;&lt;/address&gt;
    &lt;address&gt;accion = action.ABORT&lt;/address&gt;
    &lt;address&gt;args[1]=accion&lt;/address&gt;
    &lt;address&gt;&lt;/address&gt;
    &lt;address&gt;send Notification&lt;/address&gt;
    &lt;address&gt;using instanceId = instId, &lt;/address&gt;
    &lt;address&gt;activityName = "ManufacturaRevisionNegocio", &lt;/address&gt;
    &lt;address&gt;parameters = args&lt;/address&gt;
    &lt;address&gt;&lt;/address&gt;
    display instId + "fue cancelada"
    But it doesn&acute;t work, I don&acute;t know if thats the right way to send the notification to abort the instance or if I had to put the instance in a state of waiting or something like that, if so, do you know how to do it??
    Greeting and a lot of thanks, again.
    It throws this error:
    fuego.lang.ComponentExecutionException: No se ha podido ejecutar correctamente la tarea.
    Motivo: 'fuego.compiler.CompilerExceptionShell: clientBP1:6:1:El m&eacute;todo 'send' de la clase 'Notification' no se ha podido ejecutar correctamente.'.
    at fuego.compiler.FuegoInvokeable.invoke(FuegoInvokeable.java:445)
    at fuego.compiler.CodeRunner$DebuggerRunnable.runMethod(CodeRunner.java:706)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
    at fuego.lang.JavaObject.invoke(JavaObject.java:227)
    at fuego.component.Message.process(Message.java:587)
    at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:772)
    at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:747)
    at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:143)
    at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:135)
    at fuego.compiler.DebuggerPrincipal.processBatch(DebuggerPrincipal.java:64)
    at fuego.component.ExecutionThread.work(ExecutionThread.java:831)
    at fuego.component.ExecutionThread.run(ExecutionThread.java:409)
    at fuego.component.CustomExecution.next(CustomExecution.java:176)
    at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:177)
    at fuego.web.execution.impl.WebInteractiveExecution.process(WebInteractiveExecution.java:54)
    at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:223)
    at fuego.webdebugger.servlet.DebuggerServlet.doDebug(DebuggerServlet.java:148)
    at fuego.webdebugger.servlet.DebuggerServlet.doPost(DebuggerServlet.java:82)
    at fuego.webdebugger.servlet.DebuggerServlet.doGet(DebuggerServlet.java:66)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Unknown Source)
    Caused by: fuego.compiler.CompilerExceptionShell: clientBP1:6:1:El m&eacute;todo 'send' de la clase 'Notification' no se ha podido ejecutar correctamente.
    at fuego.compiler.Invoke$MethodCall.run(Invoke.java:1508)
    at fuego.compiler.Invoke.runCall(Invoke.java:783)
    at fuego.compiler.Invoke.run(Invoke.java:767)
    at fuego.compiler.Block.run(Block.java:304)
    at fuego.compiler.DoBlock.run(DoBlock.java:585)
    at fuego.compiler.Method.run(Method.java:999)
    at fuego.compiler.Method$Adaptor.run(Method.java:1190)
    at fuego.compiler.FuegoInvokeable.invoke(FuegoInvokeable.java:437)
    at fuego.compiler.CodeRunner$DebuggerRunnable.runMethod(CodeRunner.java:706)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
    at fuego.lang.JavaObject.invoke(JavaObject.java:227)
    at fuego.component.Message.process(Message.java:587)
    at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:772)
    at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:747)
    at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:143)
    at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:135)
    at fuego.compiler.DebuggerPrincipal.processBatch(DebuggerPrincipal.java:64)
    at fuego.component.ExecutionThread.work(ExecutionThread.java:831)
    at fuego.component.ExecutionThread.run(ExecutionThread.java:409)
    Caused by: fuego.lang.ComponentExecutionException: El m&eacute;todo 'send' de la clase 'Notification' no se ha podido ejecutar correctamente.
    at fuego.lang.ObjectTypeDescription.invokeMethod(ObjectTypeDescription.java:1482)
    at fuego.lang.MethodTypeDescription.invoke(MethodTypeDescription.java:1230)
    at fuego.compiler.Invoke$MethodCall.run(Invoke.java:1480)
    ... 22 more
    Caused by: java.lang.ClassCastException: java.lang.Integer
    at fuego.components.Notification.createDynamicObject(Notification.java:316)
    at fuego.components.Notification.send(Notification.java:139)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
    at fuego.lang.ObjectTypeDescription.invokeMethod(ObjectTypeDescription.java:1463)
    ... 24 more
    Edited by: user646988 on 8/01/2009 06:38 AM

  • Accesing mxml components from AS class

    Hello,
    on a CS6 <csxs:CSExtension> how do I refer to a component (say, a Button with id="myButton")  in the main view from an Actionscript class?
    The equivalent mx: way highlighted here: http://livedocs.adobe.com/flex/3/html/help.html?content=app_container_3.html)
    TIA,
    Davide

    Apparently, the correct way is: FlexGlobals.topLevelApplication
    (it seems like FB has some problems with both com.adobe.photoshop.Application and mx.core.Application.application in the same class - at least it fired a bunch of weird errors to me)
    Davide

  • Why do we need a Self Reference "me" to use the components of a class

    Hi
    I am not clear why do we need a self reference variable "me" to call the components of its own class? when it can be accessed directly as in the following examples?
    In my first example below i can call the method display_name directly without creating a reference object or instance of the class within the class.
    In the second example i am using the self refernce Write me->name to access the component of a class.
    My question is why do we need "me" when i can use the components directly as shown in my first example.
    CLASS egocentric DEFINITION.
      PUBLIC SECTION.
        DATA:
         name(10) TYPE c READ-ONLY.
        METHODS set_name.
        METHODS display_name.
    ENDCLASS.                    "egocentric DEFINITION
    *       CLASS egocentric IMPLEMENTATION
    CLASS egocentric IMPLEMENTATION.
      METHOD set_name.
        MOVE 'Abap Objects' TO name.
        CALL method display_name.
      ENDMETHOD.                    "write_name
      METHOD display_name.
        write: name.
      ENDMETHOD.                    "display_name
    ENDCLASS.                    "egocentric IMPLEMENTATION
    *Global Data
    DATA oref TYPE REF TO egocentric.
    START-OF-SELECTION.
      CREATE OBJECT oref.
      CALL METHOD oref->set_name.
    CLASS egocentric DEFINITION.
            PUBLIC SECTION.
                DATA:
                 name(10) TYPE c VALUE u2018Instructoru2019
    READ-ONLY.
                 METHODS write_name.
    ENDCLASS.
    CLASS egocentric IMPLEMENTATION.
            METHOD write_name.
                WRITE me->name.
            ENDMETHOD.
    ENDCLASS.
    *Global Data
    DATA oref TYPE REF TO egocentric.
    START-OF-SELECTION.
            CREATE OBJECT oref.
            CALL METHOD oref->write_name.

    You can go WIKI and search with ABAP Objects.
    Or do the same in 'advanced search'  and select a search area. You are bound to find something.
    Or this link perhaps:
    [abap objects|http://help.sap.com/saphelp_nw70/helpdata/EN/ce/b518b6513611d194a50000e8353423/content.htm]

  • MXML Components and ActionScript Classes

    Hello,
    I am fairly new to Flex and OOP and am confused on how some parts of OOP work.
    I have a Spark TextInput Component with an id which equals "test".
    I also have a function that takes "test.text", appends a string to and and puts the resulting value into another TestInput called test2.
    How can I move the "appendPhrase()" function into a class so that it would still accept values from "test" and change the "text2" values?
    I tried creating a function that would assign the value of the varaible in the class using classname.variable name, made it bindable, and assigned
    the text value of the textinput that value, but I was wondering if there was any other way I could do that?
    ~~~~~~~~~~~~~~~~Version1~~~~~~~~~~~~~~~~~~~~~
    <fx:Script>
        private function appendPhrase():void
            test2.text = test.text + " was added";
    </fx:Script>
    <s:TextInput x="0" y="0" id="test" />
    <s:TextInput x="0" y="10" id="test2" />
    <s:Button click="appendPhrase();" />
    ~~~~~~~~~~~~~~~~~~Version 2:~~~~~~~~~~~~~~~~~
    function in class:
    public class ChangeString
        [Bindable]
        public var text:String;
        private function appendPhrase(firstString:Object):void
           text = firstString.text + " was added";
    main.mxml:
    [Bindable]
    public var changed:Object = new ChangeString();
    <s:TextInput x="0" y="0" id="test" click="changeValue(test.text)" />
    <s:TextInput x="0" y="10" id="test2" text="{changed.text}"/>

    package models
              [Bindable]
              public class MyViewModel
                        public var text:String "Hello ";
                        public function appendText(t:String):String
                                  this.text = this.text + t;
                                  return this.text;
    <fx:Script>
    <![CDATA[
    import models.MyViewModel;
    [Bindable]
    public var model:MyViewModel = new MyViewModel();
    ]]>
    </fx:Script>
    <s:TextInput id="test" x="0" y="0" click="this.model.appendText(this.test.text)" text="World" />
    <s:TextInput id="test2" x="0" y="10" text="{this.model.text}" />
    I would go about it a little differently maybe. I would use the model class as a data holder, and use a private local method, utility class, or controller class to modify values on the model (data holder class).

  • JDI : DTR / CBS - Moving components from one scenario to another.

    Hi all,
    I have a series of Development Components that fall under the scenario 2 description of the DTR / CBS scenarios.
    I am trying to move our projects into a scenario 2+, and have created the CONS and DEV projects in our SLD. I moved the development components from the old scenario into the DEV workspace through a propagation list, but I don't see the Development Components appear in the CBS BuildSpace, even after refresh.
    Is it possible to migrate existing DCs from scenario 2 to 2+ and 3? Or do I need to manually create each DC and add all the components in it?

    Hi,
    It is stated in help.sap.com that there is no migration scenario from 2 to 2+ or 3.
    So, it seems you should do it manually.
    Sorry for non constructive ansewer.
    Victor.

  • How to Access MXML components  from ActionScript class

    Hi ,
    I am having a Application Conataner , in which i am having a Form Container with some Label in it .
    This is some thing similar to this as shown :
    <Mx:Application>
    <Mx:Form>
    <Mx:Label text="Hello world"/>
    </Mx:Form>
    </Mx:Application>
    Can any body please let me know how can i access this Form's Label , from an ActionScript class .
    catch(error:*)
    // Here i want to access these Objects and set data to that Label .
    Basically My requirement is that iinside the catch block of my ActionScript class , i want to set some text to the Label , Please
    let me know if this is possible or not also ??
    Waiting for your Replies .

    Hi these both are not same these refer to different one...
    Well let me explain...
    Application.application.myCustomComp.myLabel.text = "sometext"; sets the label "myLabel" which is present inside your customcomponent(which is in main application).
    Application.application.myLabel.text = "sometext"; sets the label "myLabel" which is present directly inside your main application.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Label id="myLabel"  text=""/> // So inorder to set the label(myLabel) present here you will use directly the 2nd line of code.
    <mx:CustomComp id="myCustomComp" /> // So inorder to set the label(myLabel) present inside this component you use 1st line of code.
    </mx:Application>
    Hope now its clear.
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Accesing datagridview from a class

    Hello,
    I am doing a project in winforms and I am populating a datagridview with a dataset. Would it be better to return a dataset object and populate it from code behind or pass in the gridview to the class method and populate it their? Is there a better way of
    doing it?

    Hello,
    You should never pass a control like a DataGridView, instead the data would be passed. I would go so far to say place all data operations into a class file or better yet into a class project which you might not be aware of doing this is a proven/best practice.
    An example is out of scope of the question.
    The following is a super simple example that should give you an idea what I am talking about. Now if we were using say Entity Framework the same logic applies but we'd use a different code base.
    Imports System.Data.SqlClient
    Public Class DataOperations
    Private CustomerDataTable As DataTable
    Public Function GetCustomers() As DataTable
    Return CustomerDataTable
    End Function
    Public Sub New()
    Me.CustomerDataTable = New DataTable
    Using cn As New SqlConnection With {.ConnectionString = My.Settings.ConnectionString}
    Using cmd As New SqlCommand With {.Connection = cn}
    cmd.CommandText = "SELECT Identifier, CompanyName FROM [Customer]"
    cn.Open()
    Me.CustomerDataTable.Load(cmd.ExecuteReader)
    End Using
    End Using
    End Sub
    Public Function AddNewCustomer(ByVal Name As String, ByRef NewIdentifier As Integer) As Boolean
    Using cn As New SqlConnection With {.ConnectionString = My.Settings.ConnectionString}
    Using cmd As New SqlCommand With {.Connection = cn}
    cmd.CommandText = "INSERT INTO [Customer] (CompanyName) VALUES (@CompanyName); SELECT CAST(scope_identity() AS int);"
    cmd.Parameters.AddWithValue("@CompanyName", Name)
    cn.Open()
    Try
    NewIdentifier = CInt(cmd.ExecuteScalar)
    Return True
    Catch ex As Exception
    Return False
    End Try
    End Using
    End Using
    End Function
    End Class
    using System;
    using System.Data;
    using System.Data.SqlClient;
    namespace WindowsFormsApplication1
    internal class DataOperations
    private DataTable CustomerDataTable;
    public DataTable GetCustomers()
    return CustomerDataTable;
    public DataOperations()
    this.CustomerDataTable = new DataTable();
    using (SqlConnection cn = new SqlConnection { ConnectionString = Properties.Settings.Default.ConnectionString })
    using (SqlCommand cmd = new SqlCommand { Connection = cn })
    cmd.CommandText = "SELECT Identifier, CompanyName FROM [Customer]";
    cn.Open();
    this.CustomerDataTable.Load(cmd.ExecuteReader());
    public bool AddNewCustomer(string Name, ref int NewIdentifier)
    using (SqlConnection cn = new SqlConnection { ConnectionString = Properties.Settings.Default.ConnectionString })
    using (SqlCommand cmd = new SqlCommand { Connection = cn })
    cmd.CommandText = "INSERT INTO [Customer] (CompanyName) VALUES (@CompanyName); SELECT CAST(scope_identity() AS int);";
    cmd.Parameters.AddWithValue("@CompanyName", Name);
    cn.Open();
    try
    NewIdentifier = Convert.ToInt32(cmd.ExecuteScalar());
    return true;
    catch (Exception)
    return false;
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • I want the Definitaion fo  Class and its Components  in ABAP . With Example

    Gowri

    <b>Classes</b>
    Classes are templates for objects. Conversely, you can say that the type of
    an object is the same as its class. A class is an abstract description of an object. You could say that it is a set of instructions for building an object. The attributes
    of objects are defined by the components of the class, which describe the
    state and behavior of objects.
    <b>
    Local and Global Classes</b>
    Classes in ABAP Objects can be declared either globally or locally. You define global classes and interfaces in the Class Builder (Transaction SE24) in the
    ABAP Workbench. They are stored centrally in class pools in the class library
    in the R/3 Repository. All of the ABAP programs in an R/3 System can access the global classes. Local classes are defined within an ABAP program. Local classes and interfaces can only be used in the program in which they are defined. When you use a class in an ABAP program, the system first searches for a local class with the specified name. If it does not find one, it then looks for a global class. Apart from the visibility question, there is no difference between using a global class and using a local class.
    There is, however, a significant difference in the way that local and global classes are designed. If you are defining a local class that is only used in a single program, it is usually sufficient to define the outwardly visible components so that it fits into that program. Global classes, on the other hand, must be able to be used anywhere. This means that certain restrictions apply when you define the interface of a global class, since the system must be able to guarantee that any program using an object of a global class can recognize the data type of each interface parameter.
    The following sections describe how to define local classes and interfaces in an ABAP program. For information about how to define local classes and interfaces, refer to the  Class Builder section of the ABAP Workbench Tools documentation.
    <b>Defining Local Classes</b>
    Local classes consist of ABAP source code, enclosed in the ABAP statements CLASS ... ENDCLASS. A complete class definition consists of a declaration part and, if required, an implementation part. The declaration part of a class <class> is a statement block:
    CLASS <class> DEFINITION.
    ENDCLASS.
    It contains the declaration for all components (attributes, methods, events) of the class. When you define local classes, the declaration part belongs to the global program data. You should therefore place it at the beginning of the program.
    If you declare methods in the declaration part of a class, you must also write an implementation part for it. This consists of a further statement block:
    CLASS <class> IMPLEMENTATION.
    ENDCLASS.
    The implementation part of a class contains the implementation of all methods of the class. The implementation part of a local class is a processing block. Subsequent coding that is not itself part of a processing block is therefore not accessible.
    <b>Structure of a Class</b>
    <u>The following statements define the structure of a class:</u>
    A class contains components
    Each component is assigned to a visibility section
    Classes implement methods
    The following sections describe the structure of classes in more detail.
    <b>Class Components</b>
    The components of a class make up its contents. All components are declared in the declaration part of the class. The components define the attributes of the objects in a class. When you define the class, each component is assigned to one of the three visibility sections, which define the external interface of the class. All of the components of a class are visible within the class. All components are in the same namespace. This means that all components of the class must have names that are unique within the class.
    There are two kinds of components in a class - those that exist separately for each object in the class, and those that exist only once for the whole class, regardless of the number of instances. Instance-specific components are known as instance components. Components that are not instance-specific are called static components.
    In ABAP Objects, classes can define the following components. Since all components that you can declare in classes can also be declared in interfaces, the following descriptions apply equally to interfaces.
    <b>Attributes</b>
    Attributes are internal data fields within a class that can have any ABAP data type. The state of an object is determined by the contents of its attributes. One kind of attribute is the reference variable. Reference variables allow you to create and address objects. Reference variables can be defined in classes, allowing you to access objects from within a class.
    <b>Instance Attributes</b>
    The contents of instance attributes define the instance-specific state of an object. You declare them using the DATA statement.
    <b>Static Attributes</b>
    The contents of static attributes define the state of the class that is valid for all instances of the class. Static attributes exist once for each class. You declare them using the CLASS-DATA statement. They are accessible for the entire runtime of the class.
    All of the objects in a class can access its static attributes. If you change a static attribute in an object, the change is visible in all other objects in the class.
    <b>Methods</b>
    Methods are internal procedures in a class that define the behavior of an object. They can access all of the attributes of a class. This allows them to change the data content of an object. They also have a parameter interface, with which users can supply them with values when calling them, and receive values back from them The private attributes of a class can only be changed by methods in the same class.
    The definition and parameter interface of a method is similar to that of function modules. You define a method <met> in the definition part of a class and implement it in the implementation part using the following processing block:
    METHOD <meth>.
    ENDMETHOD.
    You can declare local data types and objects in methods in the same way as in other ABAP procedures (subroutines and function modules). You call methods using the CALL METHOD statement.
    <b>Instance Methods</b>
    You declare instance methods using the METHODS statement. They can access all of the attributes of a class, and can trigger all of the events of the class.
    <b>Static Methods</b>
    You declare static methods using the CLASS-METHODS statement. They can only access static attributes and trigger static events.
    <b>Special Methods</b>
    As well as normal methods, which you call using CALL METHOD, there are two special methods called CONSTRUCTOR and CLASS_CONSTRUCTOR, which are automatically called when you create an object (CONSTRUCTOR) or when you first access the components of a class (CLASS_CONSTRUCTOR).
    <b>Events</b>
    Objects or classes can use events to trigger event handler methods in other objects or classes. In a normal method call, one method can be called by any number of users. When an event is triggered, any number of event handler methods can be called. The link between the trigger and the handler is not established until runtime. In a normal method call, the calling program determines the methods that it wants to call. These methods must exist. With events, the handler determines the events to which it wants to react. There does not have to be a handler method registered for every event.
    The events of a class can be triggered in the methods of the same class using the RAISE EVENT statement. You can declare a method of the same or a different class as an event handler method for the event <evt> of class <class> using the addition FOR EVENT <evt> OF <class>.
    Events have a similar parameter interface to methods, but only have output parameters. These parameters are passed by the trigger (RAISE EVENT statement) to the event handler method, which receives them as input parameters.
    The link between trigger and handler is established dynamically in a program using the SET HANDLER statement. The trigger and handlers can be objects or classes, depending on whether you have instance or static events and event handler methods. When an event is triggered, the corresponding event handler methods are executed in all registered handling classes.
    <b>Instance Events</b>
    You declare instance events using the EVENTS statement. An instance event can only be triggered in an instance method.
    <b>Static Events</b>
    You declare static events using the CLASS-EVENTS statement. All methods (instance and static methods) can trigger static events. Static events are the only type of event that can be triggered in a static method.
    <u>See also Triggering and Handling Events.</u>
    <b>Types</b>
    You can define your own ABAP data types within a class using the TYPES statement. Types are not instance-specific, and exist once only for all of the objects in a class.
    <b>Constants</b>
    Constants are special static attributes. You set their values when you declare them, and they can then no longer be changed. You declare them using the CONSTANTS statement. Constants are not instance-specific, and exist once only for all of the objects in a class.
    <b>Visibility Sections</b>
    You can divide the declaration part of a class into up to three visibility areas:
    CLASS <class> DEFINITION.
      PUBLIC SECTION.
      PROTECTED SECTION.
      PRIVATE SECTION.
    ENDCLASS.
    These areas define the external visibility of the class components, that is, the interface between the class and its users. Each component of a class must be assigned to one of the visibility sections.
    <b>Public Section</b>
    All of the components declared in the public section are accessible to all users of the class, and to the methods of the class and any classes that inherit from it. The public components of the class form the interface between the class and its users.
    <b>
    Protected Section</b>
    All of the components declared in the protected section are accessible to all methods of the class and of classes that inherit from it. Protected components form a special interface between a class and its subclasses. Since inheritance is not active in Release 4.5B, the protected section currently has the same effect as the private section.
    <b>Private Section</b>
    Components that you declare in the private section are only visible in the methods of the same class. The private components are not part of the external interface of the class.
    <b>Encapsulation</b>
    The three visibility areas are the basis for one of the important features of object orientation - encapsulation. When you define a class, you should take great care in designing the public components, and try to declare as few public components as possible. The public components of global classes may not be changed once you have released the class.
    For example, public attributes are visible externally, and form a part of the interface between an object and its users. If you want to encapsulate the state of an object fully, you cannot declare any public attributes. As well as defining the visibility of an attribute, you can also protect it from changes using the READ-ONLY addition.
    "Example  :
    CLASS C_COUNTER DEFINITION.
      PUBLIC SECTION.
        METHODS: SET_COUNTER IMPORTING VALUE(SET_VALUE) TYPE I,
                 INCREMENT_COUNTER,
                 GET_COUNTER EXPORTING VALUE(GET_VALUE) TYPE I.
      PRIVATE SECTION.
        DATA COUNT TYPE I.
    ENDCLASS.
    CLASS C_COUNTER IMPLEMENTATION.
      METHOD SET_COUNTER.
        COUNT = SET_VALUE.
      ENDMETHOD.
      METHOD INCREMENT_COUNTER.
        ADD 1 TO COUNT.
      ENDMETHOD.
      METHOD GET_COUNTER.
        GET_VALUE = COUNT.
      ENDMETHOD.
    ENDCLASS.
    The class C_COUNTER contains three public methods - SET_COUNTER, INCREMENT_COUNTER, and GET_COUNTER. Each of these works with the private integer field COUNT. Two of the methods have input and output parameters. These form the data interface of the class. The field COUNT is not outwardly visible.
    Reward   points  if it is usefull...
    Girish

  • Resolving session scoped component in global scope component.

    Hi,
    I am implementing batch process and i am need to resolve session scoped component in global scoped component.
    In global scope component (one of the component referred by my scheduler which also in global scope as usual) and i need to resolve session scoped "/atg/epub/workflow/WorkflowView" component in my scheduler.
    I tried all possibilities but nothing worked out. I do not have access to current request, because its batch process. following ways i tried,
    1. getResolveName("/atg/epub/workflow/WorkflowView") method of GenericService which is extended by my global scope component -- This returns null.
    2. Tried to get the current request on ServletUtils to use resolveName() method on request.
    ServletUtlis.getCurrentRequest() - This returns null as expected.
    Is there any way to resolve session scoped component in global scope component. Thanks in advance.
    Edited by: 938890 on Jun 30, 2012 4:59 AM

    Try below :
    If you want to resolve the name of a Nucleus component from Java code that is not itself a Nucleus service, you must first initialize Nucleus with this construct:
    Nucleus.getGlobalNucleus().resolveName("target component")
    where target component is the name of the component you are looking up. Note that this construct works only for components with global scope.
    You can also resolve names of Nucleus components using the Java Naming and Directory Interface (JNDI). The following example shows how you can use JNDI to access the Scheduler component:
    String jndiName = "dynamo:/atg/dynamo/service/Scheduler";
    Context ctx = new javax.naming.InitialContext ();
    Scheduler s = (Scheduler) ctx.lookup (jndiName);
    reference - oracle ATG docs.
    ~ Praveer

  • Apex 3.2 - Global notification message

    How can I restrict global notification message which can be specified at shared components --> Definition --> Global Notification to home page only. i.e. to display on a specific page(s) only. Thanks in advance - Chan

    Hi,
    I think there is no out of box solution.
    One way is create copy of page template you use and remove substitution string #GLOBAL_NOTIFICATION# from it.
    Then use that page template for pages where you do not like show that notification.
    Regards,
    Jari

  • Configuration Guide for Global Trade Service Business Package

    Hello,
    Can anyone provide me with the link where I can download the installation/cofiguration guide for the Business Package for Global Trade Service.
    Regards
    Deb

    Hi Deb,
    in SAP Note 963735 you will find a description how to obtain product documentation for GTS.
    <i>You can access the product documentation on SAP Service Marketplace at service.sap.com/swdc -> Download -> SAP Installations and Upgrades -> Entry by Application Group -> SAP Application Components -> SAP Global Trade services (GTS) -> SAP GTS <Release> -> Installation and Upgrade.
    Note that access to the SAP GTS product documentation is subject to a software license audit. You can only follow the listed navigation steps in the path specified above if you have a current license for SAP GTS. If you do not have a product license for SAP GTS Version >3.0, the entry 'SAP Global Trade Services (GTS)' is missing from the link list under SAP Application Components, which prevents you from navigating further if you lack the appropriate authorization. If you have a valid SAP GTS product license, you can access the contents for the release for which you have the license.</i>
    Best regards,
    Martin

  • Calling paintComponent(Graphics g) in another class

    Dear Friends,
    I have a class (Class Pee) where I implemented the paintComponent(Graphics g) and another class (Class Bee) where I generate some datas. My intention is to call the paintComponent(Graphics g) method in class Pee at class Bee to make use of the generated data to draw some figures.
    I imported java.awt .Graphics, java.awt.Graphics2D, Polygon and geom and declared Graphics2D g2d = (Graphics2D) g; as well, but still when I call paintComponent (Graphics g) it fails to recognize the g. What is actually wrong.
    See code:
    Class Pee
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Polygon;
    import javax.swing.JPanel;
    public class Pee extends JPanel{
    private int offset;
    public void paintComponent(Graphics g, int b[], int c[]){
    super.paintComponent(g);
    Graphics2D g2D = (Graphics2D) g;
    this.setBackground(Color.white);
    Class Bee
        import java.io.*;
        import java.util.*;
        import java.awt.Graphics;
        import java.awt.Graphics2D;
        import java.awt.geom.*;
        import java.awt.Polygon;
       import Graphic.Pee; //importing Pee Class
    public class Bee{
    int x[];
    int y[];
    // other variable declaration
    public Bee{
    x = new int [5];
    y = new int [5];
    Pee dr = new Pee();
    Graphics2D g2d = (Graphics2D) g;
    //code to generate data
    dr.paintComponent(g,x,y);
    }It always say that "g" cannot be resolved. Please how do I get over this.
    Thanks,
    Jona_T

    Swing calls the paintComponent method when we ask a component to draw itself. We do this by
    calling its repaint method. So the general approach is to change the data in the component
    that does the graphics for us and then ask the component to repaint itself. Swing does the
    rest. One benefit of this way of doing things is that the graphic component keeps the data
    and can render all or any part of it at any time. Trying to get a reference to the
    components graphics context from within another class and using it to draw graphics in the
    graphics component prevents this and the foreign class event code can never know when the
    graphics component needs to be re&#8211;rendered.
    So the idea is to keep the graphics/rendering component independent from the event code. The
    event code controls the state (member variables) in the graphics component and tells it when
    to re&#8211;render itself.
    There are a lot of (creative) ways of putting these things together. Here's an example.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.util.Random;
    import javax.swing.*;
    public class CallingGraphics implements ActionListener {
        GraphicComponentClass graphicComponent;
        DataGenerationClass   dataGenerator = new DataGenerationClass();
        public void actionPerformed(ActionEvent e) {
            Point2D.Double[] data = dataGenerator.getData();
            graphicComponent.setData(data);
        private JPanel getGraphicComponent() {
            graphicComponent = new GraphicComponentClass();
            return graphicComponent;
        private JPanel getLast() {
            JButton button = new JButton("send data to graphics");
            button.addActionListener(this);
            JPanel panel = new JPanel();
            panel.add(button);
            return panel;
        public static void main(String[] args) {
            CallingGraphics test = new CallingGraphics();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test.getGraphicComponent());
            f.getContentPane().add(test.getLast(), "Last");
            f.setSize(400,300);
            f.setLocation(200,200);
            f.setVisible(true);
    class GraphicComponentClass extends JPanel {
        Ellipse2D.Double[] circles = new Ellipse2D.Double[0];
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            for(int j = 0; j < circles.length; j++) {
                g2.draw(circles[j]);
        public void setData(Point2D.Double[] p) {
            double w = getWidth();
            double h = getHeight();
            double dia = 75.0;
            circles = new Ellipse2D.Double[p.length];
            for(int j = 0; j < circles.length; j++) {
                double x = p[j].x*(w - dia);
                double y = p[j].y*(h - dia);
                circles[j] = new Ellipse2D.Double(x,y,dia,dia);
            repaint();
    class DataGenerationClass {
        Random seed = new Random();
        public Point2D.Double[] getData() {
            int n = seed.nextInt(25);
            Point2D.Double[] locs = new Point2D.Double[n];
            for(int j = 0; j < n; j++) {
                double x = seed.nextDouble();
                double y = seed.nextDouble();
                locs[j] = new Point2D.Double(x, y);
            return locs;
    }

Maybe you are looking for

  • How do you get your guided access password if your ipod is locked

    i can't get my ipod off of an app becaus ei have a guided access lock on it and i  don't know the password how do i find the password

  • Screen Capture Utility

    Does anyone know of a good screen capture utility for the TouchPad? Thanks! I found a thread answering this at: http://forums.hpwebos.com/t5/HP-TouchPad-Software-​Hardware/How-to-collect-a-Screen-Capture-on-a-Touc​... Woohoo

  • Can't repair or reset keychain

    Key chain is giving me lots of problems for many different programs. I have tried using Keychain First Aid. Verification fails, repairs fail. amd when I atempt to reset my default keychain I get thie error message CSSM_ERRCODE_INTERNAL_ERROR System i

  • Error -100000 when downloading gifted songs

    So for Christmas, my uncle gifted me a bunch of songs (three albums and four songs). In one of the albums, the Dick Figures Season 1 Soundtrack, I cannot download four songs. iTunes keeps giving me error -100000. It says the file is corrupt and I sho

  • Can itunes play two songs at the same time? Mine can!!

    If you let a song run until just before the end and then click to an earlier part in the song on the time bar, itunes starts playing both that tune and the next one. Does this happen with anyone else? What a basic error, how did apple not catch this?