Nested HorizontalFieldManagers

I do not know if this is possible, but I am creating a dynamic header region in dealing with managers: div and css, as you would in HTML (kind of)

Is it still possible? With the code below I end with only 46px blue box (container).

The logo is not drawn, nor is the 1 pixel and 2 lines of pixels that are supposed to appear under the blue box.

JDE 4.2.1

    public static HorizontalFieldManager header()
    {
        BitmapField logo = new BitmapField(Bitmap.getBitmapResource("images/logo.png"));
        HorizontalFieldManager container = new HorizontalFieldManager()
        {
            protected void paint(Graphics g)
            {
                g.setBackgroundColor(0x024c87);
                g.clear();
                super.paint(g);
            }

            protected void sublayout(int width, int height)
            {
                height = 46;
                width = Display.getWidth();
                super.sublayout(width, height);
                setExtent(width, height);
            }
        };

        HorizontalFieldManager head = new HorizontalFieldManager()
        {
            protected void sublayout(int width, int height)
            {
                height = 43;
                width = Display.getWidth();
                super.sublayout(width, height);
                setExtent(width, height);
            }
        };

        HorizontalFieldManager OnePixel = new HorizontalFieldManager()
        {
            protected void sublayout(int width, int height)
            {
                height = 1;
                width = Display.getWidth();
                super.sublayout(width, height);
                setExtent(width, height);
            }

            protected void paint(Graphics g)
            {
                g.setBackgroundColor(0x195f96);
                g.clear();
                super.paint(g);
            }
        };

        HorizontalFieldManager TwoPixel = new HorizontalFieldManager()
        {
            protected void sublayout(int width, int height)
            {
                height = 2;
                width = Display.getWidth();
                super.sublayout(width, height);
                setExtent(width, height);
            }

            protected void paint(Graphics g)
            {
                g.setBackgroundColor(0xa5b6c2);
                g.clear();
                super.paint(g);
            }
        };

        head.add(logo);
        container.add(head);
        container.add(OnePixel);
        container.add(TwoPixel);

        return container;
    }
public class SpacerField extends Field {

    private int _height;

    /**
     * Constructors
     */
    public SpacerField() {
        this(2);
    }

    public SpacerField(int height) {
        super(Field.READONLY);
        _height = height;
    }

    public void layout(int widht, int hieght) {
        setExtent(Display.getWidth(), _height);
    }

    public void paint(Graphics g) {
// Add code to colur in SpacerField here.....
    }

}

HorizontalFieldManagers State things horizontally.  You want the willing vertically fields don't you, your container should be a VerticalFieldManager.

Also I would not use a HorizontalFieldManager to provide a colorful region "spacer", which seems an exaggeration.  You can do exactly the same thing with a fields.  See above (I just created it, so it cannot compile).

Sorry for some reason any, he decided that I wanted to add the code before the text.  Well.

Tags: BlackBerry Developers

