How to change the size of any field?

Hello, I'm developing a CLDC Application on JDE 4.7, and I have a problem while I create a custom field (no field, NullField, VertivalFieldManaher, LabalField, etc.). I do an override of the method getPreferredWidth() or getPreferredHeight() to set the new height and width of my field, but when printing, a string to the console in the painting of the method, I don't see that this painting of the method is executed in a cycle.

This an expmple of code:

public class ExpanderField extends VerticalFieldManager {
    public int getPreferredHeight() {
        return 200;
    }

    public int getPreferredWidth() {
        return 200;
    }

    protected void subpaint(Graphics graphics) {
        //super.paint(graphics);
        System.out.println("Paint Method Executed");
    }

    protected void sublayout(int width, int height) {
        super.sublayout(getPreferredWidth(), getPreferredHeight());
        super.setExtent(getPreferredWidth(), getPreferredHeight());
        System.out.println("layout executed...");
    }

}// ExpanderField class

In this example, the string "Painting executed method" is printed permanently. I don't know why the method of painting is executed all the time.

Anyone know what is happen?

I think I found the answer. In another class of my project, I put the setPosition() sentence; in the method object of a VerticalFieldManager and this sentence call once again, the paint so this method to cycle, and all fields checked for this VerticalFieldManager are painted, once again what is run the paint method in the VerticalFieldManager.

But I have a question for developers RIM...

http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800345/...

Why in the code example above, you use the setPosition() phrases; and getManager () .invalidate (); within the method object?, this sentences call the Paint method constantly and never stop, it is not an effective way to program an application.

Tags: BlackBerry Developers

