ListField.drawListRow only draws a line in the first row, all the lines.

I'm close. ListField.drawListRow is called for every row without problem, but the two graphics.drawLine only are displayed (shot) in the first row at the point of coordinates noted.

I thought that each line would get the two drawn drawLines?

Graphics.Clear is called correctly (as a test only - I have commented out them as well, but not changes).

How can I get the two Graphics.drawLine at the bottom of the method called for each line, correctly?

public void drawListRow(ListField listField, Graphics graphics, int index,
        int y, int width) {
    Logger.debug("CoffeeStoreContent [drawListRow] y: " + y + " width: " + width);
    /*
     * Top Margin
     */
    y += appGraphics.calcHiRes(6);

    int[] colors = appGraphics.getColorPalette(sportTitle);

    /*
     * Get the current CoffeeStore object.
     */
    CoffeeStore currentRow = (CoffeeStore) get(listField, index);

    StringBuffer subline = new StringBuffer(currentRow.getSource());
    subline.append(Characters.SPACE);
    subline.append("|");
    subline.append(Characters.SPACE);
    subline.append(currentRow.getDateAgo());

    int HiX = 43;

    if (graphics.isDrawingStyleSet(Graphics.DRAWSTYLE_FOCUS)) {
        graphics.clear();
        graphics.setColor(AppGraphics.YELLOW_HIGHLIGHT);
        graphics.fillRect(0, (index * listField.getRowHeight()),
                listField.getWidth(), listField.getRowHeight());

        graphics.setFont(font);
        graphics.setColor(Color.BLACK);
        graphics.drawText(currentRow.getLinkText(), HiX, y, 0, width);

        graphics.setColor(AppGraphics.TEIGHT);
        graphics.drawText(subline.toString(), HiX, (y
                + graphics.getFont().getHeight() + 2), 0, width);
    } else {
        graphics.clear();
        graphics.setColor(colors[0]);
        graphics.fillRect(0, (index * listField.getRowHeight()),
                listField.getWidth(), listField.getRowHeight());

        graphics.setFont(font);
        graphics.setColor(AppGraphics.TSIX);
        graphics.drawText(currentRow.getLinkText(), HiX, y, 0, width);

        graphics.setColor(Color.WHITE);
        graphics.drawText(subline.toString(), HiX, (y
                + graphics.getFont().getHeight() + 2), 0, width);
    }

    graphics.setColor(colors[2]);
    graphics.drawLine(0, 50, width, 50);
    graphics.setColor(colors[3]);
    graphics.drawLine(0, 51, width, 51);
}

No - only y + 50 is enough.

Tags: BlackBerry Developers

