How to call mouse event on particular treecell

how to call a mouseevent on a particular Treecell of a Treeview
I have tried with setcellfactory but the effect is applied to the whole TreeView. How can i apply it to a particular TreeCell

How can it be? It seems not.
Please allow me to clarify my problem-
I have jcomponents on a layer of jlayeredpane.
Now I can use MouseListener on the layeredpane.
Like to get coordinates of the mouse and showing in a textfield -
private void jLayeredPane1MouseDragged(java.awt.event.MouseEvent evt) {
         projectNameID.setText("Mouse dragged");      
    private void jLayeredPane1MouseEntered(java.awt.event.MouseEvent evt) {
        projectNameID.setText("Mouse entered");
    private void jLayeredPane1MouseExited(java.awt.event.MouseEvent evt) {
        projectNameID.setText("Mouse exited");       
    private void jLayeredPane1MouseMoved(java.awt.event.MouseEvent evt) {
        projectNameID.setText("Mouse moved");       
    private void jLayeredPane1MousePressed(java.awt.event.MouseEvent evt) {
        projectNameID.setText("Mouse pressed");
        currentPoint.setText("("+evt.getX()+" , "+evt.getY()+")");
    }                                          But when my mouse moves on the jcomponent created on a layer then the mouse events don't work.
That means I need to add mouse event for that component.
Now how can I do that?
Edited by: fireball003 on Feb 28, 2008 1:12 PM

Similar Messages

  • How to adjust mouse event with scaled DesktopPane

    Hi
    I am manjunatha, i am developing Data warehouse product, in this, i am showing inter-related Transforms in desktop pane, i given option to view the content of desktop pane with different scaled factor (ex 100%,50%,25%), when i will scale the content of desktop pane using Graphics class, only content will be scaled, but the events on the Internal frames will be referring 100% view only,(ie mouse event will not effected by scaled factor, so it will be point to 100% view points only, ex at first an Internal Frame will have bounds(10,10,200,200), after i will scale this to 10%, it will be drawn with (1,1,20,20) on the desktop pane, but internally its bounds will be (10,10,200,200) and mouse event will detect Internal Frame at (10,10,200,200) location , instead of scaled (1,1,20,20) location.
    My question is how can i scale the Internal Frames and adjust relevant events to it?
    (You can see screen shot of this page with (Mapplet View as screen name)
    At www.MyDataWarehousing.com)

    Did you ever find a solution to this? How did you scale all the components on resize?

  • How to limited mouse event in JPanel?

    I have a Jpanel with implements mouseListenert(mouseExited), how to limited the mouse event?
    this how to work:
    1. when my mouse exit ( move out) the jpanel, jpanel will disapprear and it's work
    2. in jpanel i add Jtextfield ( jpanel.add(Jtextfield) ). This is the problem, when my mouse over the jtextfield ( where jtextfield is in the jpanel ) my jpanel disapprear. It mean that when my mouse over jtextfield, my mouse exit from jpanel too.
    So how to limited mouse listener or what must i do?

    i don't know how to do that can you modify this sample code, that the child component do nothing when my mouse over it
    JTextField tf = new JTextField();
    JPanel panel = new JPanel();
    panel.addMouseListener(new MouseAdapter() {
             public void mouseExited(MouseEvent e) {
              panel.setInvisible(false);
    panel.add(tf);thx..

  • How can differ mouse event?

    In an mouse event, how can i find out whether right_button is clicked or not left_button?

    Try the following:
    if (e.getModifiers() == MouseEvent.BUTTON1_MASK) {
        System.out.println("Left mouse button was pressed");
    } else if (e.getButtonMask == MouseEvent.BUTTON3_MASK) {
        System.out.println("Right mouse button was pressed");
    }cheers,
    Greg

  • How to call server event in DO INIT method of view

    Folks,
    I have declared a server event in the view and when I am trying to call that event in DO INIT method of view , it is not firing the event .
    <i><b>
      public void wdDoInit()
        //@@begin wdDoInit()
        // set icon file names
        wdContext.currentContextElement().setIconLeftArrow("topLvlScrollerLeft.gif");
         wdContext.currentContextElement().setIconRightArrow("topLvlScrollerRight.gif");
        // hide display when errors during startup
         if(wdContext.currentContextElement().getErrorDuringInit())
              wdThis.wdFirePlugOutEmpty();
         wdThis.wdGetDaylyChangeModeAction();</b></i>

    I have created a action event
    <i><b>  public void onActionDaylyChangeMode(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionDaylyChangeMode(ServerEvent)
         wdThis.wdGetVcCatRecordEntryInterfaceController().blcEvent(VcCatRecordEntry.ACTION_CHANGE_MODE);
         wdContext.currentContextElement().setSelectedTab("TabCatRecordEntryDay");
         wdContext.currentContextElement().setTemp("Changed Tab");
        //@@end
      }</b></i>

  • How to call the event handler of other application....?

    Hi,
    I am working  on two applications.
    Now  i need to call a Event handler from my first application to my second application.
    I need a same process in this aaplication also. So i need to call the event handler of that application.
    So, Kindly tell me about the process to call the even handler of another application.
    Thanks in Advance.
    Regards,
    Prithivi

    hi,Prithivi..
    Unfortunately, as far as i know, i should tell you that : you cann't call the event-hanlder in another Application if the 2 applicaions are run in different IE browser...
    If your 2 component are used in the same IE browser, maybe you can make one interface event, and trigger it in one component, then handle the event in the second component(by reimplemented the former)...
    However, from your description, i think, you want to trigger the event handler in another application in different IE Browser...
    So, very upset..We cann't communicate between the 2 applications, as far as i know...
    Best wishes.

  • How to call an event

    hi all.
    i have a jframe that implement window listener...
    what im trying to do is in windowopened i will check for a certain date and if that date is met i want it to call the windowclosing event...
    i dont wanna do it in other ways because in window closing event im deleting files and it wont work any other way...
    thanks in advance...

    Hi,
       While calling the event from wdDoInit(), you can just say
    wdThis.onAction<event name>(null);
    But make sure that within the event handler, wdEvent is nowhere used.
    Regards,
    Satyajit.

  • How to bind mouse event in 3D

    I want to bind mouse click event of a simple button with z>0,
    but the area can cause the event of the button is wrong. Much small than the shape I can see in player.
    I don't know what should be noticed when bind mouse event in 3d?
    looking forward your answer, thanks a lot.
    in document class, i wrote:
    this.x = 0;
    this.y = 0;
    this.z = 10;
    this.btnPrev.addEventListener(MouseEvent.CLICK, this.onPrevClickH);
    //btnPrev is added by flash IDE

    this.x = 0;
    this.y = 0;
    this.z = 10;
    this.btnPrev.addEventListener(MouseEvent.CLICK, this.onPrevClickH);
    //btnPrev is added by flash IDE
    You are changing the z position of the Main Timeline object... I think you want the button to change z pos, not the whole timeline. If you just change the z of the button the hit area will work as expected. So, the code above would be:
    btnPrev.x = 0;
    btnPrev.y = 0;
    btnPrev.z = 10;
    btnPrev.addEventListener(MouseEvent.CLICK, onPrevClickH);
    //btnPrev is added by flash IDE

  • How to call click event to HorizontalList item after it's been initialized

    How do I to call the click event of a HorizontalList item
    after the dataprovider property of the HorizontalList object's been
    set and the first item's been created. I need to call it's click
    event.

    http://www-03.ibm.com/support/ezserv/home.jsp

  • How to process mouse event in the Label control?

    I am now tring a MorphFx program which would like implements a Squeak-Like-Morph operation for JavaFX nodes( include shapes, controls and others). currently it is only a prototype on [http://code.google.com/p/wangzaixiang/wiki/MorphFx]
    and there is webstart demo: [http://wangzaixiang.googlecode.com/svn/trunk/LearnJFX/dist/LearnJFX.jnlp]
    and a applet demo: [http://wangzaixiang.googlecode.com/svn/trunk/LearnJFX/dist/LearnJFX.html]
    There is a problem for new created Label control, which dont fire the "onMousePressed" or other "onMouseXXXX" event, and i have not found any way to do that.
    Can somebody tell me how can i add a onMousePressed event to a label and make it works?
    Very thanks.

    I can confirm the same behaviour when you try to capture eg the mouse clicking events on a progress indicator (also MouseMove). These kind of things are a bit useless most of the time in apps, but nevertheless in fact their event listeners should be correctly implemented or otherwise well documented if not. And in my opinion the javaFx API as well as the language specification/documentation can be far more written in details as it is now. So actually I don't know if SUN wanted that kind of behaviour for controls like that or not.
    Somebody from the javaFx SUN team can answer perhaps ?
    PS
    Of course a workaround with shadow node behind works well if the events will propagate through the label. I didn't test it but think this will work.
    -G
    Edited by: guyvo on Jan 19, 2010 1:50 PM
    Edited by: guyvo on Jan 19, 2010 1:55 PM

  • How to get mouse events inside the components of a JTable

    Hi!
    I have question, I think this is related to very basics of swing, however I couldn't find a solution/answer on the web.
    I have a JMyTable(a descendant of JTable), and one value on a row/column is a special class, ie. MyClass. for this class I registered a cell renderer, MyRenderer. and this renderer returns a JMyComponent, which is actually a descendant of JComponent.
    Now, if I call enableEvents(AWTEvent.MOUSE_EVENT_MASK) in the constructor of JMyTable I get events posted on processMouseEvent method. However, the same doesn't work for JMyComponent. I mean, I call enableEvents, however processMouseEvent method is not triggered.
    Could someone explain/help me with this issue?
    Thanks,
    Ozgur

    Your cell renderer components are just that: renderers. They're not added to the table and do not appear in the component hierarchy. This is because tables may be very large and adding components in would be very resource hungry.
    See here for details
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    If you want to detect events you will need to listen to events on the JTable itself, and use the rowAtPoint()/columnAtPoint() methods to determine the cell. So for instance where you might want mouseEntered() on your cell component you would have to use mouseMoved() on the table and detect when the cursor moves to a new cell.

  • How to listen mouse event when drag on popup menu

    hi, all
    Please explain: When the Frame show, click mouse (left/right) on title bar of Frame, the popup menu will be show
    I Expected :
    When drag mouse on this popup menu will System.out.print("Mouse dragging on popup...");
    Thanks many,

    I know this popup is managed by window
    How to I can get mouse action on it ?

  • How to call trigger event when the checkbox is checked using custom.pll

    Hi,
    In recipt form i have one checkbox.when i check the box the popup should be open.
    how to check the check box is checked or not.
    any one help.me.
    Regards,
    M.Soundrapandian.

    You can probably do this easier using forms personalization - pl see ML Doc 279034.1 for details
    HTH
    Srini

  • How to call an event from simple tree menu

    I have a simple tree menu that when I click on a menu item,
    id like a picture or other data to appear on the right side of the
    page.
    Thank you in advance,
    Jim

    The reason why it becomes zero when you press stop is that you selected the control to get the default value in the event structure if it's not connected. You can fix it by connecting it like I did in the first picture.
    To make it stop when you press the stop button you have to connect one stop button to the loop exit terminal. The reason for the sequence structure that I added is to make sure that the loop exits the first time you press the stop button, try removing it and you'll see what I mean.
    You have one additional problem. You rely on the x+1 output of the sub vi as an input for the next iteration. However, that is not reliable since if you can the subvi from somewhere else it might mess up the count. You're better of using a shift register and passing in the last value to the subvi in each iteration.
    Attachments:
    1.png ‏9 KB
    2.png ‏10 KB

  • How to call Event ?

    How to call an event when any record is changed (Bussiness object  'Record') in Record management System ?

    Hi,
    Check the below links. It gives a fair idea on calling the BOR method and events through reports.
    how to call BOR object-> method in custom program
    http://help.sap.com/saphelp_40b/helpdata/en/c5/e4b198453d11d189430000e829fbbd/content.htm
    Rgds,
    stck

Maybe you are looking for

  • Inline XML Publisher PDF rendered using IFRAME in Self Service

    Hi, We have created an XML Publisher Report (PDF) which renders inline in a SelfService Page. When we click on the Save Icon in the IFRAME, The File Name is really long including the Applications URL, DBC File, File Name etc. Ex: http___it21.marvell.

  • Delete audit and trace files

    Is anyone aware of why we should not delete audit and trace files under the oracle admin directory that are over 30 days old? I don't know that there is anything in place to do this and they are building up. Tuldcorpadb01:/oracle is at 96%. These fil

  • I lose DW CC everytime I restart

    I"m having trouble with keeping dreamweaver cc trial on my pc when I restart it. I download the trial and all is well. everything runs great untill i restart. Then it tells me i dotn have permission to access the file etc. I have to unistall and then

  • Alignment in sapscript

    Hello Gurus, What is the trick to get the columns align?, I want to fix the size of the column, if the description of the material has a long name (40 characteres) the data goes right, if the name of the material is short goes left. So How difficult

  • Boadermanager log file error

    My log files are not being created. On the server I am getting this error: Waiting to read the SAS context from NDS.Error 1 creating log file "100330.log"