Help,Help me!   I want to create  a custom component

The first, I'm a chinese,my English is very poor.Maybe I make so many mistakes.so
I say sorry for you.
I want to create a custom component so I research the Java.awt.Component .but I don't understand that the class has a method-------dispatchEvent(AWTEvent e).I want to know what invoke this method and when invoke?
thank u

I believe ( believe mind you )
that the method:
public final void dispatchEvent(AWTEvent e)
Dispatches an event to this component or one of its sub components. Calls processEvent before returning for 1.1-style events which have been enabled for
the Component.
Parameters: e - the event
Is used to send an Event message to This component from another
like :
Say you have 'MyComponent1' sending Events to MyComponent2
AWTEvent e = new AWTEvent( blah whatever.......);
MyComponent2.dispatchEvent( e );
and then the Event Handlers on MyComponent2 if any will recieve 'e'
You Probably don't need to modify this behaviour
I assume you are doing something like
public class TestComponent extends Component
private int MySpecialExtraValue;
  public TestComponent()
     super();  // like : new Component()
     MySpecialValue = 5;  // Just an example
  // Override a Method in Component just as an example.
public String getName()
   String S = "I am a Custom Component";
    return S;
  //Another override example
  public void repaint()
     System.out.println("repaint() was called");
     super.repaint();  // use the original Component Method
     // blah do own stuff
}Override any methods that you need to get the required behaviour that you want...
I hope this is a help........

