BUG Community

Welcome! Log In

Forums BUG SDK SDK "screen" size

Subscribe to SDK "screen" size  6 posts, 3 voices

Log in to reply to this topic
 
Feb 24, 2008 4:49pm
Img_missing_medium code_slave 12 posts

Hi Guys,
can you add something to the SDK so that the bug screen size is selectable.

Or at least point to the place where it can be changed.

Feb 24, 2008 5:13pm
Medium Bug Labs team kschultz 107 posts

As far as I know it is set in the LCDModlet class


/**
* @return Returns AWT Frame
*/
public Frame getFrame() {
frame = new Frame();
frame.setSize(320, 240);
frame.setResizable(false);

return frame;
}


As well as in the start() method, it sets the width/height as properties.

It is in package com.buglabs.bug.emulator.module.lcd,
Feb 25, 2008 5:27am
Img_missing_medium code_slave 12 posts

Excellent software design!!!
Hard coded values in TWO separate places, instead of putting it in a configuration file.......

public void start() throws Exception {
Properties p = new Properties();
p.put("Module", "Virtual LCD Module");

moduleRef = context.registerService(IModuleControl.class.getName(), this, null);

Dictionary props = new Hashtable();
props.put("width", new Integer("320"));
props.put("height", new Integer("240"));


moduleDisplayServReg = context.registerService(IModuleDisplay.class.getName(), this, props);
}

public Frame getFrame() {
frame = new Frame();
frame.setSize(320, 240);
frame.setResizable(false);


return frame;
}



Which means I now have to download the source and completely recompile a class to change the screen size.

and it's in:
Eclipse/plugins/com.bugliabs.dragonfly.bug.kernel_1.0.0.266/kernel

com.buglabs.bug.emulator.module.lcd.jar

just incase anyone else should want to find it.
Feb 25, 2008 3:47pm
Medium Bug Labs team kgilmer 215 posts

Hi code_slave,

Yeah good point, that stuff could use some clean up. I’ll file a bugzilla, thanks for the heads up. Note that if you’re looking to add a new module or display type you might be better off writing your own modlet. The code that Kevin referenced is intended only for the LCD module we are shipping on 3/17.

Feb 25, 2008 4:17pm
Medium Bug Labs team kgilmer 215 posts

Here is the bugzilla. Please add more if you find them!

http://bugcommunity.com/bugzilla/show_bug.cgi?i…

Mar 2, 2008 6:25am
Img_missing_medium code_slave 12 posts

Hi guys,
you need to be a little more defensive in your programing, otherwise you will be spending more and more time "cleaning up".
Get as much as you can into prop files.

Log in to reply to this topic
Forums BUG SDK SDK "screen" size

Powered by Community Engine