Google Groups Home
Help | Sign in
Creating A New Clickable Object
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
nickgravelyn@gmail.com  
View profile
 More options Aug 15 2006, 1:12 pm
From: "nickgrave...@gmail.com" <nickgrave...@gmail.com>
Date: Tue, 15 Aug 2006 17:12:37 -0000
Local: Tues, Aug 15 2006 1:12 pm
Subject: Creating A New Clickable Object
I'm trying to make a clickable panel class by subclassing the
PopupPanel and implementing the SourcesClickEvents, however, I can't
seem to figure out how to get basic functionality. I'm sure I'm missing
something like registering my class with some overhead class that
handles input, but can anyone help? Here's my little class:

public class ClickablePanel extends PopupPanel implements
SourcesClickEvents {
        private ClickListenerCollection listeners = new
ClickListenerCollection();

        public ClickablePanel() {
                super( false );
        }

        public void onBrowserEvent( Event event ) {
                if ( DOM.eventGetType(event) == Event.ONCLICK )
                {
                        listeners.fireClick( this );
                }
        }

        public void addClickListener( ClickListener listener )
        {
                listeners.addElement( listener );
        }

        public void removeClickListener( ClickListener listener )
        {
                listeners.removeElement( listener );
        }


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mat Gessel  
View profile
 More options Aug 15 2006, 1:20 pm
From: "Mat Gessel" <mat.ges...@gmail.com>
Date: Tue, 15 Aug 2006 10:20:59 -0700
Local: Tues, Aug 15 2006 1:20 pm
Subject: Re: Creating A New Clickable Object
It is as you say. You need to call sinkEvents(Event.ONCLICK) in the
constructor.

-= Mat

--
Mat Gessel
http://www.asquare.net

On 8/15/06, nickgrave...@gmail.com <nickgrave...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google