Similar Questions

  • How to adjust the height of a separator?

    Hello

    I have a scenario as to display three tabs horizontally, developed that display different fields.

    Kindly help me

    1 adjust the height of the vertical line separator.

    2 Add listeners to tune-up for the tabs horizontally.

    3. to select a tab on the selection by changing the background color.

    4. setting the focus to a text field, say search after selecting a tab.

    Thanks in advance.

    ~ SK

    OK, I understand, but I suggest if you are totally new, you learn what you both and your knowledge.  You also start slowly.  So for this thread, let's focus on the variable height SeparatorField.

    Start another Thread for each individual question, ensuring that you explain in detail what you are were trying to do and what is happening.  If you say something like "when I change the update of a text field its new adding another set of fields' this is clearly a bug in your code because standard code doesn't do this, then we will need to see your code.  But do give us all your code.  Try to reproduce the problem with a very small piece of code (10 or 20 lines maximum).  You will often find that when you start from scratch, try to re-create the problem, you find your bug.

    But in this Thread.  Since a variable height that separatorfieldof does not exist in the API, you must do it yourself.

    Here is a post that I think will provide you with the details you need for this:

    http://supportforums.BlackBerry.com/T5/Java-development/nested-HorizontalFieldManagers/m-p/400857#M7...

  • Cam nest excluded Homekit?

    I can only assume, because of the competitive relationship between Apple and Google, but I'm really disappointed to see that the family of nest products is excluded from Homekit.

    Stupid decision, because I do not know that I am not alone to already incorporate the nest in my house and using the app to nest on my phone.  I guess they wanted to be sure that homekit was completely irrelevant for me...

    Google and nest products are in direct competition with Apple and their proprietary Home Kit.  Google paid $3 .2b for nest laboratories and has used to launch Google home.  Completely secure communication protocols different use of two technologies, so are not inherently compatible and nest will be redesigned specifically to be. Google doesn't want you to use the nest with home kit - they want to you use the nest with their system.  Time will tell which competitor wins in the end.

  • Can I create nested address lists?

    I want to create a game of skill nested lists so that I can manage a group large enough contacts in an organization of volunteers with a hierarchy, much like how I manage contacts work with MS Outlook (sorry for mentioing the competition!). I tried to add an existing list (let's call it List1) on a new list (let's call List2) which must also conduct additional individual contacts. When I do this, "List2" shows the individual contacts and "List1" when I select for the ' to: ' line in a new email, "List2" seems OK, but when I send the mail it is sent only to individuals and does not go to the members of "List1".
    I do something wrong or Thunderbird does not support this?

    There is a bug, ask the nested lists, but he's 15, ranked when he still was Netscape. https://Bugzilla.Mozilla.org/show_bug.cgi?id=40301

    More importantly, it is in the list of features for all. https://Bugzilla.Mozilla.org/show_bug.cgi?id=841598
    And important blog posts to explain it. http://mikeconley.ca/blog/tag/ensemble/

  • Firefox starting with window nested after update to v.25.0

    When I start Windows Firefox start with nested window interface. If I close and run firefox again starts just fine.

    http://easycaptures.com/FS/uploaded/809/5563680305.PNG

    I found the reason of this problem.
    Tab Mix more-> Enable crash recovery.
    Problem has been resolved by disabling this option.

  • an easy way to bookmark, choose a nested folder structure

    When you choose bookmarks to a nested folder, it becomes a bit of a chore because you need to click on in the same way in the folder for each selected bookmark.

    Internet Explore has the ability to retain the folder chosen last bookmark of and offer this same folder again when you click the bookmarks for 2nd time button and the following.

    Firefox to be able to open all the bookmarks (in the form of hyperlinks) in a html window. It is no longer possible.

    I know that you can open all the bookmarks in a folder in tabs separated with a single command, but this isn't really what I want.

    You have 2 options:

    1. Use the bookmarks - CTRL + B to toggle the bookmarks open or closed bar. So the path to the nested folder remains open in the sidebar until you close the path by using the "-" to the left of the nested folders.
    2. To display the list of bookmarks HTML in a tab, type chrome://browser/content/bookmarks/bookmarksPanel.xul in the address bar in an empty tab. You can also set a bookmark or your home page to do this for you.
  • Firefox 8 displays the source at insead nested HTML IFRAME

    I got IFRAME nested for a few years, Firefox and other browsers display them without problems, but today with Firefox 8, I see the HTML source of the embedded iframe. My test scenario had a graph of Google in it, but because it is only the display of the HTML, I guess that the content makes no sense. I was about to create a test scenario, but I found that my editor (tinymce) is a failure also probably for the same reason.

    Looks like I answered my own question. The nested iframe did not have a header. Once I added my standard header, it worked. Firefox should get selector on the headers in the iframes.

  • iCloud photoalbums nested library.

    I suspect that I see the same thing as everyone else, but thought I would check.

    I don't see any albums nested in the new feature from iCloud photo library. They are not quote without their enveloping folder, but they aren't there at all.

    I see the same thing. Only my level "Home" albums are visible.

  • Protect nest wants several ports per device IP address

    Hi all

    Rather a strange this...

    I have 4 x nest protect smoke alarms or fire.  All seem to work properly and talk to each other.  I THINK (but I'm not sure) that they connect to nest/Google Internet because the software was getting updated.  So I do know that I have a problem to solve...

    I have configured each of them to have a static IP, and I put the port forwarding for each IP address to have Public and private TCP and UDP ports 80 for device 1, 443 for camera 2, 9543 for unit 3 and 11095 for unit 4.  These port numbers were given to me by the support of nest.

    BUT - when I asked for confirmation that these four setting was correct, I received this statement:

    I understand that you have assigned port 80 of your first protection, 443 to your second Protect and 9543 for your third Protect (or a variant of it).

    Please forgive me for not giving you a complete example of what you need to do before that. As I said in the paragraph above, all ports apply to all devices.

    So if your static IP address for your 1st Protect is 192.168.1.10 will be assigned TCP + UDP 80, TCP + UDP 443, 9543 TCP + UDP and TCP + UDP 11095 to it.

    You must then do exactly the same for the following 3 nest protects you have. Thank you this is a bit tedious, but I assure you there is no additional configuration required for this.

    How is it possible to assign 4 ports on a static address of P?  When I asked this with the assistance of the nest, the response was "I'm really sorry to say this, but it was already not my support framework to help you as I have with the router I was using personal knowledge of port forwarding and hoped that it would be possible for you to apply my instructions using the provided Apple of instructions that I shared with you"

    Ideas anyone?  Or should I just leave it alone because it wouldn't even be a problem to solve?


    So if your static IP address for your 1st Protect is 192.168.1.10 will be assigned TCP + UDP 80, TCP + UDP 443, 9543 TCP + UDP and TCP + UDP 11095 to it.

    You must then do exactly the same for the following 3 nest protects you have. Thank you this is a bit tedious, but I assure you there is no additional configuration required for this.

    How is it possible to assign 4 ports on a static address of P?

    To assign multiple ports to a single static IP address, just enter each required port followed by a comma, for example:

    Public or TCP ports: 80, 443, 9543, 11095

    Public or UDP ports: 80, 443, 9543, 11095

    However, you cannot assign the same ports for multiple static IP addresses.

  • Questions of Orbi and protect the nests.

    I use Orbi for a few weeks and so far no problem. Until today, when I realized my nest protection (fire alarm) is not connected to the network.
    I did a full reset on the nest, I could see the network 'nest' on my list of wifi on my iPhone, but it expires then said I have no network at home. And I do. Given that everything else works.
    Technical support nest is quite usuless. They will tell me just that Orbi isn't on the list not supported. (Because they don't know what it is).
    Any ideas?
    PS: I am connected through Fios.

    I'll answer my own question, as I understand the problem.

    For some reason, nest the deletion of your account and resseting it does not work. It will not be conn ct to Orbi. But a factory reset did the trick.

    To do a factory reset on nest protect so it does not work with Orbi, just hold the home button until it turns blue. Continue to hold until the NEST begins to tell you it's serial number. Release the button before nest is done reading. You will be asked to redo a complete set, and with the large network of Orbi, it worked like a charm.

  • Airport Extreme a different IP address than the NEST

    Hi all

    I have an Airport Extreme new set up a network of comments.  The guest network is configured for the IP addresses in the 172.16... range, compared to the 192.168 range (which is for the network no comments).

    I put my nest on the network of comments.  I see in the settings on the nest indeed connected to the network with an IP 172.16 comments...

    But, when I look at the Airport utility it says the nest is connected using the IP 192.168... which means it is NOT on the network of comments.

    Something is wrong here - is there a bug in Airport utility, causing this or something else, you know?

    Thank you

    Allen

    Something isn't bad. It is normal, unless you want to call normal a "bug".

    AirPort Extreme uses VLAN technology... Virtual local area network... to provide Internet access to the nest using one and only available Internet connection to AirPort Extreme.  Indeed, the NEST uses the same network and the same Internet connection as your other devices that are not on the network of comments.

  • Variable and nested loops

    Hi, I'm a relatively new to programming of LV, so be gentle.

    In a Word, I am running nested loops than the material test power on and off cycles. The parameters for each loop is entered on the front panel of the user. For example, the power supply at the time, how many times to read in the data, power supply off time and the number of cycles power is a typical customer task ask me to do. Therefore, I decided to do a generic as possible executable vi instead of writing code (in which I request is trivial), that my technicians can easily use.

    I want to put a counter - down in this vi, even a journey of one. I'll take the more the off time multiplied by the number of cycles and display on the front panel. For some reason that I can't find a simple way such that when the last cycle ended if poster zero before the program ends.

    For example, the total is equal to 60 minutes and 10-minute cycle. I run the program and the display shows 60 during the first cycle, after the first cycle is complete and the second cycle begins the display turns 50, and so on until that last cycle where you can read 10. Then the program ends and the screen 10. How can I get a last beat of this kind it says 0 and 0 poster before the end of the program?

    Thank you!

    Wire a zero to a local variable of this indicator so that it can turn when the while loop ends.

  • nested functions

    Hello I am doing a report with different signals on the axis y and I created a coordinate of curve to show the selected points.

    I don't know how to display the current value of the point initially reported drawn while the coordinate of the curve is moved by the user. I know I can do it with pragmatism once the report is loaded, but I do think that the event signals a report when the coordinate is moved.

    I tried to use the following formula in the text editor and it works separately but when I try to nest them to retrieve the index of the value of x and to match the value of there, it generates an error. Which brings me to my question...

    Maybe it's to nest these two PNo and ChD functions?

    Is it possible to call an external function to be run from the text editor?

    Is there a work around?

    I'd appreciate your help...

    Here's the nested function

    This works...

    @PNO("[12]/[1]",CurrXValue) @.
    @ChD(1,"[12]/[2]") @.

    This is not...

    @@ChD ((PNO("[12]/[1]",CurrXValue)), "[12] / [2]").

    Bertha

    A function is call "User Commands" that allow you to make your own vbs function that can be called to notice or report with the @ prefix and suffix.

    Use of this function must allow you to put together your order based on a vbs that can then be called in your new order.

    Use help to find 'Use of the user controls' for details.

    Paul

  • nested loops for speed optimization

    Hello. I need help to optimize for speed (in LabVIEW) code (matlab) following:

    -----------------------------------

    a = rand(1024, 200);
    b = rand(1024, 512);
    c = Zeros (200,512);
    ICT
    for i = 1: 200
    j = 1:512
    c (i, j) = (Sum ((:,i).*b(:,j))) a ABS;
    end
    end
    Table of contents
    end

    -------------------------------------------------------------

    Basically I have two 2d tables, a and b, one with 200 columns and rows of 1024, other columns a 512 and 1024 lines. What I have to do is multiply (dot product) each column a each column of b, the sum and take the absolute value of the result. The output, c, will be an array of 2d of size 200 x 512. Is it possible to do without the help of 2 loops of nesting? The two paintings 2d, a and b\, are produced by my material.

    What is the best strategy to get the maximum speed? I have a powerful enough processor.

    Thank you very much?

    So I looked at this problem, said «seems familiar, but different...» ».  Did a little math, encoded at top and improved the speed by a factor of 100 (with absolutely no parallelism).  How about apples?

    If we let A and B tables 1024 x 512 and 1024 x 200 and turn them into matrices, the problem is (mathematically) the absolute value of the transposed from A times B, where "the times" are the multiplication of matrices.  I "guessed" that NEITHER would have included the Multiplication of matrices in his bag of tricks and maybe optimized, so I coded it upward, adding the calendar.

    Using the first double Lynn - to multiply, sum, formulation of abs and a 'do it as a matrix' on my machine, the Array 1004 msec, the matrix method took 10 msec, as well as the results differ by less than one part in 1 million (I generated at random (0, 1) floats, and made the comparison by subtracting the two tables and checking that the absolute all the differences were less than 1E-6).

    Bob Schor

  • How to create a nested local variable control custom?

    I inherited code which has a cluster of CTL control nested inside another group of control CTL.  If I drag the control nested outside the border of the other, I can right-click to create a local variable, I need to connect to the bundle name.  However, as soon as I drag the inside the limits of external control, it breaks the local variable.

    How can I create a local variable in a cluster THAT CTL nested in a second group CTL?

    Is there some kind of reference OuterCluster.InnerCluster, that I can use if I do a local variable of the external group?

    It turns that I need a local variable for the cluster internal.

    JPG attached shows that I created a local variable for the external cluster (ParametersCluster), used a Unbundle based on the name to access cluster internal (EmptyParmeters) and can access one of the elements through an another Unbundle by name.

Maybe you are looking for