Similar Messages

  • Creating a custom component

    I am creating a custom component that is based on Canvas.
    I am trying to add this component as a child of another
    component like that:
    myCanvas.addChild(myCustomComponent)
    addChild function expect ObjectDisplay in its argument and
    not a Class. I am little confused. If I am creating a component
    that base on Canvas isnt it inherited from ObjectDisplay?
    please help.

    I actually figure it out. Thank you!!!
    here is what I am trying to do.
    1. creating component_A based on Canvas
    2 in my Application I have Canvas_B
    I wanted to add component_A as a child to Canvas_B
    solution:
    Canvas_B.addChild(new component_A ())

  • Create complex custom component

    Hi everyone!
    I'm trying to create my own custom component in JSF. However I have several questions :
    - It is not mandatory to create a renderer class, right ? the component can draw itself ?
    - How can I create a custom component which would have several "values" inside ? for example let us supppose I want to create a custom JSF component to enter a IBAN. The IBAN is divided into several parts : BBAN, country code, key, Bank adresse,... but any tutorial I've found explain how to create a input component with only one simple value (for example the classical "CreditCardInputComponent").
    Josselin

    Hi,
    did you find a solution for your "composite" component problem?
    I am also trying to create a custom component that contains several standard jsf components such as HtmlCommandLink and HtmlInputText.
    I build all the standard components within my component programmatically using things like:
    HtmlCommandLink link = (HtmlCommandLink) application.createComponent(HtmlCommandLink.COMPONENT_TYPE);
    Also at the beginning of the encodeBegin I clear all children from my custom component using getChildren().clear()
    and rerender the component based on my new internal model which I updated during the previous decoding of my component.
    As a simple jsf custom tag it works ok, however, I am facing deep problems with action events as soon as I use the component within a jsf HtmlDataTable tag.
    Am I missing something here?
    Any ideas? Help is really really appreciated. This different behavior in different contexts is slowly but constantly driving me nuts.
    cheers
    hans

  • Creating a custom component in multisim using *.lib and *.olb files

    i have  *.lib and *.olb files for a pspice model. which file i have to you while creating a custom component in multisim.

    Hello,
    Thanks for your question. In order to create simulatable custom components in Multisim you need a SPICE model (Multisim can also understand PSpice Models). The file format for SPICE model can be different according to the manufacturer, for instance: *.cir, *.lib, *.llb. At the end of the day these files are text files that you can open with a text editor, therefore, you can simply copy and paste the model in Multisim.
    Here are two good resources on component creation:
    Component Creation 101
    Creating a Custom Component in NI Multisim
    When you reach the step where you need to enter the SPICE model, simply open the *.lib or *.olb file with a text editor, and copy and paste the model.
    Hope this helps.
    Fernando D.
    National Instruments

  • Is  Creating a Custom Component and Custom UIComponent are same in Flex ??

    Hi ,
    I am getting confusion in the terminology of words  with respect to Custom  Components .
    Please let me know whether  Creating a Custom Component and Custom UIComponent are same in Flex ??
    Because i have created some  Custom Components based on Form Container based on my business screens .
    Does they both Custom Component and Custom UIComponent mean the same ??
    Please tell me .
    Thanks in advance

    There seems to be a little confusion here. Think of it this way:
    A basic UIComponent by itself is not visible; you can add something you can see to it to make a visual custom component. For example, a ComboBox component is a UIComponent with a ComboBox added to it.
    The UIComponent is the lightest weight component available from which you can create other components. I use it as the base for custom components that the user cannot see, like a data manager.
    HTH,
    Carlos

  • Help with creating a custom component.

    Hi. I have created a really simple custom component called
    myComp. It is a simple Canvas 100 pixels x 100 pixels with an Image
    control component.
    <mx:Canvas>
    <mx:Image id="image1">
    </mx:Canvas>
    After instantiating the component in Main.mxml eg. var
    pic1:myComp = new myComp(); I am having a problem setting the
    source property of the Image component.
    "image1" is the id of mx:Image in the custom compoenent so I
    tried pic1.image1.source = "assets/ball.jpg" but I get a run time
    error "Error #1009: Cannot access a property or method of a null
    object reference".
    Don't really know what I am doing wrong.
    Any help please!

    In your custom component, try adding a bindable public var
    which contains the path to your image. Also, set the image.source
    to this var.
    In your main app, set the var within the <mx:> tags of
    the custom component. Since it is a public var, it will show up in
    the code hint. You can also now change the image var from the main
    app anytime you like using ActionScript code.

  • Help with DC Deployment - Cannot create delegate for component...

    I inherited a DC several months ago and have been adding functionality to it ever since. I have never had a problem compiling/deploying/executing, etc. until yesterday.
    I was adding some functionality that required I add an RFC to the model (which I have done dozens of times before), etc. I had the code all ready, then I deployed and received an error message from the server that starts:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create delegate for component com.linxas.applications.ofi.OFI. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
    I searched the forum and found several posts that talked about repairing, rebuilding, redeploying, etc. However none of those options has done anything for me. I always end up with that error.
    When I do a repair on the dc, an odd thing happens. I loose reference to two variables (one is the ECLIPSE_HOME and the other is the JRE_LIB. I also loose two external jars, the ones for SapMetamodelDictionaryContent.zip and SapMetamodelWebdynproContent.zip. These four entries are missing everytime I do a repair/rebuild. I have to manually put them back.
    I have tried deleting the project and reimporting, no change. I tried removing the application through VA before deploying, no change.
    I get absolutely no errors in the Task panel, everything seems fine. Just to reiterate I have been working on this DC for months without a single issue. Why would the IDE just start barfing on this like that?
    Any help would be greatly appreciated.
    FYI, I inherited another DC at the same time and have been doing similar work on it, but have not had this problem (yet?).
    Edited by: Tom Cole on Jun 3, 2009 1:44 PM

    Just to clarify there are no errors with this project whatsoever in the IDE. The project compiles fine and deploys without an issue. Therefore the Problems tab (Tasks on my IDE) shows all is well as does the build log.
    Nothing has made even the slightest difference on the server. I still always receive the same error. Here is the entire stack trace:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create delegate for component com.linxas.applications.ofi.OFI. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
         at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:110)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.<init>(DelegatingComponent.java:51)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:381)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:357)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:670)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:267)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:706)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:660)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:228)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:56)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:40)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:74)
         ... 27 more
    Caused by: java.lang.NullPointerException
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.fillInName(NodeInfo.java:610)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.toString(NodeInfo.java:621)
         at java.text.MessageFormat.subformat(MessageFormat.java:1230)
         at java.text.MessageFormat.format(MessageFormat.java:825)
         at java.text.Format.format(Format.java:133)
         at java.text.MessageFormat.format(MessageFormat.java:801)
         at com.sap.tc.webdynpro.services.exceptions.WDException$DummyLocalizableTextFormatter.<init>(WDException.java:71)
         at com.sap.tc.webdynpro.services.exceptions.WDRuntimeException.<init>(WDRuntimeException.java:55)
         at com.sap.tc.webdynpro.services.exceptions.WDRuntimeException.<init>(WDRuntimeException.java:48)
         at com.sap.tc.webdynpro.progmodel.context.ContextException.<init>(ContextException.java:78)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.addItem(NodeInfo.java:291)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.<init>(NodeInfo.java:123)
         at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.<init>(DataNodeInfo.java:74)
         at com.sap.tc.webdynpro.progmodel.context.ContextInfoFactory.createNode(ContextInfoFactory.java:32)
         at com.sap.tc.webdynpro.progmodel.gci.GCIContext.createNode(GCIContext.java:28)
         at com.linxas.applications.ofi.wdp.InternalOFI.wdCreateNodeInfos2(InternalOFI.java:3511)
         at com.linxas.applications.ofi.wdp.InternalOFI.wdCreateNodeInfos1(InternalOFI.java:3429)
         at com.linxas.applications.ofi.wdp.InternalOFI.<init>(InternalOFI.java:1811)
         ... 32 more
    Edited by: Tom Cole on Jun 4, 2009 1:49 PM

  • Create a Custom Component With Custom Shape

    Hi all,
             I want to create a Component that should have a CustomShape.
             I will explain this in detail ,Suppose now we have a Button, Button will be having some Rectangular Shape, But in my Case i dont want this    Rectangula Shape, I will be giving x and y positons Depending on that positon It has to form a Component.
             Any Help is Greatly Appreciated.

    Even if you use transparent images, you will still end up with a rectangular bounding box.
    You can use programmatic drawing and get a shape that does not involve a rectangle:
    http://livedocs.adobe.com/flex/3/html/help.html?content=skinning_6.html
    http://livedocs.adobe.com/flex/3/html/Drawing_Vector_Graphics_5.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=Drawing_Vector_Graphics_4.html
    If this post answers your question or helps, please mark it as such.

  • Creating a custom component is causing a strange scoping issue

    I am a fairly new user to Flash and Actionscript, but I have
    a fair amount of experience working with C and Java. I'm currently
    working with Actionscript 2 in Macromedia Studio 8. I was trying to
    create a new component for a project I am working on, and I
    followed the tutorial in the help and all testing works while I am
    in context of the flash document where I export the component from.
    However, I try testing my component in a new blank document and I
    get some strange behavior.
    I am able to create a component on the stage, and adjust the
    properties perfectly fine. However, when I test the file, the
    variables for colors go out of scope. That is, the adjustments I
    made to the component through the parameters panel, and saw updated
    on the stage aren't demonstrated at runtime. The Number variable I
    used however is preserved. I did some traces, and it appears that
    this is happening because at runtime in the new blank document, the
    variables in the onEnterFrame method go out of scope, where they
    weren't before.
    It seems really strange to me that I should be able to edit
    the color on stage but have it revert while it is running. My
    intuition says that if it wasn't going to work in the new document,
    that it shouldn't work in either case.
    Anyway, here is the code for the .as file, I hope I'm just
    doing something stupid.

    There seems to be a little confusion here. Think of it this way:
    A basic UIComponent by itself is not visible; you can add something you can see to it to make a visual custom component. For example, a ComboBox component is a UIComponent with a ComboBox added to it.
    The UIComponent is the lightest weight component available from which you can create other components. I use it as the base for custom components that the user cannot see, like a data manager.
    HTH,
    Carlos

  • How to create a custom component in Integrator

    Hi everybody, I'm trying to develop a custom componente for Endeca Integrator, following this guide:
    http://www.cloveretl.com/blog/creating-your-own-component-in-cloveretl-step-by-step/
    but, even if I installed Plug-in Development Environment (PDE), I can't see plug-in options in File->New->Others section, so I can't follow guide steps.
    Is there any problem with my configuration of Integrator? Why can't I see plug-in development/deployment options anywhere in Integrator?
    Is there eventually another way to implement a custom component in Integrator?
    Thanks for your replies!

    No, it doesn't. It's like PDE has never been installed, but I try to reinstall it through "Help"->"Install new software" I receive an error because the plug-in is installed.

  • Help with where to begin creating a custom GUI?

    Links to good tutorials helpful.
    Basically I have never created a GUI for java beyond your basic text box, radio button, button etc.
    I need to create a GUI using custom images for the buttons, images etc. I kind of don't know where to begin since all I have done prior is create a GUI with functionality already present in java. I need drop down menus etc.
    Any help is appreciated.

    All of this functionality that you are mentioning is available with Swing. You can do a google search for java Swing tutorials; if you need further help, please visit the Swing forum.

  • Wanted to create a customized error message

    Hi,
    I am using oracle reports 6i.
    My reports has a parameter form to input
    start date and end date.
    If i enter valid dates my report is executed.
    Now i want to validate the dates.
    If some enters a wrong date format oracle reports does not allow this and returns with a message
    "REP-0613: Value does not match mask 'mm/dd/yyyy'. ORA-01858: a non-numeric character was found where a numeric was expected REP-0091: Invalid value for parameter 'STARTDATE'."
    Now what i need to do is instead of the above message i want to show "Start date format is incorrect" Is this possible in oracle reports 6i.
    I know i can control this using javascript.
    But i want to know does oracle reports support this feature
    Thanks In advance!
    Shailesh

    There are many ways to do it. I do not like the simple solutions. so here is one dirty one.
    Change the datatype of the date parameters to char and get rid of the format. Use validation triggers to check that the enetered value is a valid date.
    null

  • Huge pain Creating a Custom Component with lots of pins

    hello
    I am trying to create an ATmega 128 MCU in multisim that I plan on using to layout a pcb in utiliboard with. SInce this is just for pcb layout purposes I can care less about adding a spice model. I did the "component wizard" and selected "layout only (footprint)" I chose the TQFP-64 package and all is well. I get to step 4 where i "set pin parameters" and this is where I enter the names of the pins. The problem is that this takes a long long time. I thought there has to be some way to import the pin names from a spreadsheet but I couldnt find any way! The only way I can add them is by selecting each cell in excel and copying then going to multisim and selecting the next cell and pasting. I cannot copy and paste a whole column. This would take hours to do for a chip with over 100 pins. The next step "map pins" takes a long time too. I have to individually click between the cells. Is there any way to map everything at once using the same order?
    Also unrelated question. whats the difference between the "TQFP-64" and "TQFP-64L" in multisim? the look identical to me, not sure what the L suffix does.
    Thanks

    Hi smithman,
    It is not possible to import pin names from an excel spreadsheet at this time. I will pass on your concerns to R&D.
    The "TQFP-64" and "TQFP-64L" are quite different if you take a closer look at them. It depends on the manufacturer which one they use for their parts.
    Sorry I could not be of more help.
    Regards,
    Tayyab R,
    National Instruments.

  • How do you create a Custom Component?

    I've made use of a few custom components available on the web
    (IE. a custom fire component from gskinner.com) which made me
    realize I haven't come across any way to make my own components. I
    don't have anything particular in mind at this time, but I can see
    it as an important tool in generating standard re-useable effects.
    Anyone know of the basic process?

    Dear Alberto,
    Check this post.
    Might help.
    PCD content of Netweaver 7.0 available in Netweaver 7.3
    Kind Regards
    /Ricardo Quintas

  • Scroll bar, buttons and a Custom Component - help

    Thanks to another forum I was able to create a scroll panel and add a scroll bar to it.  That works fine.  Inside the scroll panel I have thumbnails of the product that I'm highlighting.  I want to be able to click on the thumbnail and have a full size photo of the product come up in the window next to the scroll panel.  I created a custom component that has a stage showing each full size product individually.  This worked fine when I simply had buttons and no scroll bar.  I could convert the thumbnail to a button and then add interaction so that it would go to the proper state of the custom component.  Where I'm having problems is now that I've imbedded the buttons in a scroll panel I'm no longer given the custom component as an option to pick from.  I can add interaction, but it only gives me the option of picking one of the pages, and not a component.
    I've attached a screen grab to help show what I'm describing.
    Any ideas?
    Doug

    Doug, thanks for asking this question.
    Hi ADAM...
    It seems that a lot of us are asking the same question: Scrollbar Navigation-Make Actionable
    (I created a low-fidelity proof-of-concept to test—using a datalist as you suggested. See link in my posting).
    I have reviewed the video you refer to here, but you example still does not allow for individual items in the datalist (scrollbar) to be assigned individual actionable events.
    Can you expain your thinking in Option 1, as a workaround? Do you have any other suggestions?
    BOTTOM LINE
    We are all looking to do the same thing... something we are going to see A LOT MORE of after Uncle Steve's TABLET presentation next week:
    A scrolling menu, with selected items in the menu causing "navigation" to a certain point in a scroll panel. (imitating the flick or slide effect of iPhone).
    Suggestion: Can you add a field to thedatalist so that when the "repeated item" (in edit mode) is configuredto do an action (i.e., On-Click, Transition to State), we can then assign the state  you'd like for each item in thetable itself?
    Now the issue is making it change the "State" within another component (i.e. scrolling panel). Can that be done?
    Thanks,
    - Rick

