Question when the LabelField or DateField layout() method override

Hello

I add a LabelField to a VerticalFieldManager.

I want set a fixed width for LabelField, trying to override the method of layout as follows:

LabelField label = new LabelField ("some textToShow") {}

public void layout (int width, int height) {}

super.setExtent (40, 50);

}

{} public void paintBackground (Graphics g)

super.paintBackground (g);

}

};

Result: Gets text LabelField disappear, I try to draw a rect with the width and height, it displays the Manager, but I'm not able to view the text that I'm passing with the LabelField, similar happened with DateField too.

I don't want to create a completely custom field, I want to just set the width of my choice and height as what is already to have that is to say the default height.

Please let me know how to do this, what I am doing wrong.

Please, it is urgent and let me know your comments.

Thank you

Kind regards

Aparna

I solved.

Thank you

Aparna

Tags: BlackBerry Developers

Similar Questions

  • Sound and SoundChannel question when the screen is off

    Platform: AIR 3.8 on Andorid

    Classes: SoundChannel & Sound

    Background: I am writing an application that plays the songs one after another. I'm listening to the SoundChannel instance soundComplete event. When the current song is finished, it will create a new Sound object, the sound will then load a URL and play the next song. It worked fine when the application is activated.

    Question: when the application is reduced or if the screen is off, the next song will not be played. I have to switch him back to the app or turn on the screen, then the next song will be played automatically again. I don't know if it's because the of the SoundChannel object soundComplete event will not fire when the screen is off, or if it's because the Sound object doesn't start loading when the screen is off.

    Resolved by the update to version swf SDK 3.9 and export 11.9

  • Question when the workflow started the same session

    Hello world
    I'm having a weird problem. When I start the workflow for the first time, it is stuck at a certain "Activity A" activity with a status of 'Active'. When I start the workflow from the same session for the second transaction, the first transaction is completed and the other is still stuck in the same activity. It continues when I start the workflow from the same session.

    But when I close this session, the last transaction of this session is permanantly stuck to the activity with a status of 'Active'.

    When I open another session and submit the first transaction, once again the same pattern repeats itself.


    The code of the activity where it gets stuck is:
    PROCEDURE PROCESS_REQUEST_SUBMIT (itemtype in varchar2,
    ItemKey in varchar2,
    actid number,
    funcmode in varchar2,
    Out out result NOCOPY varchar2)
    IS
    l_sundry_listing_number varchar2 (30);
    number of l_approval_sequence;
    l_action_by varchar2 (240);
    l_count number;
    BEGIN



    l_sundry_listing_number: = wf_engine.getitemattrtext(itemtype,itemkey,'TRANSACTION_ID');

    Select count (*) in the XXCED_SUNDRY_WF_ACTION_HIST l_count
    where sundry_listing_number = l_sundry_listing_number;

    If l_count = 0 then
    l_approval_sequence: = 0;
    on the other
    Select max (approval_sequence) in the l_approval_sequence of XXCED_SUNDRY_WF_ACTION_HIST
    where sundry_listing_number = l_sundry_listing_number;
    l_approval_sequence: = l_approval_sequence + 1;
    end if;

    l_action_by: = wf_engine.getitemattrtext(itemtype,itemkey,'REQUESTOR_NAME');

    INSERT INTO XXCED_SUNDRY_WF_ACTION_HIST
    (SUNDRY_LISTING_NUMBER,
    APPROVAL_SEQUENCE,
    ACTION_BY,
    ACTION,
    ACTION_DATE
    )
    VALUES
    (l_sundry_listing_number,
    l_approval_sequence,
    l_action_by,
    "Submit."
    TO_CHAR (sysdate, "DD-MON-YY HH24:MI:SS)
    );

    COMMIT;



    END PROCESS_REQUEST_SUBMIT;


    Can someone help me with this problem please?


    Thank you
    Rambeau

    Hello

    So that the workflow must be started correctly, something MUST validate the transaction - be it in your procedure that starts the workflow, or anything that calls this procedure. If there is no commit, then when the session disconnects, it restores the workflow.

    So, try

    begin
    XXCED_APWFL006_SUNDRYAPPR_PKG.Initiate_Workflow(transaction_id=>'SUNDRY-0001',
    requestor=>'AMBALAR');
    COMMIT;
    end; 
    

    SQL * more and see what the results are. If it works, the problem is within your call to call the workflow without a validation process.

    Matt

    Published by: Darryl Burke - advertising and deleted links

  • Question about the RAF read byte array, method

    Hello

    I use file access random byte array read method to read a file. I will print each line, when printing to the last line, it is added with some null characters.

    Can you please suggest how to remove null characters in the last line?

    I use file access random byte array read method to read a file. I will print each line, when printing to the last line, it is added with some null characters.

    No, you're ignoring the read count returned by the method and the treatment of the whole buffer.

  • Contact form questions when the Email is received.

    Using the detailed standard form of contact by Adobe widget, I added a few extra input boxes, I then moved them around so that the 'message' box was inside. When testing the contact form the entrance to the 'message' box was in the middle with the details below. Of course, it will be unacceptable for customers to get this. so is there a way to fix this?

    For example if I don't him have not properly explained.

    My site says:

    Name:

    Phone number:

    E-mail:

    Website:

    Budget:

    Message:

    The mail I receive says:

    Name

    Phone number:

    E-mail:

    Message:

    Website:

    Budget:

    Thanks in advance for any help!

    Notification would include the fields in the list box that they were created, mean field Web site and budget are created after the message field so they would be down in the menu.

    Example: Created in form fields

    Area 1

    Area 2

    Area 3

    -Rearranged the fields:

    Area 3

    Area 1

    Area 2

    Notification form will follow the default hierarchy:

    Area 1

    Area 2

    Area 3

    You will need to remove the message field, create the Web site field and budget and then create message filed if you want the message filed to be included in the last data field in the notification e-mail.

    Thank you

    Sanjit

  • Prediction of the LabelField width front layout of 2 pixels


    I solved it myself. Here's the fix

    public class BBFocusPadding {}

    public static int padding = 0;

    }

  • P2V question when the hypervisor is not accessible

    Hi all

    I just checked the VM converter to virtualize a Win2k8 server. My problem is that the physical Machine is not connected to the network where the hypervisor. So I can't create the virtual machine on the fly.

    Is there a solution to create the server files on an external drive connected to the server and take it with me to import the machine to the hypervisor?

    who is Ron

    You can convert runnning VM Workstation format to local storage, move them and then convert the Worstation ESX format. HTH

  • Drop-down menu does not when the navigation bar collapses in rocker

    Hi all

    I use 3 "bootstrap" on the site below and I have some questions when the navigation bar collapses in rocking, as it seems to stop the drop down menus to work. When you tap or click the drop-down menus, the menu closes just, once again.

    Can someone tell me please on this?

    http://www.clockdoctors.co.UK/test/index.html

    I apologize to this topic. I didn't see that earlier post, I obviously had a blond moment.

    OK, so I think that I fixed it!

    I first tried to remove the script ' ' to see what would happen. Which translates to the stop of the page class 'scrolling' to work, but then allows the drop-down menu to work as it should, as you say.

    I then put this script, but removed this piece of code in the file "agency.js".

    Close the sensitive Menu on the Menu, click on item

    $('.navbar-effondrement_ul_li_a').click (function () {}

    $('.navbar-toggle:visible').click ();

    });

    and now it works fine!

  • How prevention JButton to actions generated when the user press down

    How prevention JButton to actions generated when the user hold down the key or the short cut
    The code below to show the question when the user keep pressing Alt O
    We want to stop the JButton to generate multi shares just a share only
    A code example shows the behavior that needs to be prevented. Keep pressing "Alt + O" and you will see that the standard ouptput will print the timestamp
    Note Please, I'm NOT interested in the mouse press which is a solution by adding a threshold (setMultiClickThreshhold (long line) on the JButton as an attribute.

     
    public class TestPanel extends JPanel
    {
    
       private JButton btn;
    
       public TestPanel()
       {
          btn = new JButton("Open");
          this.add(btn);
          registerCommand(new MyAction(), InputEvent.ALT_MASK,
                KeyEvent.VK_O, btn, btn.getText(), 0);
       }
    
       public static void registerCommand(AbstractAction action,
             int mask,
             int shortCommand,
             JComponent component,
             String actionName,
             int mnemonicIndex)
       {
          InputMap inputMap = component.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
          KeyStroke knappKombination = KeyStroke.getKeyStroke(shortCommand, mask);
    
          if ((component instanceof AbstractButton)
                && mnemonicIndex >= 0
                && mnemonicIndex < actionName.length()
                && (shortCommand >= KeyEvent.VK_A && shortCommand <= KeyEvent.VK_Z))
          {
             ((AbstractButton) component).setDisplayedMnemonicIndex(mnemonicIndex);
          }
    
          if (inputMap != null)
          {
             ActionMap actionMap = component.getActionMap();
             inputMap.put(knappKombination, actionName);
             if (actionMap != null)
             {
                actionMap.put(actionName, action);
             }
          }
       }
    
       public static class MyAction extends AbstractAction
       {
    
          /**
           * 
           */
          private static final long serialVersionUID = 1L;
    
          @Override
          public void actionPerformed(ActionEvent e)
          {
             System.out.println(System.currentTimeMillis());
    
          }
    
       }
    
       public static void main(String... args)
       {
          SwingUtilities.invokeLater(new Runnable()
          {
             public void run()
             {
                JFrame frame = new JFrame("Testing");
                JPanel panel = new TestPanel();
                frame.getContentPane().add(panel);
                frame.setPreferredSize(new Dimension(500, 500));
                frame.setMinimumSize(new Dimension(500, 500));
                frame.pack();
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.setVisible(true);
             }
          });
       }
    
    }
    Published by: user12130673 on 13-feb-2013 03:01

    Use getKeyStroke (int keyCode, int modifiers, boolean onKeyRelease) hit with onKeyRelease = true instead?

  • Question of the development of EditField and LabelField in HorizontalFieldManager

    I actually want a custom editfield (a label with a textbox), when he got focus on this textbox draws a border of climax, and I want the label got the same effect, however, I drew a border outside the text easily because of the text box could receive focus , here is my code:

    public class MyTextField extends EditField
    {
        public MyTextField()
        {
            super();
        }
    
        public void layout(int width, int height)
        {
            super.layout(width, height);
        }
    
        protected void paint(Graphics g)
        {
            if(g.isDrawingStyleSet(Graphics.DRAWSTYLE_FOCUS))
            {
                setBorder(BorderFactory.createRoundedBorder(new XYEdges(6, 6, 6, 6), 0x186DEF, Border.STYLE_SOLID));
            }else{
                setBorder(BorderFactory.createRoundedBorder(new XYEdges(6, 6, 6, 6), Color.GRAY, Border.STYLE_SOLID));
            }
    
            super.paint(g);
         }
    }
    

    And I use this code to show in screen

           HorizontalFieldManager hfm=new HorizontalFieldManager();
            LabelField label=new LabelField("something");
            MyTextField text=new MyTextField();
    
            hfm.add(label);
            hfm.add(text);
            add(hfm);
    

    Is there a way to implement that when the textbox has got the update at the same time also changed the color of the text of the label.

    set a Boolean flag that you record in paint, set it on the ground (from outside) and invalid call to redraw.

  • A question about the methods and parameters.

    Hey guys, this is my first post here. I am very new to Java and done a bit of C++ before Java. I had a question about the methods and parameters. I do not understand the methods; I know they can be repeated when it is called, but it's almost everything. I also know that a program should have a class that contains the main method. What I really, really understand on methods is what the parameters are. I know they are in parentheses and that is it. Could you explain what they are? I really appreciate it. Thanks to all in advance. Best regards, Michael

    Taking an example:
    Suppose you calculate area of the rectangle you need two inputs one is the length and the width. Area = l X b, where l = length, b = width

    If your method, say, calculateAreaOfRectangle (length int, int width) will be two parameters as arguments.

    System.out.println ("field of rectangle:" + calculateAreaOfRectangle (40,30);)

    public int calculateAreaOfRectangle (int length, int width) {}
    int area;
    Area = length * width;
    return of area;
    }

    So if you call this method then the output will be returned in 120.

    Parameters of a method are simply the input variables for the method of treatment for all calculations or something useful.

    And we cannot have methods inside the main method in Java. It is in the java syntax and if you do, it will throw a syntax error.

  • Error #1009 when sound inside game, a movie clip that is called to the scene with child add method

    What is supposed to happen

    I have a clip that is called when the user clicks a button. When moving clip appears music is expected to play. When the user clicks the close button the music stops and the clip is removed from the scene.

    But then I get an error

    When I test the movie I get the following error:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to mc_playSong / frame2 () [mc_playSong::frame2:6]

    This is the code that calls the clip on the stage (no problem here):

    Call the video clip with the song played on stage

    stage.addEventListener (MouseEvent.MOUSE_DOWN, goButtons);

    function goButtons(event:MouseEvent):void

    {

    If (event.target is song_bnt)

    {

    SoundMixer.stopAll ();

    addChild (myPlaySong);

    myPlaySong.x = 558;

    myPlaySong.y = 384;

    Event.stopImmediatePropagation;

    }

    The following code inside the clip is called to the scene. The music is meant to play:

    Stop();

    Variables for listening to music

    var RJPlaySong:RJSong = new RJSong();

    var RJPlaySongChannel:SoundChannel;

    Music for plays

    stage.addEventListener (Event.ENTER_FRAME, startRJSong); (I think that the error in the code is in this function. When I comment on him I don't get error.)

    function startRJSong(event:Event):void

    {

    RJPlaySongChannel = RJPlaySong.play ();

    }

    Stop all sounds, sets variables to null and calls a send event that removes the clip of the scene.

    bnt_closeSong.addEventListener (MouseEvent.MOUSE_DOWN, closeCreditSongScreen);

    function closeCreditSongScreen(event:MouseEvent):void

    {

    SoundMixer.stopAll ();

    RJPlaySong = null;

    RJPlaySongChannel = null;

    dispatchEvent (new Event ("RemoveMCsong"));

    }

    Someone at - it ideas? This seems to be a pretty simple question, but I can't understand it.

    I meant that you have quoted just to be taken literally.  If it's still not clear what I say or what did your code, try the following in order to demonstrate the IT change... This code to be...

    stage.addEventListener (Event.ENTER_FRAME, startRJSong);

    function startRJSong(event:Event):void {}

    trace ("I can do this all day");

    }

    After doing this, you can see why you want to only call the function once, and you could eliminate most of it and just put...

    RJPlaySongChannel = RJPlaySong.play ();

    Instead, or as I said originally, you can change it to be...

    function startRJSong (): void

    {

    RJPlaySongChannel = RJPlaySong.play ();

    }

    startRJSong();

  • Adding to my last question... To keep a background image in the center of the Web page when the browser is shrun

    How do do that?  What is the CSS that makes this work?

    Centers of the background, even when the browser window is smaller or the screen resolution is less, but the content remains stationary in the center of the page: www.signatureweddingsbyjenna.ca

    Hello Jules

    I think that Nancy replied to your question in the other thread.

    I have the site you give as an example, this is the CSS that applies to this image:

    {body
    background - image: URL("page_images/background.jpg");
    bottom-top position: center;
    background-repeat: repeat no.;

    }
    Then of course, it is applied as the context in which theelement, it is placed in the Center and on it and it does not repeat itself.  It is what keeps the central image on the page.  Also helps is that the page is a centered layout.  In the example page that you gave, they have this:
    #page, closure-blocks # {}
    margin-left: auto;
    margin-right: auto;
    Width: 1000px;

    }

    Set the width is important and defining the left/right margin as it means that the browser will allocate the rest of the available space at each margin evently between the two, or put content in the middle.  The only other thing you do is to set the content of the site to the center using
    text-align: center
    It is exlpained herefully.  The only other thing the site has done is put a bit of image information in another element to make it appear that the background image loops in the content.
    Martin
  • Stop method determines when the corruptions are repaired

    Hi all

    Above statement is 'Oracle 10g Ocp Guide of Certification all-in-one'. This statement "chosen shutdown method determines when the corruptions are repaired" is written in the section recovery instance.

    Now the question is, if we do normal stop, how can the database or instance to get corrupt?, Corruption can be occurred only because of the messy or 'give up' or any other breach. It can be detected only at the next startup. So this is the difficulty that corruptions are repaired at the start of the proceedings thus set out reference in question makes no sense.

    If someone can explain to me, what is submitted statement is all about?, I have.

    Thank you

    Assume that you have a server, including controller get "confused" disc and begins to generate corruption level block...

  • When the scaling in the layout, 1st page prints correctly, but the following pages were not properly/too large for the paper, parts of text missing scale

    When you try to print in Firefox and when the scale to the size of the page in the page layout, the first page prints correctly, but the following pages do not scale correctly and are too large for the paper, with the parts of the text are cut off at top and right. It is not fixed by checking or unchecking the scaling / shrink to fit page width "ignore" in the print window, or by changing the scale percent.

    I am running Firefox 15.0.1, on Mac OS 10.5.8.

    The same problem happens in preview print and if I save the copy in a .pdf file

    I tried all the fixes in the how to and others in various forums with no improvement.

    This happens everytime I try to print a document from scaling upwards or downwards in Firefox.

    I note the bug has been fixed and should in Firefox 21 right now, it will mean the use night http://nightly.mozilla.org/

Maybe you are looking for

  • the apple podcast app keeps a story?

    I use the app to apple podcast and listen to several types of podcasts.  I'll put up a podcast before going to bed and put my iPhone stop in half an hour, before his term.  In the morning, I'll listen to a different podcast on my way to work.  Tonigh

  • DV6: lost MS Starter 2010 and visualization Manager.

    Got the error message that Ms Starter was not availble due to the visualization Manager.  Don't know what happened. Tried to do a restore system back a week, still no MS Starter 2010.  Computer that crashed; So I took the outside agency to get a diag

  • offer repeated for update

    Original title: kb2289162 update failed downloaded and continues to try to install it

  • Where the default enforcement strategies? WAAS CMS 5.3.3

    I implement a Manager from Central VWAAS, version 5.3.3. The old CMS runs on a WAE-612, running version 4.4.7. the Old CM, depending on the volume-> AllWAASGroup groups, there were canned application profiles for all kinds of traffic. Apple-iChat, BM

  • WLC problem!

    Hello, Cisco Support Comunnity I have a problem that I hope you and you can help me We have a WLC 4402 in our network, we have 12 AP and we have three SSID that is assignment of IP addresses of three different DHCP pools configured in router base, th