thomasacherry | 3 Jul 03:58
Picon

Re: mouse coordinates

I finally got around to try this out, but in my application the bean never receives any 
events.  I don't think Thinlet is passing the events on the my object, does this sound right?

> 
> well.
> the following worked for me.
> 
> in the thinlet xml:
> <panel name="drawingregion" gap="0" top="0" right="0" bottom="0" 
	
> 	left="0" columns="1">
> <bean name="chart" bean="DrawingRegion" weightx="1" weighty="3" />
> </panel>
> 
> DrawingRegion extends java.awt.Canvas
> 
> and in the java code. I placed the following code in the paint() method
> of the thinlet application. could be done anywhere after displaying the
> component containing the Canvas.
> 
> dr = null;
> Object desktop = getDesktop();
> Object panel = find(desktop, "drawingregion");
> if (panel != null) {
> 	Object bean = find(panel, "chart");
> 	if (bean != null) {
> 		dr = (DrawingRegion) getComponent(bean, "bean");
> 
> 	}
> }
(Continue reading)

Koen Roevens | 3 Jul 13:35
Picon
Favicon

Re: mouse coordinates

Yup, that's right.
But you can override the processEvent method of the Thinlet-event to
pass the events to your bean.

Some sample code:
protected void processEvent(AWTEvent e) {		
  super.processEvent(e);
  if (e.getID() == MouseEvent.MOUSE_PRESSED) {
    handleMousePressed(e);
  }
}
	
protected void handleMousePressed(AWTEvent e) {
  Object objectPressed = getObjectMousePressed();
    if (listenerRegistry.containsKey(objectPressed)) {
      // GetApplet
      Object listenerObject = listenerRegistry.get(objectPressed);
      if (listenerObject != null && listenerObject instanceof
EventHandler) {
        if (e instanceof MouseEvent) {
	  translateEvent(objectPressed, (MouseEvent)e);
	}
        ((EventHandler)listenerObject).handleEvent(e);
      }
      // repaint
      this.repaint(objectPressed);
    } 
    System.out.println("Mouse pressed -> [" + objectPressed + "]");
}

(Continue reading)

Jim Liddle | 5 Jul 16:11
Picon

Online Preview of Thinlet MIDP Amazon Explorer

I've been busy with work, and at Java One, but you can now launch the
Thinlet Amazon MIDP Explorer from directly within your browser.

You can check this out at my blog:

http://vehera.symbiandevelopersjournal.com/amazon_explorer_for_j2me_midp
__see_it_here_.htm 

As soon as I get time to clean up the code, I'll post the source back to
this group.

/ Jim

_________________________________________________________________
Thinlet Project Site    | http://thinlet.com
Thinlet Addon Central   | http://thinletplus.com
Thinlet World News Blog | http://thinletworld.com
Thinlet F.A.Q.          | http://xul.sourceforge.net/thinfaq.html 
piotrowski_r | 5 Jul 18:25

right mouse button on Linux not working

Does anyone have a problem with the right-mouse button not working on 
some versions of Linux?

It works for me on Xandros but not on Simply Mepis.

  

Thanks
Robert Piotrowski

_________________________________________________________________
Thinlet Project Site    | http://thinlet.com
Thinlet Addon Central   | http://thinletplus.com
Thinlet World News Blog | http://thinletworld.com
Thinlet F.A.Q.          | http://xul.sourceforge.net/thinfaq.html 
gavin_nunns | 6 Jul 22:37
Picon

J9 patch

I was looking at the patch fix for using thinlet with J9 but the diff 
is fairly different to the current version of thinlet.  Is there an 
easier way than manually working out the changes and rebuilding thinlet 
my self so it works well with J9 on a pocket PC ?

Thanks

Gavin

_________________________________________________________________
Thinlet Project Site    | http://thinlet.com
Thinlet Addon Central   | http://thinletplus.com
Thinlet World News Blog | http://thinletworld.com
Thinlet F.A.Q.          | http://xul.sourceforge.net/thinfaq.html 
Dawid Weiss | 7 Jul 07:40
Picon

Re: J9 patch


You can ask Thinlet developers why this patch (obviously fixing a bug) 
has never been incorporated into Thinlet.... Anyway I don't see any 
other way other then manually diffing and merging the two.

D.

