SeparatorField - color?

Hello

I tried to change the color of a SeparatorField which I have added to my request (it seems that some applications out there have managed to change the color of the SeparatorField).

However, the following code doesn't seem to work for me:

SeparatorField sepfield = new SeparatorField(){
                                protected void Paint(Graphics g){
     g.setBackgroundColor(Color.RED);
     g.clear();
     super.paint(g);
}
};

I checked the http://supportforums.blackberry.com/t5/Java-Development/separator-in-Screen/m-p/272491#M45499 detachment and looks like I'm doing the same thing that bitkas suggested.

Any ideas?

If this is the actual code of your application, you have capitalized paint (Paint). The function names are case-sensitive, you must be lowercase.

Tags: BlackBerry Developers

Similar Questions

  • Problem to get the background color

    Mr President, in my code, I wasn't able to use fully all the width of the screen,

    This is my code

    public class HorizontalField extends VerticalFieldManager
    {
       HorizontalFieldManager sd=new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH);
       HorizontalFieldManager r1=new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH);
       MySeparatorField ds=new MySeparatorField();
       Font fnt,fntv;
        HorizontalField()
        {
           fnt = this.getFont().derive(FontFamily.SCALABLE_FONT, 14);
           fntv = this.getFont().derive(FontFamily.SCALABLE_FONT, 11);
           r1.setFont(fntv);
           /*---------------------Heading-----------------------------------*/
           DateField dd=new DateField("Date");
    
           dd.setFont(fnt);
           sd.add(dd);
          /*------------------*/
           MyLine s=new MyLine();
           sd.add(s);
           Desp d1=new Desp("Description");
           d1.setFont(fnt);
           sd.add(d1);      
    
           /*_________________*/
           MyLine s1=new MyLine();
           sd.add(s1);
    
           Amt d2=new Amt("Amount");
           d2.setFont(fnt);
           sd.add(d2);
           add(new SeparatorField());
           add(sd);
           add(new SeparatorField());
    
               DateField dfr=new DateField("13.08.09")
               {
                   public void paint(Graphics g)
                   {
                        g.setBackgroundColor(Color.RED);
                        g.clear();
                        super.paint(g);
                   }
               };
               r1.add(dfr);
               MyLine sr=new MyLine();
               r1.add(sr);
               Desp dr=new Desp("Reent")
               {
                   public void paint(Graphics g)
                   {
                        g.setBackgroundColor(Color.RED);
                        g.clear();
                        super.paint(g);
                   }
               };
               r1.add(dr);
               MyLine sra=new MyLine();
               r1.add(sra);
               Amt amtr=new Amt("5000")
                 {
                   public void paint(Graphics g)
                   {
                        g.setBackgroundColor(Color.RED);
                        g.clear();
                        super.paint(g);
                   }
               };
               r1.add(amtr);
               add(r1);
               add(new SeparatorField());
    
           }
    
        }
    
     class DateField extends LabelField
    {
         DateField(String s)
        {
            super(s,LabelField.LEFT);
         }
        public  int getPreferredWidth()
        {
            return Display.getWidth()*2/10;
        }
    
    }
    
      class Desp extends LabelField
    {
         Desp(String s)
        {
            super(s,LabelField.RIGHT);
         }
        public  int getPreferredWidth()
        {
            return Display.getWidth()*5/10;
        }
    
    }
    
      class Amt extends LabelField
    {
        Amt(String s)
        {
            super(s,LabelField.RIGHT);
         }
        public  int getPreferredWidth()
        {
            return Display.getWidth()*4/10;
        }
    
    }
    

    MyLine code is

    public class MyLine extends LabelField
    {
        int width,height;
    
        ButtonField dd;
        MyLine()
        {
            width=1;
            //height=200;
        }
         MyLine(int w)
        {
            width=w;
            //height=200;
        }
    
         public int getPreferredWidth()
            {
                return width;
             }
    
         public void paint(Graphics g)
                {
                       // g.setBackgroundColor(Color.BLUE);
    
                     g.drawLine(0,0,0,70);
                }
    }
    

    When I call this HorizontalField I get the result, but in the amount column (i.e. red) background color I get half of this label, I don't know what problem I did

    Thank you

    The problem is in your calculation of width.

    Your should calculate your width in such a way that (approximate):

    Display.getWidth () = DateField width, width PED, Amt width + 2 * MyLine width;

    Furthermore, a solution may be simply change your constructor Amt class as below:

            Amt(String s)        {                   super(s,LabelField.RIGHT | Field.USE_ALL_WIDTH);        }
    

    Concerning

    Bika

  • I can't change the background color of my Manager

    Hello

    It's my screen simple 3-managers:

        public final class mainScreen extends MainScreen {        HorizontalFieldManager _fieldManagerFirst;        HorizontalFieldManager _fieldManagerSecond;        VerticalFieldManager _fieldManagerThird;        BitmapField _bitmap;        Bitmap _zLogo;
    
            public mainScreen() {            super();
    
                /*             * Build the layout (1st, 2nd and 3rd managers)             */            _fieldManagerFirst = new HorizontalFieldManager();            _fieldManagerSecond = new HorizontalFieldManager();            _fieldManagerThird = new VerticalFieldManager();            add(_fieldManagerFirst);            add(_fieldManagerSecond);            add(new SeparatorField());            add(_fieldManagerThird);
    
                /*             * We fill the firstmanager             */            _zLogo = Bitmap.getBitmapResource("banner.jpg");            _bitmap = new BitmapField(_zLogo);            _fieldManagerFirst.add(_bitmap);
    
                /*             * We fill the second manager             */            ColorButtonField DabButton = new ColorButtonField("DAB");            _fieldManagerSecond.add(DabButton);
    
                /*             * We fill the third manager             */            ColorButtonField BourseButton = new ColorButtonField("Bourse");            _fieldManagerThird.add(BourseButton);
    
            }
    
            public boolean onClose() {            Dialog.alert("Goodbye!");            System.exit(0);            return true;        }
    
        }
    

    I don't have any success to set my _fieldManagerThird to the dark background, of this, I tried both methods without success:

    ...
            public mainScreen() {
                super();
    
                /*
                 * Build the layout (1st, 2nd and 3rd managers)
                 */
                _fieldManagerFirst = new HorizontalFieldManager();
                _fieldManagerSecond = new HorizontalFieldManager();
                _fieldManagerThird = new VerticalFieldManager(){
                    public void paint(Graphics graphics) {
                        graphics.setBackgroundColor(Color.BLACK);
                        graphics.clear();
                        super.paint(graphics);
                    }
                };
                add(_fieldManagerFirst);
                add(_fieldManagerSecond);
                add(new SeparatorField());
                add(_fieldManagerThird);
    ...
    

    and this:

    ...
            public mainScreen() {
                super();
    
                /*
                 * Build the layout (1st, 2nd and 3rd managers)
                 */
                _fieldManagerFirst = new HorizontalFieldManager();
                _fieldManagerSecond = new HorizontalFieldManager();
                _fieldManagerThird = new VerticalFieldManager();
                Background bg = BackgroundFactory.createSolidBackground(Color.BLACK);
                _fieldManagerThird.setBackground(bg );
                add(_fieldManagerFirst);
                add(_fieldManagerSecond);
                add(new SeparatorField());
                add(_fieldManagerThird);
    ...
    

    My 3 Directors stay white, can anyone help out me? THX!

    I hope you tried USE_ALL_WIDTH, not USE_ALL_WEIGHT

    With regard to adding objects to your manager - I thought you added some ColorButton (seems to be a custom in your code class), haven't you?  In any case, managers are just empty shells that exist to manage the other fields, so make sure you add fields to your managers.

    Anyway, even without their USE_ALL_HEIGHT. USE_ALL_WIDTH should be enough to show the black area under your other two directors.

    There is another approach: tell us exactly what you are trying to reach (not black box somewhere - the entire screen and some ideas about his behavior) and we propose ways to resolve this.

  • Background app colors are more uniform

    Since the upgrade of the Sierra, web pages Chrome and the code editor backgrounds Atom are messy. For example, in the atom, it seems that I've highlighted throughout the text, part of the background is dark and some of it is lighter. In Chrome, bluish grey background of Facebook will be uniform and then become clearer on the sides abruptly. This sudden change happens on other colors, which actually look as if I chose the parts of the page with my cursor. Basically the uniform color of the origins on some Web pages or applications (Atom and Chrome) are more uniform.

    This substantive change only happens when I plug my HDMI cable on an external monitor. If I'm working on all of my macbook pro retina screen, everything seems fine. If I plug in my HDMI cable to an external monitor, the sets become non-uniform, even on the macbook pro (when mirroring) of the screen. I used the HDMI cable and the monitor with another computer and the problem does not exist, so I think it has something to do with macOS Sierra. Strangely enough, this problem only occurs with Atom and Chrome. Safari, for example, is absolutely perfect.

    I've included screenshots to show what I mean.

    Hi tedmcdo,

    Thanks for the upgrade to Mac OS Sierra! It seems like when you connect your external monitor to your Mac via HDMI, the Mac knows uniform color schemes. If this only happens when the external monitor is connected, you can try the reset NVRAM while it is disconnected from your Mac.

    What is NVRAM?

    A small amount of memory on your computer called "non-volatile random - access memory" or NVRAM, stores certain settings in a location that OS X can access quickly. Settings that are stored in NVRAM are dependent on the type of Mac you use and the types of devices on it.

    Information stored in the NVRAM may include:

    • The speaker volume
    • Screen resolution
    • Selection of boot drive
    • These latest panic the kernel, if applicable

    If you encounter problems with these features, you may need to reset the NVRAM on your computer. For example, if your Mac starts up from a bootdisk other than that specified in startup disk preferences, or a question mark icon appears briefly at the start of your Mac.

    How to reset the NVRAM on your Mac.

    After resetting the NVRAM, please connect the screen and check if the problem is resolved. Alternatively, you can try to boot your Mac in safe mode.

    What is safe mode?

    Safe mode (sometimes called secure boot) is a way to start up your Mac so that it performs certain checks and prevents certain software from loading automatically or opening. From your Mac in safe mode does the following:

    • Check your startup disk and attempts to fix problems if necessary directory
    • Loads needed kernel extensions only
    • Prevents elements start and the login items open automatically
    • Disables the user installed fonts
    • Delete font caches, hiding the kernel and other files of the system cache

    Together, these changes can help resolve or isolate issues related to your startup disk.

    Try safe mode if your Mac does not end commissioning

    Please use the Apple Support communities to post your question. These procedures should have your Mac showing its vibrant colors on the Retina display as expected. Good day.

  • Overview unwantedly convert a color to transparent (!)

    Hello

    I use a snippet to open png files and save them to gif format (to reduce the size of the file).

    The files are a book cover, including an orange background, with red, white and dark gray text and graphics (curves).

    Yesterday, it worked well.

    Today when I save as gif red color in the image disappears. I guess that it is transformed into Transparent. I see where the red text and graphic lines were is the background orange.

    Preview was not doing this yesterday.

    Today it is the same on the png files that I created yesterday, so I'm sure that change is in the preview, not Inkscape (which I used to create the PNG).

    I do not use the lasso or other tool to select all areas of the picture and enable transparency.

    I open the image, choose the export file to gif format and with the box checked and checked alpha, the color red is disappearing and I don't want it.

    Any suggestions much appreciated.

    Overview 8.1 (877.7)

    10.11.6 OSX

    Thank you.

    Do not use the gif. It is an older format, limited to 256 colors. It is quite insufficient for most uses (with the exception perhaps of dubious of these short "animations").

    One of the unique features of gif should have 'transparency' - but which has been achieved by stipulating a particular table as color being transparent (and not, as in modern formats, by adding a fourth channel, called "alpha channel" to the series of red, green and blue).

    Somehow the red in your translation got to be designated 'transparent color '.

    If you want to reduce the size of the file, try saving to jpeg and quality change to achieve a good balance between size and quality.

  • Impossible to place an order unlock iPhone 7 over 256 GB silver color online

    I can't unlock iPhone ordering 7 more than 256 GB silver color online. Also, I checked with my ISP (AT & T) in the store. Update received saying pre-paid AT & T customer can't place an order for me. And suggested I check in the Apple store. Please suggest me without contract, how to buy iphone 7 more

    Today, I visited the Apple store. Representative informed me that they cannot place an order for customer prepaid with any carrier (AT & T or T-mobile) even if you are willing to pay the total amount in advance.

  • What is the meaning of the colors in the business plan?

    I used the Apple Watch 2 series for the first time during jogging. IM wondering what is the meaning of the colors that appear in the map I've seen since the implementation of the activity in the report of the training session. Anyone know?

    Hello

    Line color reflects your speed (green being faster, the Red being slower).

  • Pages 5.6.2, cannot highlight and change the color of the text?

    I use pages 4.3 and earlier of passage to 5.6.2 - I just tried to highlight a word in a document and change the color - nothing happened.  Tried selecting the color first, and then type a new Word and that doesn't work either.  Am I missing something?  Is there any quick way to the color of the text in 5.6.2?

    To well highlight a word or a selection of words in the v5.6.2, Pages you will need to select the text, click the image below on the gear watch icon and set the fill color of your character. To remove the highlight, select your text, click in the ink of fill color of characters and click transparency icon in the lower right.

  • How can I change the color of Minnie Mouse dress?

    Announcements see the dress of Minnie in red, yellow or blue, but I did not understand how this change in the function 'customize '.  It's three different dials or I missed something?

    Hello

    Follow these steps to change the color of the dress of Minnie:

    • While the airtime on the dial of Minnie Mouse, press firmly on the screen, then press the Customize button.
    • Swipe left / right to switch between the three screens of personalization:
      • The first screen allows you to switch between Mickey and Minnie Mouse by turning the digital Crown.
      • With Minnie Mouse selected, the second Customization screen is used to change the color of her dress, once again by turning the digital Crown.
    • When finished, press the digital Crown twice to return to the watch face.
  • change the color of the title effect

    For this example of a readymade title:

    I would like to know how I could change the color (red) behind the title of the text.  Let's say, I would like the blue instead, or yellow, or anything else.  I tried a number of ways (just getting used to FCP X).  Y at - it a command for this, or should I make a mask with a different color?  Problem is red is lively, and a mobile mast would be required... sort of complicated as a procedure.  BTW, how these securities were made?  In another program, or can they be changed in it?

    2nd question: How can I extend the follow-up of this text as a sequence of animation?  I tried to change the follow-up by degrees and adding images key, but it does not work.  In other words, when you see the title, shown above, I would like to extend then follow-up.

    Thank you.

    As for the above, I just tried to open the color Board and find I can indeed change body color (see screenshot), but the photo image is also affected by the change of color.  How do I get the color of the title change and keep the color of the photo?

  • Can I add a 'color space' on Finder?

    Hey guys,.

    I have google but cannot find any method,

    Is it possible to add 'color space '?

    Thank you.

    What do you mean by "add a color space?

  • Can I make Apple Notes different colors?

    Can I enter records in different colors Notes of Apple?

    If so, they will download to iCloud?

    I'm afraid, it is not possible- notes on iPhone, iPad and iPod touch - Apple Support.

    Inform Apple - http://www.apple.com/feedback/

  • Bring back our colors!

    It's more a coup to face a request (even if it's indirectly)

    The algorithm of color is what iTunes does stand out from other music libraries. That's what throws us in the future. That's what made my whole IMMERSIVE music experience.  I was friggin immersed! At the base.
    Colors made me dream I looked at work in search of inspiration. That's what (as an artist / designer) made me seriously consider my choice of colors for the works of the album and the emotions they could transmit to listeners. The colors are what defined the sounds & mood that I was going to a specific task, I had to do.

    Now, we have this dull eye bland blinding white look of the worksheet have not so much identity I prefer listening to music on my old radio game. When Apple decided to go back rather than forward?
    My iTunes experience was ruined.
    I know that maybe it's not a big deal to some, but trust me many of us enjoyed it as it was before this update.

    Can please take you our colors? You can leave the provision of is. I myself to a switch in the preference window.

    Rants are not allowed here (specified in the warrant if use).

    You're not not address Apple here.  We are all of the users like you.

    You can leave your comments for Apple to the: http://www.apple.com/feedback

  • iMac, boots on the desk and then immediately crashes on the color wheel

    Thanks for taking a peek at my question.

    When I boot my iMac, everything starts up fine in the beginning - he's going right on the desktop, the mouse moves around and, if I'm quick, I can even click on 1 maybe 2 things until the computer completely locks the spinning wheel of death color.  I can still move the wheel on the screen with no latency, but I can't do anything in fact.  Typing on the keyboard does nothing, although the caps lock key will light up.  Boot in safe mode produces exactly the same results, except that it asks me to log in first.

    Something must be start I need to get rid of, although I not much to install on this computer and rarely changes (it is a demo machine that lives in a small computer lab that I managed, off-grid). I never had any problems with it, then one day, this problem started.  Maybe I ran an update of the OS and that caused his crash?

    I am very familiar with troubleshooting a Windows computer, but Mac does not really offer many intuitive troubleshooting options, IMO.  This seems to be a fairly simple matter to reslolve, but my research online have not produced results - people seem to suggest the safe mode and command line solutions, but safe mode doesn't change anything and I can obviously not open a command line to type anything.

    The iMac was bought to 2010 and I'm 99% sure there Yosemite installed, but unfortunately I have no way to be able to check at the moment.

    Any help welcome, thanks!

    Start of recovery volume (command - R on a restart, or hold down the option/Alt during a restart and select the Volume of recovery). Run the check/repair disk utility and repair permissions until you get no error. Then re-install the operating system.

    OS X recovery

    OS X recovery (2)

  • Change color black and white

    MY older iPad has changed color in the negative as opposed to a positive image. I could change this in black and white.  How do I change back to color if settings > general > accessibility > invert colors does not solve the problem?

    Hello

    Go to accessibility disable grayscale settings.

    See you soon

    Brian

Maybe you are looking for

  • Card Pay Apple needs to audit

    Now, I had my checked by phone three times by my financial institution debit card.  Whenever I have restore my phone or in this case, I had the iPhone 7 and its saying my card needs to be retested.  This is in addition to needing another check when I

  • Phoenix envy 810 - 170st: upgrade upgrading graphics Envy Phoenix 810 - 170st

    Update recommendations for nvidia GeForce GT 640 4 GB graphics to enhance the overall performance / game rooms. Looking again 760 GTX. series or better.  My motherboard is Pegatron Corp. 2ACE (socketO) Also please tell me what is my diet. Thank you

  • Web funcionar parou, unknown device

    Funcionar appears device unknown, e desinstalei parou Web reinstalei a web e o problema permanent, esta Informação device gerenciador e

  • ABO upgrade nicht works

    Hallo,ICH habe zwei Abos... Eins und eins as InDesign Illustrator as. ICH möchte nun auf ein Komplettabo für die ganze Suite umstellen. ICH folge ganz exactlydialog box, nur das bei mir nicht das Produkt mit dem blue button "Abo umstellen" wird auf d

  • 'Disable' greyed out

    Acrobat 8 - cannot turn off.