rim-4.7

How to handle ButtonField & BitmapField Click (Touch) events in Blackberry Storm?

烈酒焚心 提交于 2019-12-09 12:55:56
问题 I have created a ButtonField & a BitmapField like.. public class MyCanvas extends MainScreen implements FieldChangeListener { HorizontalFieldManager hfm; private Bitmap startBitmap; private BitmapField startBitmapField; private ButtonField okButton; MyCanvas() { hfm = new HorizontalFIeldManager(); startBitmap = Bitmap.getBitmapResource("start.png"); startBitmapField = new BitmapField(startBitmap); startBitmapField.setChangeListener(this); hfm.add(startBitmapField); okButton = new ButtonField(

How to save & delete a Bitmap image in Blackberry Storm?

我只是一个虾纸丫 提交于 2019-12-08 05:30:03
问题 I have a ready Bitmap image. Now I want to save & delete it. I m doing it like.. FileConnection fconn = (FileConnection)Connector.open("file:///store/home/user/StoredBitmap/"+picIndex+".bmp",Connector.READ_WRITE); if(!fconn.exists()) fconn.create(); OutputStream out = fconn.openOutputStream(); if(image == null) System.out.println(" image null "); else { out.write(byte[]); out.close(); } fconn.close(); For Blackberry Storm device & simulator, which path to give instead of "file:///store/home

How to set Anti Aliasing in Blackberry Storm?

一世执手 提交于 2019-12-06 05:29:26
I m drawing in a bitmap like.. bitmap[i] = new Bitmap(60, 60); Graphics g = new Graphics(bitmap[i]); g.setColor(Color.BLACK); g.drawLine(....); Now how to set Anti-Aliasing on before g.drawLine()? For antialiasing mode use public void setDrawingStyle(int drawStyle, boolean on) For lines use graphics.setDrawingStyle(Graphics.DRAWSTYLE_AALINES, true); graphics.drawLine(x1, y1, x2, y2); graphics.setDrawingStyle(Graphics.DRAWSTYLE_AALINES, false); For poligons use graphics.setDrawingStyle(Graphics.DRAWSTYLE_AAPOLYGONS, true); graphics.drawRect(x, y, width, height); graphics.setDrawingStyle

How to handle ButtonField & BitmapField Click (Touch) events in Blackberry Storm?

佐手、 提交于 2019-12-03 16:43:58
I have created a ButtonField & a BitmapField like.. public class MyCanvas extends MainScreen implements FieldChangeListener { HorizontalFieldManager hfm; private Bitmap startBitmap; private BitmapField startBitmapField; private ButtonField okButton; MyCanvas() { hfm = new HorizontalFIeldManager(); startBitmap = Bitmap.getBitmapResource("start.png"); startBitmapField = new BitmapField(startBitmap); startBitmapField.setChangeListener(this); hfm.add(startBitmapField); okButton = new ButtonField("Ok", ButtonField.CONSUME_CLICK | ButtonField.NEVER_DIRTY); okButton.setChangeListener(this); hfm.add