gavin_nunns wrote:
> I was looking at the patch fix for using thinlet with J9 but the diff 
> is fairly different to the current version of thinlet.  Is there an 
> easier way than manually working out the changes and rebuilding thinlet 
> my self so it works well with J9 on a pocket PC ?
> 
> Thanks
> 
> Gavin
> 
> 
> 
> 
> _________________________________________________________________
> Thinlet Project Site    | http://thinlet.com
> Thinlet Addon Central   | http://thinletplus.com
> Thinlet World News Blog | http://thinletworld.com
> Thinlet F.A.Q.          | http://xul.sourceforge.net/thinfaq.html 
> Yahoo! Groups Links
> 
> 
> 
>  
(Continue reading)

Thorsten | 7 Jul 11:52
Picon
Favicon

Icon in the left upper corner

Hi!

How can I display an icon in the left upper corner of my thinlet
application window?

Thanx!

Thorsten

_________________________________________________________________
Thinlet Project Site    | http://thinlet.com
Thinlet Addon Central   | http://thinletplus.com
Thinlet World News Blog | http://thinletworld.com
Thinlet F.A.Q.          | http://xul.sourceforge.net/thinfaq.html 
lkv_metzler | 8 Jul 13:11
Picon

make the method thinlet.invoke(..) protected?

Hi Everybody,

I use jeode on a WindowsCE PocketPC. I want a textfield to react as
soon as a number has been typed in that has three digits. 

I allocated a method fillTextfield(this) to the property 'insert',
which analyses the length of the text. Everything works as desired as
long as I type the text with the keyboard.

However, I need a self-programmed number-pad, because the in-built
number-pad is too big. For this I wrote a method setNumber(this) which
is activated by pressing the button containing the desired number on
my number-pad, as well as a method setFocussedWidget(this) which is
allocated to the property 'focusGained' of the textfield and which
stores the focussed textfield-object to an instance-variable. Writing
the number into the textfield via my own number-pad works fine.

Unfortunately, when using my number-pad, the textfield does not react
to the property 'insert' of the textfield. The method
fillTextfield(..) mentioned above is not activated. Nor is it
activated when I call processEvent with a newly created KeyEvent. 

The only way which I found to work was making the method
invoke(object,object,String) of thinlet protected, and calling this
method after setting the text into the textfield. There is even a
comment: 'TODO make protected?' in that originally private method.

My question now is: Is there any plan to make that method protected?
Or does anybody know a way for the 'insert'-property of textfield to
react to my text-input?
(Continue reading)

fiorano fast | 8 Jul 13:17
Picon
Favicon

little help required with thinlet

hello everyone,
i am new to thinlet. i am using this tool to develop a
gui (login screen right now) which is xml driven. My
problem is:
1. I have to authorize the user by connecting to mysql
database and present a new screen (main gui).
i have designed the main gui but how to integrate it
to the login screen.

any help would be helpful.
Best Regards,
Akhil Anand

	

	
		
__________________________________________________________
Free antispam, antivirus and 1GB to save all your messages
Only in Yahoo! Mail: http://in.mail.yahoo.com

_________________________________________________________________
Thinlet Project Site    | http://thinlet.com
Thinlet Addon Central   | http://thinletplus.com
Thinlet World News Blog | http://thinletworld.com
Thinlet F.A.Q.          | http://xul.sourceforge.net/thinfaq.html 
Daniel Destro | 8 Jul 15:18
Picon

Re: little help required with thinlet

What about:

public class YourMain extends Thinlet {
  public static void main( String[] args ) {
    new FrameLauncher( "Sample", new YourMain(), 500, 400 );
  }

  YourMain() {
    add( parse( "login.xml" ) );
  }

  public void doLogin( String user, String pass ) {
    if( /* login OK */ ) {
      remove( find("login") );
      add( parse("main.xml") );
    }
  }
}

On 7/8/05, fiorano fast <fiorano_fast <at> yahoo.co.in> wrote:
> hello everyone,
> i am new to thinlet. i am using this tool to develop a
> gui (login screen right now) which is xml driven. My
> problem is:
> 1. I have to authorize the user by connecting to mysql
> database and present a new screen (main gui).
> i have designed the main gui but how to integrate it
> to the login screen.
> 
> any help would be helpful.
(Continue reading)


Gmane