Similar Questions

  • Drawing tool is only draw straight lines

    Now when I use one of the free form of drawing tools they Don only in a straight line. The ruler tool is not lit. Its the strangest thing. Has anyone seen this?

    Thank you

    Andy

    Hi Charles,

    You can contact me through feedback in-app? (Press the logo to draw and give us your comments) I would like to get you set up with a pre-release version of the draw which I believe will solve the problem for you.

    Sue.

  • ListField only drawing the top row

    I'm having a problem with using the ListField component and using a custom inside the drawListRow (.) drawing of the callback object.

    I have the following code;

     public void drawListRow(ListField list, Graphics g, int index, int y, int w) {
            int imageHeight = 80;
            int imageWidth = 80;
            int leftMargin = 3;
            int topMargin = 3;
            int padding = 5; //space between adjacent elements
    
            //get the item to be displayed...
            Item item = (Item)listElements.elementAt(index);
    
            //draw the item's image, title, description etc..
            g.drawBitmap(new XYRect(leftMargin,topMargin,imageWidth,imageHeight),item.getImage(),0,0); //image is 80x80, positions x=3, y=3
            g.drawText(item.getTitle(),imageWidth+padding+leftMargin,topMargin);
            g.drawText(item.getDescription(),leftMargin,imageHeight+padding);
        }
    

    My installation works, I add a line to the list (and the line is OK), however, when I add a second line, the second row is created but it is empty.

    Any help is appreciated!

    The 'y' parameter passed to this callback method represents the top of the list to start to paint, I do not see where you set the position is based on this value.

    It seems to me that you can be painting each line of position 'y' in the top row.

  • Draw a line connecting two points in the WPF chart

    I'm trying to understand the best way to draw a line between two existing points on my graph in WPF.  At first, I thought I had it works fine; I just added another parcel to my graph then given exactly two points for rendering.  But I quickly noticed that the app has become surprisingly slow and CPU was quite high (adding other plots does not affect the use of the CPU as long as they have a complete set of points (?)).  He wants me if I looked at using the DataToScreen method on the chart but I can't know what the parameters are.  The second parameter is simply an IList that tells me a lot.  This seems to be the method I want to use for the coordinates of a point on the graph screen.

    No one knows what the second parameter is supposed to be for the DataToScreen method?  Everything I tried throws an Exception of Argument.

    Thank you
    Dan

    DataToScreenwill return a screen coordinate in the plot area of a chart of the value of the raw data horizontal and vertical in the given list. The parameter value is a IList for compatibility with other methods of graphical query such as FindNearestValue , return IList values containing raw data.

    A concrete example, say you had a graphical configuration with a wide horizontal axis ranging from 0 to 100 and a vertical axis double precision ranging from 10 to 20:


            
                
                
            
        

    To get the screen coordinates of the value at the center of the two axes, you can call:

    graph.DataToScreen(plot, new object[] { 50, 15.0 })

    Note that the raw data values corresponding to the type of axes (horizontal AxisInt32 returns the integer 50 and vertical AxisDouble Gets the value 15.0 ).

    You also mentioned a performance issue where "adding other plots does not affect the CPU so that they have a complete set of points". I did a simple test app that adds an array of two points of a chart on each key (for example graph.Data.Add(new[] { new Point(x1, y1), new Point(x2, y2) }); ), but could not reproduce the problem you saw. Could you share the code, you use to draw the connection line?

  • Draw straight lines with Photoshop and the Wacom Tablet pen?

    Hello
    I was just wondering how to draw straight lines using pen Wacom Intuos and Photoshop. I was hoping there was an a little sovereign tool or something that will help you with it but can not understand. Thank you ahead for your help with this.

    Same as with a mouse. Click once on one end of the line the shift click on the other end of the line.

  • How to draw a line (with the line segment tool) then draw another line, from those previous anchor point. When I try immediately draw another line on the other anchor lines it try to turn instead.

    I'm following a course of basic fundamental illustrator on Lynda. The video of "draw straight lines" is troubling me. They draw a line with the line segment and then draw another line coming out the anchor point at an angle.

    Here's where it is troubling me - when I try to drag a line to the anchor point trying to transform the first line, I drew. (the line cursor turns into a selection tool) I can't draw another line connecting the first.

    Advice would be great because it's driving crazy me.

    See you soon,.
    Kyle

    Yes, it is irritating. You must clear the previous line first. If you want to make sure that both ends are perfectly aligned, start by turning on the guides. If you want two lines to be part of the same way, you should use the tool pen instead.

  • How can I draw a line around the edge of a piece of property that I shot a video clip of 13 elements?

    How can I draw a line around the edge of a piece of real estate in a video clip with 13 elements?

    KING OF THE SKY

    First 13 items on what operating system? Have you updated 13 to 13.1 still using Help Menu/updates to date of an open project?

    Your question immediately... you could try something like this

    In this scenario, you start with your video on video 1 track with the Timeline indicator placed in the appropriate location of content timeline.

    The Titler line file created will be automatically placed at the position of the indicator in the timeline.

    Text Menu/New/default of titration / and select the Section forms.

    The Titler file goes to Video Track 2 above the video on the video 1 track.

    Select the line tool in the section shapes and draw your line on screen correspond to the where you want it to appear in the video below.

    Your image of the line is the line on transparent background where the content below shows through the transparent areas in this image of the line.

    Please consider. If any questions or need any clarification on the above, do not hesitate to ask.

    Thank you.

    RTA

  • Check the constraint on the table but to apply only to certain lines?

    Hello

    Using oracle 11.2.0.3

    We have table and you want to put a strain of additional validation on a column on the table, but for this constarint check apply only to some lines in the table

    for example, if the line has produced some type of a particular column must always be completed.

    What is the best way to do this?

    Thank you

    Hello

    More simply

    CHECK (some_column IS NOT NULL

    OR product_type! = « X »

    )

    or, depending on the expected results when product_type is NULL

    CHECK (some_column IS NOT NULL

    OR NVL (product_type, 'OK'). = « X »

    )

  • How to apply the constraint ONLY to new lines

    Hi, gurus:

    I have a question as follows:

    We need to migrate a legacy to a new production server system. I have to add two columns from each table to record that updates the row most recently through triggers, and I must ask constraint not null for columns. However, since the old system has already given for each table and old data have no value for 2 new columns. If we apply the constraint, all existing lines throws an exception. I wonder if there is possibility to apply the ONLY constraint to the new lines coming in the future.

    Thank you.

    Sam

    We need to migrate a legacy to a new production server system. I have to add two columns from each table to record that updates the row most recently through triggers, and I must ask constraint not null for columns.

    The best suggestion I can give you is that you ensure that the management of the documents on behalf of the person who came up with this requirement of brain hair so they can sufficiently punished for the huge waste of human and database resources they have caused for which they almost NOTHING got in return in the future.

    I've seen many systems over the past 25 years + who have added columns such as: CREATED_DATE, CREATED_BY, MODIFIED_DATE MODIFIED_BY.

    I have yet to see a system where this information is really useful for any real purpose. Many systems have the users/application schema, and users can change the data. In addition, a DBA can modify the data, and many of them can connect as long as the schema owner to do.

    Many tables also updated by other applications or processes of loading of bulk and these processes use generic connections that cannot be attached to any particular system.

    The net result is that these columns will be filled by user names that are completely useless for verification purposes.

    If a user is allowed to edit a table, they are allowed to modify a table. If you want to track that you need to implement a security strategy appropriate using the functionality of Oracle's AUDIT.

    Encumber ALL or even many of your tables with columns is a very BAD idea. Worse is the addition of doesn't trigger this server no other goal but captures the useless information, but because they are the impacts on performance just PL/SQL cause worse the total impact.

    Must certainly be to worry about security and auditability of your important data. But by adding columns and triggers, such as those proposed is NOT the right solution to achieve this security.

    Before your organization any decision so stupid you should propose that the same steps before adding this feature you should take before the addition of ANY structural MAJOR or the application:

    1. document the real need

    2 document and justify the business reasons for this need

    3. perform tests that shows the impact of this requirement on the production system

    4. determine the cost of the resources (people, storage, etc.) to implement this requirement

    5 demonstrate how this information will actually be used EFFECTIVELY for professional purposes

    With regard to points #1 and #2 above that the requirement should be noted with regard to the PROBLEM to be solved, not a some preconceived notion of the solution that should be used.

    Your org should also speak to other associations or other departments in your org even who have used your proposed solution and discover how useful it was for them. If you do this research, you may find it has not responded to their needs at all.

    And in your own org, there are probably some applications with tables that already have such columns. Has anyone here EVER used these columns and found them invaluable to identify and solve any real problems?

    If you can't use them and why first add their data to some important process?

    IMHO, this is a total waste of time and resources to add columns in your tables. Any such audit or security, at least, approach will be limited to those tables with key data that needs to be protected, and then only when you cannot implement the appropriate audit "best practices".

    A migration is hard enough without adding unnecessary additional expenses such as those. You have MUCH more important you can do with the resources that you have:

    1. capture all THE DDL for the existing system in a version control system

    2. train your developers on the use of the version control system

    3. determine the correct configuration of the new server and the system. It's almost a CERTAINTY that parameters will change and performance will suffer even if you don't think you have changed anything at all.

    4. validate that the data was migrated correctly. Which may involve a broad polling and comparison to make sure that the data has not been altered during migration. The validation process to a SINGLE TABLE is more difficult if the table structures are not the same. And they will not if you add two columns in each table; every single request, you do have to specify the columns by name in order to EXCLUDE from your two new columns.

    5. validate the performance of the app on the new system. He there will HAVE problems where things do not work as they did. You need to find these problems and fix them

    6 capture appropriate statistics after that data has been migrated and all indexes have been rebuilt.

    7 enter the new implementation plans to use a base for when things go wrong in the future.

    If it's worth doing is worth doing right.

  • When I use the brush or eraser, an O symbol appears next to my cursor and prevents me from drawing a line. Does anyone know a solution to this problem?

    When I use the tool brush or eraser, over every other shot, I get a sign O (circle with a line through it) next to the brush shape / cursor and can't shoot. Please help, this is very frustrating and disrupting my work flow! I paint each frame of the animation, so you can imagine, every other shot is quite often.
    There the layers locked below my active drawing layer, that makes me wonder if Flash is trying to tell me I can not shoot these layers, but I know that more I need these layers there to guide the design of my active layer. I have encountered this problem before with layers being locked and these. What Miss me?

    Any idea is appreciated.

    Thank you!

    I just realized my problem!
    Sorry, it is partially due to my impatience; I get the "illegal sign" when I press a shortcut key to switch from one tool to the other and try to make a stroke when the tool has not finished "switching". So I'm going to press my button "e" with the intention to switch to Eraser tool and I will immediately draw a line, but recently, I noticed that the toolbar did not brush Eraser still at the point where I was drawing.
    So I'll check why my computer is so slow, or I'll try to be a little more patient, or both
    Thank you for your time!

  • draw a line of nested MC to the other

    I use the drawing API to draw a line from one MC nested within two levels of MCs relative to another similarly nested MC. Can someone tell me how to get the X, Y coordinates of the two points?

    It's too much typing. If gp = grandparent, p = parent, c = child, use:

  • Draw a line of text problem in picture 10

    When you use draw an icon of the 'A' of the text line in the chart toolbar, the first letter of the deletions of text when you save your document for all lines after the first.

    Enter text before you save the document:

    Hello

    This

    is

    test

    After you save changes to document to:

    Hello

    his

    s

    CS2

    After each word I hit enter on my keyboard to move to the next line.

    If anyone can help me to solve the problems that the world is large.  I never had this problem when working in frame 9.  Only in the frame of 10.

    Hello Angela,.

    The question above was corrected in FrameMaker 11.

    To work around the problem, you can disable after the flag maker.ini "RepeatTypingEnabled = Off". But after turning off the indicator above, you will not be able to repeat your order hits, which was introduced in FrameMaker 10.

    Thank you!

    Hard

    FrameMaker engineering

  • How to draw a line in Captivate 8?

    I must be missing something obvious, but there is no option of the straight line in the menu forms in Captivate 8 as it was in version 7. and I can't find any other way to draw a line of in Captivate.  I spent some time looking for the forum and the web but only found references using the forms menu in earlier versions.  What Miss me?

    Some features are missing for reactive projects: http://helpx.adobe.com/captivate/kb/top-issues-captivate-8.html

    Ray, free polygon and free forms are on the list. But for normal projects is available. Problem is that not all the form are visible under the large button shapes, you must choose one, then go to the properties panel to see more in this category. Space-saving, I agree.

  • How to draw a line without anti-aliasing?

    I need to create lines for the selected underline buttons in a video menu. If I create a straight line with the line drawing tool line is anti-aliased. According to the position, it has more or less anti-aliasing and as yet will not display the colo complete them lines have different thickness or length. Is it possible turn of anti-aliasing for the daw line tool? I saw no option.

    As a solution, I found only the possibility to use the selection tool and then fill it out. The resulting sharp edges.

    Marcus

    Shape layers are always smoothed, but the nature of the beast, if the shape is not exactly on the limits of the pixels.

    The question is not to disable anti-aliasing, which is impossible for a shape layer - the trick is to get the shape traced on the limits of the pixels.

    Unfortunately there is no option to draw lines on the limits of pixels, but because of some options new added by the Adobe creative team you CAN draw rectangles on the limits of the pixels by selecting the rectangle tool and choosing this option:

    -Christmas

  • How to draw a line on a pic

    CCan I draw a line on a photo in the photo app. ??

    No, but there are many annotation applications in the App Store. To start try Skitch.

    Almost all drawing applications allow you to set photos, then draw over them, too.