Maybe you are looking for

  • Can you combine multiple itunes accounts into a single one?

    I set up separate itunes accounts for my (2) sons (8 & 10) because one had an iPod and the other had an iTouch.  They just got an iPad for X-mas (that they'll share) ... I want to set up the iCloud and create a "joint" account.  Is it possible to com

  • XML parsing in UDF

    Hi everyone! First, I must say that I don't know anything about java/XML programming(I'm sorry)! I'm just looking for some guiding lights for the following; In the Message Mapping (IB), I'm trying to do a RFC Lookup to R/3 using a BAPI call.  I follo

  • Unknown error occured (-200)... Help!!!

    Every time I try to open iTunes, this is the message that pops up. Does any one know what to do. I've tried reinstalling and restoring my computer, but I can't seem to get anything to work. Ideas? please. Thank you!

  • Calculating percentage change in pivot table

    Hi, In my requirement i want calculate percentage change of revenue in month wise(i.e.,by comparing current month previous month).that result should display in pivot table.but iam not getting values.can any one know.plz give sol ASAP

  • No geometry validation on insert ?

    Hi! How come Oracle let me insert a non-closed polygon in an spatial-indexed table ? When I run SDO_GEOM.VALIDATE_GEOMETRY() I get the right error code (ORA-13348 polygon boundary is not closed) but I really CAN insert it !!! Here's the polygon i've