Similar Questions

  • How to change the size of the video field when you use the camera

    I read the code 4.6 camera example:

    ...

    _videoField = _videoControl.initDisplayMode (Field) (VideoControl.USE_GUI_PRIMITIVE, 'net.rim.device.api.ui.Field');
    Display the video control
    _videoControl.setVisible (true);

    ...

    Basically, it creates a class and add the Manager user interface field. But the size of the field is small. How to adjust the size of this field?

    Currently, there is no API to control the zoom level of camera.

  • I don't know how to change the size and quality of the text on the screen on Windows 7

    I just installed a new Windows 7 but I don't know how to change the size and quality of the text on the screen.  I tried all the things normal, resolution, size of icons, dpi etc but nothing gives me what I want.  The text in clear 'wonderful' thing is just terrible.  When I go through the 4 steps I see no text boxes which make the text nothing better.  All options are terrible, so the result on screen is too terrible.  When I do any huge I do not get a full screen of things - view the Start button disappears or I did not closing small cross at the top - of the suggestions to inprove the situation?  I must mention that my screen/monitor is 2006 - I need to buy a new one?  How much is this Windows 7 is going to cost me, or maybe I should go back to XP!

    I sincerely thank all you smart "technicians" for all the answers you always gave myself and all others who ask questions.  I'm not too smart with all this new technology as I fell into it very late.  I am now in my 60s and only started using a pc when I was over 50 years so...  In any case, I asked a question about the size of screen resolution and text and received much good advice from all that you guys.  I had recently changed in XP to Windows 7.  However, the bit of advice that I was given in 'Cyberking' here at the Portugal had set the resolution of the screen, the advanced settings, 75 to 60 Hertz Monitor tab.  Very basic, and the first question asked the technician (Lady) was "what size is your screen?  Naturally as a smaller screen that any 'techno' would be considered dead aid, solving the problem was simple and straightforward without me having to stretch my knowledge and my skills by downloading all programes weird (to me) or do the funny stuff in the bios or something else.  I send this comment to you for you to realize that the simple solution is not always bad and maybe we should go for the easiest first and then work up to the more difficult ones.

    Just for you all to see - now my screen resolution is perfect, the text on the screen is clear and legible without difficulty, even though the size of text and icon is small.  Clarity is all!

    Thank you all once again!   Best regards, Blondie blue.

  • How to change the size of the app button

    Can how I change the size of the buttons on my iPad Air app

    Cannot change the app icons themselves in size. If the icons are large, see if the zoom is on iOS: the home screen icons are magnified or large - Apple Support

    -AJ

  • How to change the size of taskbar buttons? I did everything that I've seen proposed in these pages, and nothing works.

    How to change the size of taskbar buttons?  I did everything that I've seen proposed in these pages, and nothing works.

    The buttons of programs open in the taskbar are tiny and square.  I want them to be of normal size (by default).  I have locked and unlocked the task bar.  I moved the "three vertical lines composed small points."  Nothing works.

    If you want to enlarge all the icons in the taskbar, and then increase the point size of buttons of legend to a larger number of advanced appearance settings.
    Follow these steps:

    1. click on start, Control Panel, personalization, window color and appearance.
    2. on the window color and appearance, click "Classic appearance open for more color options" (link below).
    3. in the box "Appearance settings", click on the button "Advanced".
    4. in the box "Advanced appearance" under "Item:" dropdown, choose "buttons".
    5 set your size
    6. click on the OK button.
    7 on the "Appearance settings" box, click on the button 'Aplly', wait.
    8. click the OK button if you are uncomfortable with the size to change, or just click on the "Advanced" button to set the size.

    I hope I could help

  • How to change the color of form fields

    I don't know how to change the color of form fields. They default to gray, but I don't know how to make a different color.

    Gray does not match the color scheme of my landing page!

    Thank you!

    I think you have two options when you are working on a landing page with an embedded format:

    • You can change the background color of the entire form field set by selecting the shape, and then clicking on the Toolbox. In the window that opens go to the second (on a paint brush icon) and select the background color you want.
    • You can change the background color of the actual fields in the form by adding CSS styles. Select the Toolbox, go to the last tab (Tools Extract page) and in the middle of this window, you will see "head | CSS | JS"- select this average CSS tab and enter the style code to get the color you want. Here is an example of code you can put in it. Note that #000000 is the color code for black. Here is more information about the code: css - background in the input fields and text color? - stack overflow

  • How to change the size and color of 'staticText '?

    Can anyone share please how to change the size and color of the object "staticText"?

    function buildUI (thisObj) {}

    var myPanel = (thisObj instanceof Panel)? thisObj: new window ('pallet', 'Gear of Stress', undefined, {resizable: true});

    var txt is myPanel.add ("staticText", [0,0,100,20], "txt");.

    txt. newFont, fontSize, color?

    Return myPanel;

    }

    var myToolsPanel = buildUI (this);

    I did a quick test on a PC at the office and it seems that Gill without isn't a stock PC police. You could comment on these out or change them to a police stock as Helvetica or something. Once I removed that it has launched on PC very well.

  • How to change the size of the font on the desktop to photoshop

    How to change the size of the font on the desktop to photoshop

    What do you mean by

    Office of Photoshop

    ?

    If the problem should be to use a screen high resolution please read:

    HiDPI and retina display support FAQ

  • How to change the size of the font on the panels?

    How to change the size of the font on the panels?

    I found the font in the preferences setting works for Lightroom 5.  However, you must restart your meter to see the effect.

  • How to change the size of font IR (only) dynamically

    Hello

    On the http://www.danielmcghan.us/2009/01/that-font-is-too-small.html blog, there was a great example of how to change the size of font IR on the fly.
    Some how seems that it does not have new reagent 25 theme, which is not having "td." If someone could help me.

    I would like to add a few record capacity in other tables (table user preferences)... Penny Please extend this example if possible.

    For this I did on the cloud Apex demo: FONT_SIZE_ADJ_APP

    http://Apex.Oracle.com/pls/Apex/f?p=2354

    Data connection:
    United Nations: guest_admin
    PWD: Qwertz123!

    THX in advance for your help.

    BRG,
    Damir

    The actual code Th example of work seems different from the blogpost

    Might want to try this code (in your page template)

    (-) Save / Reset (+)
    

    To save this in a table of custom user preferences:
    -You can change the application RETURN_NOTHING to insert/update process using the FONT_SIZE_ADJ element

    And add the calculation to set the value in FONT_SIZE_ADJ of the table for the first time user preferences when users login

  • How to change the size of virtual machine from a template installation disc.

    Dear team

    How to change the size of the disk when installing VM from a template? I'm on ESX 4.0 Vcenter 4.0

    Concerning

    Shamal

    I don't know if this is possible, you may need to deploy the machine first, then use the VMware Converter or vDisk settings in the properties of the virtual machine.

    The converter is in charge on the partition, as well as (for Windows clients).

    AWo

    VCP / VMware vEXPERT 2009

  • How to change the size of the police in textarea?

    How to change the size of the police in textarea?

    If your House is your textarea:

    AS3:

    var tfor:TextFormat = new TextFormat();
    Tfor.Size = 22;
    ta.setStyle ("textFormat", tfor);

    AS2:

    ta.setStyle("fontSize",22);

  • How to change the size of text in the fields to fill?

    Please let me know how change the size of text in the fields to fill?

    Hey Swan, laken59599864

    It is not possible to change anything in the PDF with Adobe Reader.

    You may need to open the PDF with Adobe Acrobat and choose "tools > forms > edit ' and double-click on a text field to view its properties. Click on the appearance tab, and then change the font size as you wish.

    Hope this is useful.

    Kind regards

    Ana Maria

  • How to change the size of 640 x 480 to 1280 x 960 JPEG

    I have a XP computer and want to display several series of photos on my smart TV.  I have a couple of folders with a size of 1280 x 960 images that show very well.  Several other cases are of a size of 640 x 480 with a small image on the TV.  Is it possible to change the size of 640 x 480 more small to the large size of 1280 x 960.  Also is it possible to change all the photos in the folder with a single statement

    I have a XP computer and want to display several series of photos on my smart TV.  I have a couple of folders with a size of 1280 x 960 images that show very well.  Several other cases are of a size of 640 x 480 with a small image on the TV.  Is it possible to change the size of 640 x 480 more small to the large size of 1280 x 960.  Also is it possible to change all the photos in the folder with a single statement

    =================================
    The following free PowerToy for Windows XP
    can resize batches of photos very quickly:

    Go to the following link and download and
    install: ImageResizer.exe

    (Filename: ImageResizerPowertoySetup.exe)
    (does not work on Vista).

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Windows XP downloads - PowerToys
    http://Windows.Microsoft.com/en-us/Windows/XP-downloads#2TC=featured
    (start with left click of the PowerToys column)

    When it is installed, you can open any file that
    contains images and you will have an option for
    Resize. Just right click the selected image files
    and choose resize images in the menu. You
    can select a picture or an entire group.

    The program will place the resized in copies
    the folder with your originals.
    (Tip: * never * overwrite your originals)

    To ensure that images in both portrait and
    landscape orientation are resized to the
    same dimensions... go to... Advanced...
    and enter the largest number in these two areas.
    IOW... for 600 x 800... Enter 800 in these two areas.

    IrfanView...

    It gets a bit more complicated than the PowerToy
    But yes, IrfanView can resize a batch of images.

    In Irfanview... go... File / Batch Conversion...

    Navigate to the appropriate folder and then select the
    you want to resize images...

    Click on the button 'Add '.

    If you want to resize all the images in the folder...
    Just click the button "add all".

    Now... "Batch converting" checked...
    Check... Using the Advanced Options and
    Click on the "Advanced..." button

    Check the field "resize".

    Enter the new size. If... for example... you
    want to 640 by 480... Enter as many
    in these two areas and be sure that "Preserve."
    Aspect Ratio' is checked. This way the
    many apply to the shorter
    dimension and your image format will be
    preserved.

    When increasing the pixel dimensions, audit
    the box... "Resample" can lead to
    in a better image quality.

    Click on... Ok...

    Choose a "Output Format".

    Choose a folder to save the new files in...

    Click on the button 'start '.

  • How to change the size of the active desktop to normal after changing the size of the icons

    original title: active desktop size

    I changed the size of my icons, and now I can't use the office as a whole.

    I can't put icons on the third right and lower third of the screen.
    What can I do to fix this?
    Thanks, BeckySH

    Hello

    Because you say that what you've done, but not how you did, my suggestions are limited to...

    • Cancel any changes that do
    • If you remember what was the modified parameters: do a system restore to a point in time before things went wrong. Start - All Programs-Accessories-tools system restore. Choose an appropriate date and time and set the course of restoration. Be patient, it may take several minutes.

    Tricky

Maybe you are looking for