terminology of field layout?

Open the message on BOARD:

I find it quite difficult to understand all the terminology field layout. There is a good reference for this?

As I read through the API reference for a field, I see the following similar terms:

  • Border
  • Content
  • To what extent
  • FocusPhantom
  • The margin of
  • Padding

They all seem to be a sort of rectangular area relevant for the field, but the API documentation is poor enough to explain what each region is and how they differ. A photo would go a long way to explain what are these different regions, how they relate to each other, and what is their hierarchy.

Thank you

Came across a photo illustrating these terms. It's in the section of the API 6.0.0 HorizontalFieldManager.

http://www.BlackBerry.com/developers/docs/6.0.0api/index.html

Tags: BlackBerry Developers

Similar Questions

  • Need help with Custom Field Layout - getting wirer height value

    In the BB Simulator, I get a strange value placed in in my field layout() method custom. The width is 320, which is correct, but the height is 1073741823 and it takes 240 or less. In this test, my custom field is the only field in the Manager, so I expect to 240.

    I tried two different simulators - BB curve and the 8800. I use JDE 4.5.0 in Eclipse 3.4.1. This is the code for my method of layout:

    Protected Sub layout (int width, int height) {}
    s long = getStyle().
    If ((s & USE_ALL_WIDTH)! = USE_ALL_WIDTH) {}
    width = Math.min (width, getPreferredWidth());
    }
    If ((s & USE_ALL_HEIGHT)! = USE_ALL_HEIGHT) {}
    height = Math.min (height, getPreferredHeight());
    }
    setExtent (width, height);
    model.setExtent (width, height);
    Model.Scroll (0, 0);
    }

    I expect the value of the screen height, or less, if the domain is configured correctly.

    I'm upgrading my custom field in a VerticalField Manager with the following attributes:

    Super (VerticalFieldManager.USE_ALL_WIDTH
    | VerticalFieldManager.USE_ALL_HEIGHT
    | VerticalFieldManager.FIELD_HCENTER | VerticalFieldManager.FIELD_VCENTER);

    Is this a bug in the Simulator, or I understand the API correctly? Is there a way to 'reset' the Simulator - I tried to get out of Eclipse and restart Windows, but I always get the same value.

    Thank you!

    Mark

    A VerticalFieldManager comes, I think, with default VERTICAL_SCROLL.  If you do not want to scroll through this particular Manager, add VerticalFieldManager.NO_VERTICAL_SCROLL to your forests of style and it will be laid out with only the height and the actual width.

    Also, since you setExtent() by yourself, USE_ALL_HEIGHT and USE_ALL_WIDTH are redundant, I think.

    Hope that helps,

    Arkady.

  • problem of the substitution of Field.layout (int w, int h) for RichTextField

    Method of layout (int w, int h) overiding for RichTextField, the field is not displayed on the screen. How can it be resolved?

    This code is "blindly" accepting the height spent (which is probably set at maximum height) as the height, it should use.

    Try this instead:

    Protected Sub layout (int w, int h) {}
    Super.Layout (width, h);
    }

  • Can 'Available Section' in Field layout for page layout renamed account?

    I created the layout for 'Account' where I added a few custom fields to capture more accurate data of the account.
    I would like to create headers simillar "Installed account data" available as "account key information:', 'Account sales information' in account layout." Is it possible to rename "Section available?

    santoshpatil, click account on the page, and then just to the right of the Edit, you see a down arrow click it and then choose "edit the Sections.

  • Field layout - splitting of alignment of fields

    Hello

    I would like to put four areas on a single line. The first field (a LabelField), I would like to align itself with the left side of the screen. The other three areas, I would like to align itself with the right side of the screen. What is the best way to achieve this?

    I put them all in a HorizontalFieldManager. I put the HorizontalFieldManger to Manager.USE_ALL_WIDTH. I put the LabelField for Field.FIELD_RIGHT and the other three fields to Field.FIELD_RIGHT. However, everything is left-aligned.

    Thank you

    I gave a few code snip: its created for button

    First go and take it and change it to your target.

    class MyHorizontalFieldManager extends HorizontalFieldManager
    {

    private ButtonField leftButton;
    private ButtonField rightButton;

    public MyHorizontalFieldManager() {}

    Super (USE_ALL_WIDTH);

    ButtonField leftButton = new ButtonField ("Left");
    setLeftButton (leftButton);
    Add (leftButton);

    ButtonField rightButton = new ButtonField ("Right");
    setRightButton (rightButton);
    Add (rightButton);
    }

    protected void sublayout (int maxWidth, maxHeight int)
    {

    Super.sublayout (maxWidth, maxHeight);

    width int = getWidth();

    ButtonField rightButton = getRightButton();
    If (rightButton! = null & is equal to (rightButton.getManager ())) {}

    int x = width - rightButton.getWidth ();
    int y = 0;
    setPositionChild (rightButton, x, y);
    }
    }

    getLeftButton() private ButtonField
    {

    return leftButton;
    }

    Private Sub setLeftButton (ButtonField leftButton)
    {

    this.leftButton = leftButton;
    }

    getRightButton() private ButtonField
    {

    rightButton return;
    }

    Private Sub setRightButton (ButtonField rightButton)
    {

    this.rightButton = rightButton;
    }
    }

  • Additional fields can be added to the layout and comments module form?

    Hello

    I want to add pro and con for the comments module fields layout. Is this possible?

    I edited ther feedback form but can't seem to get these fields of custom form in the layout of the comment, as you can do in other forms. Could you use java?

    Also the comment and the coast to stars module comment can be seen in google?

    Any help would be thank you very much.

    Daniel

    Comment form may not be extended. I'm not sure what exactly is a friendly note from Google, but comments are Google friendly. I have no thing as the coast at stars.

    See you soon,.

    m

  • The description field can be increased on a layout?

    Hello

    Is it possible to move the position of the description field, layout of account, to above or below a particular section? Is it possible to shorten the length of the text displayed in the description field? (The actual field may be longer and fill the area will be visible when editing of the recording, but observing, it displays a shorter column)

    Kind regards

    Currently, it is not possible to move the Description field of the page layout, and you cannot change the size of this field. I would recommend that you submit a request for service improvement customer CRM On Demand.

  • Custom main screen does not properly perform fields center

    I have a CustomMainScreen, but it is not completely central, field layout (they are a bit too left when Field.FIELD_HCENTER is applied to the field)

    Screenshot:

    Code:

    this.label_field = new CustomLabelField("Welcome to Test App",Field.FIELD_HCENTER);
    
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.component.LabelField;
    
    public class CustomLabelField extends LabelField
    {
        private int _newcolor = Color.BLACK;
        private Font _font = Font.getDefault();
    
        public CustomLabelField(String label)
        {
            super(label);
        }
    
        public CustomLabelField(String label, long field)
        {
    
            super(label,field);
        }
    
        protected void paint(Graphics graphics)
        {
            graphics.setColor(this._newcolor);
            graphics.setFont(_font);
            super.paint(graphics);
        }
    
        public void setColor(int newcolor)
        {
            this._newcolor = newcolor;
        }
    
        public void setFont(Font newFont)
        {
    
        }
    }
    

    Thank you!

    The code you have looks like it must be placed correctly, with a slight concern:

    graphics.setFont (_font);

    By doing this I think that you can change the font size.  Now the LabelField will already told the Manager how big it is, and it will be based on the police, he said.  You change it.  I assume that you make it smaller.  So presumably the LabelField has been fitted out with a larger font, your smaller font does not fill the space.

    However, you do not want to set the font in your object, that the definition of the police may cause to the new provision, which will cause a repaint, which will set the police, resulting in a new provision, another painting,...

    Then try something like this:

    SerializableAttribute public class CustomLabelField extends LabelField
    {
    private int _newcolor = Color.BLACK;
    _font private policies = Font.getDefault ();

    public CustomLabelField (label As String)
    {
    Super (label);

    this.setFont (Font.getDefault ());
    }

    public CustomLabelField (label As String, long field)
    {
    Super (label, Field);

    this.setFont (Font.getDefault ());
    }
    ....

    If this doesn't help, can you say what Manager you add this?

  • Field question (long) list of the industry and the text

    two questions

    List of industry
    1. I want to create a list of choices cascading by industry (secondary sector) list, but the list of industry isn't in the cascading drop-down list. Is this a limitation of the current list of industry? If it can be done, how?

    Text (Long)
    1. the long text field is displayed as the same size as the text field short. Is there a way to set the display to a bigger size? For example Can I updated the display height 4 to display this field as 4 times the normal size?
    2. at the bottom of the layout, 3 step wizard (Field Layout), there is a section called 'Long text fields. Is it possible to add additional fields to this section? Is it possible to have more of the memo and another field (for example, a larger text field) per page?

    There are some out of the box reports and dashboards that use a list of choice in the industry. If you plan to use a custom instead drop-down list, and this field is going to be the key, I recommend that it is a field lookup indexed.

    Published by: bobb on September 23, 2009 14:02

  • Why calculator will be scientific?

    Recently, I replaced the hard drive in my old Windows computer. I installed XP SP1 from scratch on a DoD wiped the hard drive and update to SP3 from a CD, then let the autocratic updates to do its thing.
    Since then, I've noticed that the calculator keeps returning to the 'standard' setting, whenever I hit the 'x' button It used to stay on the scientist. Any ideas that I can do to fix that?

    This is the response:
    teridon73.blogspot.com/2009/07/make-Windows-XP-Calculator-always-start.html

    Win.ini should probably be edited with MSCONFIG rather than Notepad.
    (start-> run and type msconfig.exe)
    Open a session as long as administrator, make sure that you have used the calculator at least once, then run msconfig and change the field layout in "scicalc" to 0.

    Layout [SciCalc] = 0

  • Problems with JDE Sample PictureBackgroundButtonField.java

    Hello world

    I use the JDE PictureBackgroundButtonField.java sample to create a button with a picture on it. It works fine, except that when I insert my application, the button is 'in focus' (watch the _onPicture) and won't not blurry. Can anyone understand this? Thank you!

    Here is the instantiation of the button:

    PictureBackgroundButtonField pic = new PictureBackgroundButtonField("Hello", DrawStyle.HCENTER);
            hfmBottom.add(pic);
    

    Here's the PictureBackgroundButtonField.java:

    /**
     * PictureBackgroundButtonField.java
     *
     * Copyright © 1998-2009 Research In Motion Ltd.
     *
     * Note: For the sake of simplicity, this sample application may not leverage
     * resource bundles and resource strings.  However, it is STRONGLY recommended
     * that application developers make use of the localization features available
     * within the BlackBerry development platform to ensure a seamless application
     * experience across a variety of languages and geographies.  For more information
     * on localizing your application, please refer to the BlackBerry Java Development
     * Environment Development Guide associated with this release.
     */
    
    package com.kflicks.ui.Custom;
    
    import net.rim.device.api.ui.*;
    import net.rim.device.api.system.*;
    
    /**
     * Custom button field that shows how to use images as button backgrounds.
     */
    public class PictureBackgroundButtonField extends Field
    {
        private String _label;
        private int _labelHeight;
        private int _labelWidth;
        private Font _font;
    
        private Bitmap _currentPicture;
        private Bitmap _onPicture = Bitmap.getBitmapResource("res/search_on.png");
        private Bitmap _offPicture = Bitmap.getBitmapResource("res/search_off.png");
    
        /**
         * Constructor.
         * @param text - the text to be displayed on the button
         * @param style - combination of field style bits to specify display
               attributes
         */
        public PictureBackgroundButtonField(String text, long style)
        {
            super(style);
    
            _font = getFont();
            _label = text;
            _labelHeight = _font.getHeight();
            _labelWidth = _font.getAdvance(_label);
            _currentPicture = _onPicture;
        }
    
        /**
         * @return The text on the button
         */
        String getText()
        {
            return _label;
        }
    
        /**
         * Field implementation.
         * @see net.rim.device.api.ui.Field#getPreferredHeight()
         */
        public int getPreferredHeight()
        {
            return _labelHeight + 4;
        }
    
        /**
         * Field implementation.
         * @see net.rim.device.api.ui.Field#getPreferredWidth()
         */
        public int getPreferredWidth()
        {
            return _labelWidth + 8;
        }
    
        /**
         * Field implementation.  Changes the picture when focus is gained.
         * @see net.rim.device.api.ui.Field#onFocus(int)
         */
        protected void onFocus(int direction)
        {
            _currentPicture = _onPicture;
            invalidate();
        }
    
        /**
         * Field implementation.  Changes picture back when focus is lost.
         * @see net.rim.device.api.ui.Field#onUnfocus()
         */
        protected void onUnfocus()
        {
            _currentPicture = _offPicture;
            invalidate();
        }
    
        /**
         * Field implementation.
         * @see net.rim.device.api.ui.Field#drawFocus(Graphics, boolean)
         */
        protected void drawFocus(Graphics graphics, boolean on)
        {
            // Do nothing
        }
    
        /**
         * Field implementation.
         * @see net.rim.device.api.ui.Field#layout(int, int)
         */
        protected void layout(int width, int height)
        {
            setExtent(Math.min( width, getPreferredWidth()),
            Math.min( height, getPreferredHeight()));
        }
    
        /**
         * Field implementation.
         * @see net.rim.device.api.ui.Field#paint(Graphics)
         */
        protected void paint(Graphics graphics)
        {
            // First draw the background colour and picture
            graphics.setColor(0x00EE3526);
            graphics.fillRect(0, 0, getWidth(), getHeight());
            graphics.drawBitmap(0, 0, getWidth(), getHeight(), _currentPicture, 0, 0);
    
            // Then draw the text
            /*graphics.setColor(Color.BLACK);
            graphics.setFont(_font);
            graphics.drawText(_label, 4, 2,
                (int)( getStyle() & DrawStyle.ELLIPSIS | DrawStyle.HALIGN_MASK ),
                getWidth() - 6 );*/
        }
    
        /**
         * Overridden so that the Event Dispatch thread can catch this event
         * instead of having it be caught here..
         * @see net.rim.device.api.ui.Field#navigationClick(int, int)
         */
        protected boolean navigationClick(int status, int time)
        {
            fieldChangeNotify(1);
            return true;
        }
    
    }
    

    Seems fine,

    What do you mean by go not blurred? When you create the button, it will be the onFocus image. If you want to give it focus, you need to add the parameter focusable,

    If your code should look like,

    PictureBackgroundButtonField pic = new PictureBackgroundButtonField("Hello", Field.FOCUSABLE | DrawStyle.HCENTER);
    
  • Graphics.drawText: How to draw a line of text with words in different colors?

    BB OS 5.0.0

    I'm watching the documentation of the API for graphics and I can't determine how can I use Graphics.drawText to draw a single line in two colors.

    I get the content from the server and in my class that extends the field, layout and painting methods. In the paint method, I need to use drawText to paint the contents from the server in two colors, such as:

    New coffee blends available at the counter & - 1 hour ago

    I thought that the following drawText could be useful, but I don't see how I can use it with two colors. Ideas, samples or advice would be greatly appreciated.

    public int drawText(StringBuffer aText,
                        int aOffset,
                        int aLength,
                        int aX,
                        int aY,
                        int aFlags,
                        int aWidth)
    

    You will need two calls drawText, each following a call setColor for the font you want for this particular piece color.

    In order to calculate the offset x from the second drawText compared to the first, use font.getAdvance (firstString) (where the police is your graphic police present, accessible via graphics.getFont ()).

    Use simple methods and you will get your results faster.

  • Is it possible to integrate a Barcode Generator Business Catalyst. More precisely inside a Web application?

    I would like to create a Web application that would allow users to connect online and create a coupon for their business. Is it possible to integrate a code generator to bars in the WebApp Field Layout, which would bar code in the coupon? It would be the simplest solution, but if there is a way to integrate a code generator barcode on a catalyst for business site, this would be too much.

    Evan

    Looks like JsBarcode .

  • Is it possible to create replicas of existing instance

    Within an existing CRMOD instance needs another unit operating set up a parallel instance (logical partition of first instance) where throughout the workflow, screens, reports are exactly the same as the existing instance. However the second instance must have an independent set of the administrator, users, roles, products and the LOVS. Security required is a forum admin and users should not be able to view all data & users of the other instance.

    any help on this please.

    Kind regards
    Manish

    Well copy one POD to the other is CRMOD instance is possible thanks to the Migration of Oracle tool that comes as part of the box Solution, but let me recommend you to refer to the documents related to the same thing to learn what can be migrated and that all cannot before the finalization of the plan of implementation.

    In addition, the other alternative is of course manual Creation of all fields, layouts, and Workflows

    Kind regards
    Deepak: kamal

  • Forcing a repaint NOW!

    I apologize for asking this; I know that it's been resolved here before, but I can't find it in research. Doesn't help that search terms are necessarily very general...

    I want to have a small window with a message indicating to the user that their report was written. I have implemented it as a JFrame, containing a JLabel. My problem is that text is displayed only AFTER the report was written. The window, but there is no text inside, until the work is completed. I tried invalidate() and repaint () - no luck.

    I tried to put the work of drafting the report in a Runnable and appellant invokeLater(), in the hope that the paint be made before work - no luck there either.

    Here's the class of the window:
    public class ReporterMessageWindow extends JFrame
    {
      ReporterMessageWindow(NiNJASWindow parent, String message)
      {
        Container thePane = getContentPane();
    
        // create and add the widgets to the panel
    
        JLabel field = new JLabel(message);
        field.setFont(restFont);
        thePane.add(field);
    
        // and do the layout
    
        SpringLayout layout = new SpringLayout();
        thePane.setLayout(layout);
    
        layout.putConstraint(SpringLayout.NORTH, field, MARGIN_PANEL,
                             SpringLayout.NORTH, thePane);
        layout.putConstraint(SpringLayout.WEST, field, MARGIN_PANEL,
                             SpringLayout.WEST, thePane);
        layout.putConstraint(SpringLayout.SOUTH, thePane, MARGIN_PANEL,
                             SpringLayout.SOUTH, field);
        layout.putConstraint(SpringLayout.EAST, thePane, MARGIN_PANEL,
                             SpringLayout.EAST, field);
    
        // get the window's layout all finalised
        pack();
    
        // and centre it on the parent window
        setLocationRelativeTo(parent);
      }
    }
    And here is where I create and show:
    [I get the location for the report file]
    
    ReporterMessageWindow w = new ReporterMessageWindow(parentWindow, "The report is being written");
    w.setVisible(true);
    
    [I write the report]
    
    w.dispose();
    Back when this code is called from, there is another window of message, this time by using JOptionPane, to indicate to the user that the report has been drafted. It is at the time that this second window comes out, the ReporterMessageWindow gets painted.

    Please, what do I do to get the label painted at the time the small ReporterMessageWindow is shown?

    Do not write the report in the AWT thread. Starts a separate thread. Do not block or long operations in the AWT thread.

Maybe you are looking for

  • Satellite A30-104: wireless network card mini pci

    Can someone give me the part number for the wireless card mini pci for this laptop. The model number is PSA30E, I was offered a PA3297U-1MPC - Atheros Thank you

  • How to manage iphone applications

    How can I manage my iPhone apps in iTunes? When I select the iPhone in iTunes list is empty, but to the right, the home screens display correctly the apps. I know that I did it before, but for some reason that I can't move applications around now. My

  • which printers do HP74 & 75 cartridges work with

    Both printers Photosmart D5360 have died and I have too many cartridges to throw. Would like to know which printers are available that use these cartridges.

  • Malfunction USB file recovery

    My SYSTEM is Windows XP Professional, Service Pack 2. The computer is a Dell, Intel (r) Core 2 Duo CPU T7300 @2.00 GH. I have a USB key which works very well, and now it gives me an error message that says that the USB device is not recognized and ma

  • BlackBerry Smartphones Facebook stuck 2.0.0.37 "update"

    Hello quite new to all this stuff of blackberry, everything seemed to work fine until I realized my facebook the thing flow status has not been updated, so I tried to close the session. Went in the facebook options and hit that bad disconnection and