Maybe you are looking for

  • The y560 to 1080 p upgrade

    Hello I have a y560. I saw some interest to advice on replacing the screen with a full HD (1920 x 1080). 1 has anyone ever tried this successfully? 2. is there a reason I can't install one of the screens 1080 p for y580 of this site: http://www.Lapto

  • My homepage got randomly switching to another page.

    My netbook is overrun by hostile forces. Please send in the cavalry. I don't know what is happening. This afternoon, all of a sudden my home page randomly switched to another page. It became it * removed * > tried everything I could think of in inetr

  • Monitor does not sleep mode

    Have windows XP on my emachine desktop computer.  have the old monitor vga and lately when the monitor is used in standby mode (energy saving?), he wakes up not when someone is using the keyboard or the mouse.  thinking that the monitor was so hooked

  • HP Laserjet M401A: HP Laserjet M401A not will mark the different paper size and tray on the printer properties

    Hello all. I have a custom paper size in question and the plateau in the properties of this printer. I would like to implement three different printers on the same port, to print directly on a specific tray (without going into the properties of the p

  • output to the Excel Format report

    HelloI have a form to collect data... now I'm trying to create a report in excel format... something like this:is there a tutorial on how to create report output in excel by APEX? If this is not the case, can you please tell how to approach it.Thank