Add up Events from the outside

I create a component to add to my applications; it's made by 3 buttons, that's it:
[<img source=http://img65.imageshack.us/img65/8781/slyu2.jpg>|http://img65.imageshack.us/img65/8781/slyu2.jpg]
on the component class I wrote the actionListeners on the side buttons to change the text of the central button.
Now I'd like to set actions when the user press the buttons outside the component and to keep the old action; I'd like something similar:
Slider.setClickEvent(){
} without overwrite the component event to change the central button text. May I do this?
Edited by: cassio_steel on Aug 25, 2008 8:32 AM

Sorry, I didn't explained it very well...When the user click on the side button I'd like two things to happen:
1) change the text of the central button
2) run other istructions (example: something happens on the others components where my component has been added)
The first one has been written on the component's class, and the second one i'd like to be written in a specific method outside my component's definition, like this:
Mycomponent comp=new Mycomponent();
comp.setAction(){
panel.add(comp);Is it clear?

Similar Messages

  • Recieving accordion event from the "outside"

    hi;
    i am using the accordion and need to keep track of events,
    specificaly, the only thing i need right now is to know the new
    currentPanelIndex of the accordion after someone clicked a panel.
    what is the best way to do this?
    i already tried hacking the spry.js(hacked into the openPAnel
    function), it worked but i do not want to touch the JS file (so i
    dont have to do this on every upgrade). i
    also tried doing it from the "outside" but i could not get
    it to work (after creating the accordion, i took the panels from
    the accordion, looped and got the tab from each panel and used
    addEventListener(tab,'click',myfunc,false) but in the first
    iteration after the call to addEventListener the loop did not
    continue ).
    any help is appreciated.
    thanks,

    You can extend it from the outside by defining a function
    that overrides openPanel() with a function that calls the original
    openPanel() and then executes whatever code you want. The function
    would look something like this:
    function ExtendOpenPanel(acc)
    var realFunc = acc.openPanel;
    acc.openPanel = function(panel) {
    realFunc.call(acc, panel);
    /* Add your code or function call here! */
    Then call the function after you create the widget:
    var acc1 = new Spry.Widget.Accordion("acc1");
    ExtendOpenPanel(acc1);
    --== Kin ==--

  • If is possible to add new local var to sequence from the outside?

    If is possible to add new local var to sequence from the outside?
    I mean insert a new local variable to Sequence.Locals list or via expression, or by LabView VI (Sequence Context). or any another way.
    Thanks.

    Hi,
    The simplest way would be to use the API TS method PropertyObject.SetValBoolean, PropertyObject.SetValNumber or PropertyObject.Set ValString. With the SequenceContext you create a PropertyObject using the method SequenceContext.AsPropertyObject, which you use as the reference for the the SetVal method.
    For the SetVal method, pass the full lookup string of your variable eg "Locals.MyString" and set the option parameter to 0x01 (insert if missing).
    If you are calling this from LabVIEW, then use the SetVal property VI.
    This will insert a varable into the Locals that is "in scope" of the step that is performing the task. 
    In the TestStand Help - "Using the API in Different Programming Languages" and in the TestStand User manuals there is more information to help you.
    This will only make a runtime version of your Local. ie when your sequencefile stop executing your Local will not exist in the Static version of the Sequence File.
    Hope this helps
    Ray Farmer
    Regards
    Ray Farmer

  • A Thread manages a connection from the outside--help me to finish it

    **RUN THIS CODE AND HELP ME--- THANKS A LOT**
    EchoClient is thread which manage a connection from the outside.
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.util.Random;
    public class EchoClient extends Thread {
         private ServerSocket listenSocket = null;
         private Socket manageSocket = null;
         private int[] port = new int[9999];
         private BufferedReader in;
         private PrintWriter out;
         private int line;
         private int count;
         // No needed to mention
                //private ClientNode[] clientArray = new ClientNode[9999];
         private ManageClient[] manageClient;
         private final int CONNECTED = 1;
         private final int CONNECTING = 11;
         private final int DISCONECTED = 2;
         public void run() {
              try {
                   manageClient = new ManageClient[9999];
                   listenSocket = new ServerSocket(903);
                   manageSocket = listenSocket.accept();
                   while (true) {
                        in = new BufferedReader(new InputStreamReader(manageSocket
                                  .getInputStream()));
                        out = new PrintWriter(manageSocket.getOutputStream());
                        line = in.read();
         // if Client send a variable(CONNECTING)
                // Server will send to Client a variable(CONNECTED) and port
                //to open a ChatFrame with that port
                        if (line == CONNECTING) {
                             System.out.print("have recieved");
              out.print(CONNECTED);
                         //randomize a port to send to client
              port[count] = (int) Math.ceil(Math.random() * 9999)
                        //creat a manageClient(Thread) to manage a seperate
                       // connection with a seperate Client
                             manageClient[count] = new ManageClient(port[count]);
                             manageClient[count].start();
                             out.print(port[count]);
                             count++;
              } catch (Exception e) {
                   e.printStackTrace();
         public static void main(String[] args) {
              EchoClient e = new EchoClient();
              e.start();
    }And a Login Frame which will send to server a varialble (CONNECTING) which requires to connect and keep waiting for a variable to Open a ChatFrame with a new port
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.Socket;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextArea;
    public class Login extends JFrame {
         public ChatFrame chatFrame;
         private final int CONNECTED = 1;
         private final int CONNECTING = 11;
          * @param args
         public Login() {
              // TODO Auto-generated method stub
              setSize(50, 150);
              JButton loginButton = new JButton("Login");
              JPanel p = new JPanel();
              p.setLayout(new FlowLayout());
              p.add(loginButton);
              add(p);
              loginButton.addActionListener(new ActionListener() {
                   @Override
                   public void actionPerformed(ActionEvent e) {
                        loginServer();
         public void loginServer() {
              try {
                   Socket connectSocket = new Socket("127.0.0.1", 903);
                   while (true) {
                        BufferedReader in = new BufferedReader(new InputStreamReader(
                                  connectSocket.getInputStream()));
                        PrintWriter out = new PrintWriter(connectSocket
                                  .getOutputStream());
                        out.print(CONNECTING);
                        System.out.println("At here");
    //(***position***)
                        int line = in.read();
                        System.out.println("At here1");
                        if (line == CONNECTED) {
                             int port = in.read();
                             chatFrame = new ChatFrame(port);
                             chatFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                             chatFrame.show();
                             connectSocket.close();
              } catch (Exception exp) {
                   exp.printStackTrace();
         public static void main(String[] args) {
              Login login = new Login();
              login.show();
              login.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }and this is ManageClient Thread...
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class ManageClient extends Thread {
         private ServerSocket ssClient;
         private Socket sClient;
         private int port;
         public ManageClient(int port) {
              this.port = port;
         public int getPort() {
              return port;
         public void run() {
              try {
                   ssClient = new ServerSocket(getPort());
                   sClient = ssClient.accept();
                   while (true) {
                        BufferedReader in = new BufferedReader(new InputStreamReader(
                                  sClient.getInputStream()));
                        PrintWriter out = new PrintWriter(sClient.getOutputStream());
                        String s = in.readLine();
                        if (s != null)
                             out.print("have recieved");
              } catch (Exception e) {
                   e.printStackTrace();
    }my problem...
    At firts EchoClient will run.. and then Login but when I click to the Login button it has just only did before int line = in.readLine();(*** postion ***)
    I don't know why it doesn't continue. It stops here and the login button is still visible(cause code has not finish)..
    That's my problem...
    Somebody help me
    Edited by: rockfanskid on Oct 17, 2007 4:25 AM

    Somebody helps me to finish this project...
    thanks for racing this thread

  • ICal - I have all the events from the past decade listed for this week

    My iCal calendar has every event from the last ten years listed in every day - each event is tagged 'repeat Every day' and 'end Never'. I have a non-corrupted version on my iPhone. I have tried restoring from Time machine and this works but then reverts to this confusion. I even deleted the .plist.
    HELP - my Calendar is my life (and my history)

    Greetings,
    Remove the following to the trash and restart your computer:
    Home > Library > Caches
    Home > Library > Calendars > Calendar Cache, Cache, Cache 1, 2, 3, etc. (Do not remove Sync Cache or Theme Cache)
    Home > Library > Preferences > com.apple.ical (There may be more than one of these. Remove them all.)
    __NOTE: Removing these files will remove any shared (CalDAV) calendars you may have access to. You will have to re-add those calendars to iCal > Preferences > Accounts.
    If the events remain:
    Reset your Sync history: http://support.apple.com/kb/TS1627
    Then restore from your backup.
    If that does not work let us know.

  • I recently updated my iPhone 4s to ios6, and lost 1200 odd contacts. I have a backup from about 4-5 months ago avaiable.  Can I add/update contacts from the back up rather than restore which i assume will literally delete any new contacts added...?

    I recently updated my iPhone 4s to ios6, and lost 1200 odd contacts. I recently sold my macbook air and also my mac book pro, so have no recent backups avaiable.  I have a backup from about 4-5 months ago available on an external hdd as a time machine backup.  Can I add/update contacts from the back up rather than restore?  The reason i wish to do this is because in the update i didnt lose any messages, so all of the people i have met and networked with since that last update those many months ago, i have in my messages listings.  They are all unidentified numbers at present but over time i will be able to work through the messages and based on the conversation recall who each was with.  Also, yesterday, some two weeks after the update had left my contacts list entirely empty... a vast majority just reappeard, though all of them are without any phone numbers, all just emails or facebook contacts.  This is the work of facebook not mac/ios6 isnt it...?  Any help here would be greatly apprecaited.  I am about 2 days from flying to canada and having those contacts would make life a lot easier.

    You should be syncing your contacts with an app on your computer or cloud service (iCloud, Gmail, Yahoo, etc), and not relying on a backup.  If you haven't been doing this, start now and then restore your old backup.  You will then be able to sync the new contacts back into the phone.  However, you will lose all messages, etc newer thant the backup.

  • How do I add a contact from the same company to my address book?

    How do I add a contact from the same company to my address book? I do not want to re-type all of the information. Thanks for your help.

    Any card in your address book can be duplicated. Select the card within the Name column, and use the Edit > Copy menu item followed by the Edit > Paste menu item. Then you can update the card copy and only change the name/email/phone fields as needed.

  • Is there a way to add/delete words from the predictive text ?

    Is there a way to add/delete words from the predictive text options that my iPhone is giving me? I'm using an iPhone 6 Plus with iOS 8.
    There are specific words that are popping up in the area right above the keyboard where it displays 3 word suggestions to choose from. This area seems to suggest words that I have typed before, I'd like to remove these words. Default seems to select the word in the center and when I'm typing fast on occasion it will recommend and select words that I don't need to use.
    Any help would be appreciated.

    999753 wrote:
    I know in 10g delete is added but in 9i i can only work with UPSERT( update, insert)
    is there a way to add delete into 9i MERGE? or somehow encapsulate it?
    Thank youI would suggest upgrading to a supported version of the database. 9i has been unsupported for many many years now.
    And to answer your question... to the best of my knowledge, there is no workaround. It works as it works.

  • I can't synch my iPhone with iTunes because the device does not show up in a device window when I plug it in...it's missing in action and thus I'm not able to add any content from the iTunes to my iPhone, e.g. podcasts

    I can't synch my iPhone with iTunes because the device does not show up in a device window when I plug it in...it's missing in action and thus I'm not able to add any content from the iTunes to my iPhone, e.g. podcasts.   All the instructions on synching start with "find your device in the device window".  But what if you have no device window?

    Missing "message" from above: The iPad "DGMTR" is synced with another iTunes library on DGMTR's MacBook Pro. Do you want to erase this iPad and sync with this iTunes library? An iPad can be synched with only one iTunes library at a time. Erasing and syncing replaces the contents of this iTunes library.
    I thought the libraries were the same.

  • How can you erase a certain event from the iPad2 but keep it in iPhoto?

    I have two events that were split up by iPhoto when it synced to my iPad2. Collectively there re about 400 photos in the two events and they were split into over 50 separate events some labeled sequentially as 102IMPRT 103IMPRT....and so on, and otehrs labeled with the original event label.   I have not been able to regroup the events. they are still OK as two Events in iPhoto. My latest idea is to try to export the files from iPhoto without the geo and file name to a folder. Erase the events in iPhoto and then reimport them  into new events in iPhoto. Then sync to iPad.
    Before I did all that I wanted to remove the split events from my iPad. I tried to remove them from the iPad by unchecking the source events but checking all others in iTunes before syncing but that doesn't work probably because the pieces all have different names in the iPad. Maybe unchecking the events just doesn't sync them or make any changes..I thought that if you unchecke the events it would remove them. The real problem probably is that the spit events don't exist in iPhoto.
    I did remove them from the iPad once by checking sync with nothing by unchecking iPhoto in iTunes. But that removes the whole library of 10000+ photos. I did that and restored an old library from before the time the events were split (from Time Machine) then resynced with the newest iPhoto and it split the same two events again in pretty much the same way. I got nowhere and it took 4-5 hours to delete and reload the10,000 photos.
    Is there any way to remove events from the iPad that the crazy sync is creating, and don' t exist in your iPhoto library or on your iMac and iTunes without destroying the rest of the library of photos on the iPad??

    I tried syncing with the sources unchecked so no photos would sync. When it got done it erased all the library photos except the messed up events, they remain on the iPad. The Vacation photos are in two albums, one is called camera roll, and the other improted photos. None of the photos were taken with the iPad camera and should not show up in camera roll.
    At this point I am going to restore iPad2 to factory settings and sync from computer not backups and see what happens!

  • How do i add an event to the calendar of my ipad?

    Just purchased a new IPAD, 1st time user.  How do i add an event to the calendar of my ipad?  i do not have a "+"  symbol.

    Go to Settings>iCloud>Calendar>On then Off. Toggle the on/off setting. If you want to use iCloud with the calendar, leave it set to on.

  • Error while deleting events from the integration event queue

    I am trying to delete all the events from the integration event queue after reading it, like this (this is in Java):
            IntegrationEventWS_DeleteEvents_Input input = new IntegrationEventWS_DeleteEvents_Input();
            input.setDateTime("");
            input.setLastEventId("");
            try {
                 ((Default_Binding_IntegrationEventWS)onDemandStub).deleteEvents(input);
            } catch (Exception e) {
                 log.error("Deleting events from integration queue failed: ", e);
            }Alas, I get the following error message:
    Invalid method parameter(s): 'File Id'(SBL-ODS-50007)What does this mean? What is this mysterious "File Id" it supposedly gets? I don't see it anywhere in the SOAP message I'm sending and it isn't mentioned anywhere in the docs.
    Thanks in advance for any input.

    Dont keep this attributes null
    input.setDateTime(""); //Put a Default Time way in
    the past. Ex:"1/1/2000"
    input.setLastEventId(""); //pass the eventIdThe documentation states that those two are optional (although they are not nillable, for some reason). I tried to set the date to today, but I got the same result. Since setting a date is supposed to delete all events older than that date, I don't think setting it in the past will delete anything.

  • I recently had to completely restore my laptop, so I lost the music on my itunes. It's still on my iphone, but how can I keep the music I already have and continue to add more music from the newly set up itunes again?

    I recently had to completely restore my laptop, so I lost the music on my itunes. It's still on my iphone, but how can I keep the music I already have and continue to add more music from the newly set up itunes again? Is there actually a way to do this? I can't help but wonder what the stupid icloud is for if my music is still somewhere in the 'cloud' but it's zero help for restoring music when it's lost on a computer....any help even a site that get's around apple would be great!

    It has always been very basic to always maintain a backup copy of your computer.
    Have you failed to do this?
    If so, not good, you can transfer itunes purchases from the iphone to your computer.  File>Devices>Transfer Purchases
    You can also redownload some itunes purchases in some countries:
    Download past purchases - Apple Support

  • I am missing the add objects section from the fly out menu in Photoshop CS6. 3d workspace

    I am missing the "add objects" section from the fly out menu in Photoshop CS6. I am in the 3D workspace of Photoshop. "Scene" is highlighted and I have clicked on the little fly out menu in the upper right hand corner of that panel. The whole section that should contain, Add objects, delete objects, duplicate objects, all the way through reverse order is missing. The add lights section above and render section below it is there. I am not new to Photoshop, but I am new to the 3D section of Photoshops work space.
    I do know about creating a new layer in the layers tab and merging the objects together trick. But I kind of would like for the program to work correctly as I am sure that doing it that way will cause some sort of problems later in the work process.
    Below are the specs of my system.
    Adobe Photoshop Version: 13.0.1 (13.0.1.3 20131024.r.34 2013/10/24:21:00:00) x64
    Operating System: Windows NT
    Version: 6.2
    System architecture: Intel CPU Family:6, Model:12, Stepping:3 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2, HyperThreading
    Physical processor count: 4
    Logical processor count: 8
    Processor speed: 2394 MHz
    Built-in memory: 32651 MB
    Free memory: 28832 MB
    Memory available to Photoshop: 29606 MB
    Memory used by Photoshop: 89 %
    Image tile size: 128K
    Image cache levels: 4
    OpenGL Drawing: Enabled.
    OpenGL Drawing Mode: Basic
    OpenGL Allow Normal Mode: True.
    OpenGL Allow Advanced Mode: True.
    OpenGL Allow Old GPUs: Not Detected.
    Video Card Vendor: Intel
    Video Card Renderer: Intel(R) HD Graphics 4600
    Display: 3
    I am actually running windows 8. So I am not sure why it is saying windows NT. Anyway...
    Photoshop says that my software is up to date. I use Photoshop daily and everything else works just fine. I have looked through this forum and there is someone else who had the same issue as me but their question was not given a solution. So that is why I choose to post it again.
    Any help will be great. Thank you!
    Mark.

    I've made tests with four different 3rd party tools: OpenGL Extension Viewer, GPU Caps Viewer, Compute4Cash OpenCL Diagnostic Tool and Mudlord's Glide3x wrapper tester. All those tools report no problems with my video card driver and OpenGL/CL.
    I have contacted nVidia and based on reports from the tools and visual tests from GPU Caps Viewer nVidia support doesn't see a problem with my driver.
    I found sniffer_gpu.exe which according to Adobe Help pages is a kind of diagnostic tool and determines whether Photoshop uses the graphic card OpenCL or not. Here is the output:
    Device: 00000000002B1BE8 has video RAM(MB): 1023
    Vendor string:    NVIDIA Corporation
    Renderer string:  GeForce GTX 650/PCIe/SSE2
    Version string:   3.0.0
    OpenGL version as determined by Extensionator...
    OpenGL Version 3.0
    Has NPOT support: TRUE
    Has Framebuffer Object Extension support: TRUE
    OpenGL ok
    OpenCL ok, version=1.1 CUDA 4.2.1
    Return code: 3
    From Adobe GPU Sniffer tool, it looks OK.
    On the other hand, I have your word that there is no problem with Photoshop not recognizing OpenCL for my card and that nVidia driver has problems. Can you justify this somehow? Perhaps you could provide more details on technical level, or another utility to run and extract details, to at least identify the problem Photoshop has and hopefully solve it on either side.
    P.S. During tests there were two things which I noticed, but they are probably not related to the issue:
    1. One tool reports the lack of Windows registry key SOFTWARE/Microsoft/Windows (NT)/CurrentVersion/OpenGLDrivers. But according to your previous statement, Photoshop only uses OS calls, no registry and according to nVidia, this key is not used in Windows 7.
    2. During some tests GPU Caps Viewer reports that "OpenCL CPU not supported on the selected platform". This is not complaining about GPU, only about CPU. But Photoshop is complaining about GPU, so it shouldn't be relevant.

  • Add a value from the cloud or internet in a cell

    How to add a value from the web,
    need to add the value of the conversion of € to $

    Is it possible to do it now?
    That depends on what the "it" is.   You can automate the data "scraping" part but you can't (until AppleScript support is restored) automate the "pushing" of the retrieved data to designated cells in Numbers 3. 
    Right now the best you can do is have AppleScript arrange the data in a specific format (the tab-separated flavor of "csv" character-separated-values currently works best) on the system clipboard and then you manually paste that where you want it in a Numbers 3.0 table. 
    If the data is already in table form on a website you can often (but not always) just copy-paste. Where AppleScript can be useful, even now, is where the data you want to retrieve is not already in tabular form.
    SG

Maybe you are looking for

  • Installation of Solaris 10 on AMD Athlon processor

    hi, I am trying to install Solaris 10 version on AMD processor(X86 platform). I am using DVD for installation. I am able to complete installation untill system indentification & initialization. After that i am getting problem at the Solaris Install p

  • How to hide navigation button in xml config file

    I have a photo gallery with a navigation button that allows for additional photo categories that I don't want to appear. Unfortunately, I can't open the .fla as it appears to have been created with a newer version of Flash. The code in the config.xml

  • One inspection lot for all GR per day.

    Hi, Presently when I am doing GR for a material system generates a inspection lot per GR.But when I am doing GR for same material several times per day system should generate inspect lot once only.or if material belongs to same supplier also it shoul

  • Reg: URL For c Projects & C Folders

    Hi Experts I'm new to c projects. I'm a PS consultant. I read the course of PLM 510. I would like to practice c projects in IDES. pl let me know which URL i can assign in configuration. other wise how to create URL and and what are all the next steps

  • Unable to verfiy or repair disk

    Hi, I am unable to verify or repair my second partition on my Macbook. I do not get any error codes. Mac OS X Tiger. Version: 10.4.11 Regards, Gokul