Fields of HFM

How can I obtain a field added in hfm and modify this field? I have a screen with a vertical area manager to mutilate. On the optimization of resources, I would add another vfm dynamically. This optimization of resources has a labelfield and horizontal management. This hfm has a bitmapfield and a labelfield. I was to get the bitmapfield and change the image and redraw again.

Optimization of main resources

VFM1

LABELFIELD1

HFM1

VFM2

LABELFIELD2

HFM3

I've found the workaround. I could get the bitmapfield using getfield (int index) call. Then replace the bitmap with a new image.

Tags: BlackBerry Developers

Similar Questions

  • How to change the background color of the horizontal field Manager

    How can we tell the background color of the horizontal field Manager (hfm) hanger

    If we should extend and override in ppaint, I tried

    I got color of hfm in tag I added to this

    all give me idea

    Try this:

            HorizontalFieldManager manager = new HorizontalFieldManager()
            {
                public void paint(Graphics graphics)
                {
                    graphics.setBackgroundColor(0x000000FF);//blue
                    graphics.clear();
                    super.paint(graphics);
                }
            };
    

    Concerning

    Bika

  • Extraction of the smartview user-defined fields

    I used fields that are defined by the user to create lists. Does anyone know a way I can extract these fields of HFM using smartview?

    Thank you.

    According to Guide of Smartview, user-defined attributes are available for Essbase and HFM no

  • Scrolling tabs

    http://S14.PostImage.org/wjbu9junz/Untitled.PNG

    How can I do something like that? It's marginally frequest appearing... all in the middle... and favorite left right...

    AM stüch here do not know what to do

    PaneManagerModel model = new PaneManagerModel();
              model.enableLooping( true );
    
              // setup the first tab
              VerticalFieldManager vfm = new VerticalFieldManager(
                  Field.USE_ALL_HEIGHT | Field.USE_ALL_WIDTH |
                  Manager.NO_VERTICAL_SCROLL | Manager.NO_HORIZONTAL_SCROLL );
              LabelField lbl = new LabelField( "Content for tab 1", Field.FOCUSABLE );
              vfm.add( lbl );
    
              LabelField myLbl = new LabelField( "Tab 1" );
              NullField nullFld = new NullField( Field.FOCUSABLE );
              HorizontalFieldManager hfm = new HorizontalFieldManager();
              hfm.add( nullFld );
              hfm.add( myLbl );
    
              Pane pane = new Pane( hfm, vfm );
              model.addPane( pane );
    
              // setup the second tab
              vfm = new VerticalFieldManager(
                  Field.USE_ALL_HEIGHT | Field.USE_ALL_WIDTH |
                  Manager.NO_VERTICAL_SCROLL | Manager.NO_HORIZONTAL_SCROLL );
              lbl = new LabelField( "Content for tab 2", Field.FOCUSABLE );
              vfm.add( lbl );
    
              myLbl = new LabelField( "Tab 2" );
              nullFld = new NullField( Field.FOCUSABLE );
              hfm = new HorizontalFieldManager();
              hfm.add( nullFld );
              hfm.add( myLbl );
    
              pane = new Pane( hfm, vfm );
              model.addPane( pane );
              model.setCurrentlySelectedIndex(0); TitleView header = new HorizontalScrollableTitleView(Field.FOCUSABLE);          header.setModel(model);          PaneView paneView = new PaneView(Field.FOCUSABLE);          paneView.setModel(model);          PaneManagerView view = new PaneManagerView(Field.FOCUSABLE, header, paneView);            view.setBackground(null);            view.setModel(model);            view.setFieldWithFocus(paneView);            PaneManagerController controller = new HorizontalScrollableController();            controller.setModel(model);            controller.setView(view);
    
                model.setView(view);                    model.setController(controller);
    
                view.setController(controller);                    add(view);    
    

    its okey it worked.for now I want to see what happens more

  • Newbie question - NullPointerException in enterEventDispatcher

    Hello

    I'm new to the Blackberry development and use the 4.6 SDK Eclipse plugin. I used the sample applications as a basis and try to add 3 buttons to my main screen. It's code to the constructor of the main screen

    public MyAppScreen() {        super(DEFAULT_MENU | DEFAULT_CLOSE);        try{            setTitle(new LabelField("My First App", LabelField.ELLIPSIS                 | LabelField.USE_ALL_WIDTH));                       FieldChangeListener listener = new FieldChangeListener() {              public void fieldChanged(Field field, int context) {                    Field buttonField = (Field) field;                  System.out.println("Button pressed: " + buttonField.getIndex());                }           };              HorizontalFieldManager hfm = new HorizontalFieldManager(                    Manager.HORIZONTAL_SCROLL);             ImageButton commBtn = new ImageButton(Field.FOCUSABLE,                  "img/comm_over.png", "img/comm.png");           commBtn.setChangeListener(listener);                        ImageButton accBtn = new ImageButton(Field.FOCUSABLE,                   "img/acts_over.png", "img/acts.png");           accBtn.setChangeListener(listener);                     ImageButton oppBtn = new ImageButton(Field.FOCUSABLE,                   "img/opp_over.png", "img/opp.png");         oppBtn.setChangeListener(listener);             hfm.add(commBtn);           hfm.add(new RichTextField(Field.NON_FOCUSABLE));            hfm.add(accBtn);            hfm.add(new RichTextField(Field.NON_FOCUSABLE));            hfm.add(oppBtn);                add(hfm);       }       catch(Exception e){         e.printStackTrace();        }   }
    

    I call it in my UiApplication class as follows

    public MyApp() {    MyAppScreen homePage = new MyAppScreen();    pushScreen(homePage);}public static void main(String[] args) {   MyApp app = new MyApp();    app.enterEventDispatcher();}
    

    ImageButton is a custom class whose code I made custom buttons sample application subject to change. When I run the application, I get a NullPointerException and stacktrace illustrates the exception in the MyAppScreen paint method.

    Is someone can you please tell me what could be wrong with the application.

    Thank you.

    @mantaker, sorry, it was just a typo. Fix the code.

    Thanks for all the answers. I solved the problem. Had missed on initialization in a constructor.

    I feel really stupid

  • BlackBerry doesn't scroll to the top of the screen only in the Middle!

    having an application that displays a screen of news with the banner of the app and title + image + details (RichTextField) and a banner ad on the bottom of the screen so once I do scroll down to read the details, I can't go back to the top... It stops in the middle of the screen that you see in these pictures... I don't know why... It works perfectly when you use the key on the touch screen devices

    and here's the code I used for this screen

    public class DetailsScreen_en extends MainScreen {
    
        AppManager appManager;
        private Detailsbean_en bean;
        private AppManager manager;
        private BitmapField bitmapField;
        private LabelField titleField;
        private LabelField dateField;
        private RichTextField articleField;
        private Bitmap bitmap;
        private BitmapField bar;
        private HorizontalFieldManager hfm;
        Adsbean[] adsBean;
        BitmapField ad;
        VerticalFieldManager otherStuff;
        VerticalFieldManager vvv;
        Timer time;
        TimerTask task;
        private HorizontalFieldManager admanager;
        private int adCounter = 0;
        private boolean status;
        private int tour;
    
        public DetailsScreen_en(boolean status, int tour) {
            appManager = AppManager.getInstance();
            adsBean = appManager.getAdsBean();
            Locale.setDefault(Locale.get(Locale.LOCALE_en));
            // ScreenOne.showLoadingScreen();
            this.status = status;
            this.tour = tour;
            XYEdges padding = new XYEdges(10, 10, 10, 10);
            HTMLParser parser = new HTMLParser();
    
            vvv = new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL
                    | Field.FOCUSABLE) {
                protected void sublayout(int maxWidth, int maxHeight) {
                    // TODO Auto-generated method stub
                    super.sublayout(maxWidth, maxHeight);
                    setExtent(maxWidth, Display.getHeight() - ad.getHeight());
                }
            };
            hfm = new HorizontalFieldManager();
            bar = new BitmapField(DesignSizes.FanClubBar(), Field.FIELD_HCENTER
                    | Field.NON_FOCUSABLE | Field.READONLY);
            hfm.add(bar);
            vvv.add(hfm);
            hfm = new HorizontalFieldManager();
            manager = AppManager.getInstance();
            bean = manager.getBean_en();
            // System.out.println("DATE: "+ bean.getNewsDate() );
    
            // another try ...
            Date _date;
            Calendar _cal = Calendar.getInstance();
            _cal.set(Calendar.YEAR,
                    Integer.parseInt(bean.getNewsDate().substring(0, 4)));
            _cal.set(Calendar.MONTH,
                    Integer.parseInt(bean.getNewsDate().substring(5, 7)) - 1);
            _cal.set(Calendar.DAY_OF_MONTH,
                    Integer.parseInt(bean.getNewsDate().substring(8, 10)));
    
            _date = _cal.getTime();
    
            DateFormat dff = new SimpleDateFormat("dd MMMM yyyy");
            String datedatedate = dff.formatLocal(_date.getTime());
            dateField = new LabelField(datedatedate);
            dateField.setPadding(padding);
            titleField = new LabelField(bean.getNewsTitle(), Field.FIELD_LEFT) {
                protected void paint(Graphics graphics) {
                    // TODO Auto-generated method stub
                    graphics.setColor(Color.ORANGE);
                    super.paint(graphics);
                }
    
            };
            titleField.setPadding(padding);
            Font font = Font.getDefault().derive(Font.BOLD, 9, Ui.UNITS_pt);
            titleField.setFont(font);
            bitmapField = new BitmapField(DesignSizes.newsIsLoading(),
                    Field.FIELD_HCENTER);
            bitmapField.setPadding(padding);
            setBitmap(bean.getImgUrl());
    
            articleField = new RichTextField(parser.clean(bean.getNewsArticle()),
                    RichTextField.USE_TEXT_WIDTH | RichTextField.TEXT_ALIGN_LEFT
                            | RichTextField.READONLY);
            // bitmap field for the add bitmap
            ad = new BitmapField(DesignSizes.adBanner(), Field.FIELD_TRAILING
                    | Field.FIELD_HCENTER);
            // horizontal field manager to set the bitmapfield away from the
            // scrollable screen .. as its required to be only
            // on the bottom of the screen !
    
            admanager = new HorizontalFieldManager(
                    VerticalFieldManager.NO_VERTICAL_SCROLL
                            | VerticalFieldManager.NO_VERTICAL_SCROLLBAR
                            | Field.FIELD_HALIGN_MASK);
    
            // the other stuff title bar + action bar + itemRow + button more
            otherStuff = new VerticalFieldManager(
                    VerticalFieldManager.VERTICAL_SCROLL) {
                protected void sublayout(int maxWidth, int maxHeight) {
                    // TODO Auto-generated method stub
                    super.sublayout(maxWidth, maxHeight);
                    setExtent(maxWidth, Display.getHeight() - ad.getHeight());
                }
            };
            admanager.add(ad);
            // font for the article
            Font artFont = Font.getDefault().derive(Font.PLAIN, 6, Ui.UNITS_pt);
            articleField.setPadding(padding);
            articleField.setFont(artFont);
            vvv.add(dateField);
            vvv.add(titleField);
            vvv.add(bitmapField);
            vvv.add(articleField);
            add(vvv);
            add(admanager);
    
            switch (Display.getWidth()) {
            case 320:
                getAd(adsBean[adCounter].getBlackberry320());
                break;
            case 360:
                getAd(adsBean[adCounter].getBlackberry360());
                break;
            case 480:
                getAd(adsBean[adCounter].getBlackberry480());
                break;
            case 640:
                getAd(adsBean[adCounter].getBlackberry640());
                break;
            }
    
        }
    
        private void setBitmap(final String url) {
    
            // TODO Auto-generated method stub\\
    
            UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                public void run() {
                    // TODO Auto-generated method stub
                    final DownLoadImage dope = new DownLoadImage(url);
                    bitmap = dope.getImage();
                    Bitmap resized_bitmap = bitmap;
                    Bitmap tempbitmap = new Bitmap(Display.getWidth() - 20,
                            (int) ((Display.getWidth() - 20) * 0.458));
                    tempbitmap.createAlpha(Bitmap.TRUE_WHITE);
                    resized_bitmap.scaleInto(tempbitmap, Bitmap.FILTER_LANCZOS);
                    bitmap = tempbitmap;
                    bitmapField.setBitmap(bitmap);
    
                }
            });
        }
    
        protected boolean keyDown(int keycode, int time) {
            int key = Keypad.key(keycode);
            if (key == Characters.ESCAPE) {
                try{
                    this.time.cancel();
                }catch(Exception e){
    
                }
                UiApplication.getUiApplication().pushScreen(
                        new NewsScreen_en(status, tour));
    
                return true;
            }
            return super.keyDown(keycode, time);
        }
    
        // =============================================================================================
            // for getting the ads ...
            // =============================================================================================
            private void loadAD(int timer) {
                System.out.println("Timer start! ");
    
                    time = new Timer();
                    task = new TimerTask() {
    
                        public void run() {
                            time.cancel();
                            switch (Display.getWidth()) {
                            case 320:
                                getAd(adsBean[adCounter].getBlackberry320());
                                break;
                            case 360:
                                getAd(adsBean[adCounter].getBlackberry360());
                                break;
                            case 480:
                                getAd(adsBean[adCounter].getBlackberry480());
                                break;
                            case 640:
                                getAd(adsBean[adCounter].getBlackberry640());
                                break;
                            }
                            System.out.println("tik tik tik");
                        }
                    };
                    time.schedule(task, timer * 1000);
    
            }
    
            private void getAd(final String url) {
    
                UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                    public void run() {
                        // TODO Auto-generated method stub
                        final DownLoadImage dope = new DownLoadImage(url);
                        Bitmap bitmap = dope.getImage();
                        ad.setBitmap(bitmap);
                    }
                });
    
                //for saving more memo
                switch(Integer.parseInt(adsBean[adCounter].getAdDuration())){
                case 0:
                    //
                    break;
                default:
                    System.out.println("loading ad! ");
                    adCounter++ ;
    
                    if(adCounter == adsBean.length || adCounter > adsBean.length){
                    adCounter = 0;
                    }
                    loadAD(Integer.parseInt(adsBean[adCounter].getAdDuration()));
                    break;
                }
    
    //
            }
    
            // =============================================================================================
            // =============================================================================================
    
        protected void makeMenu(Menu menu, int instance) {
            // TODO Auto-generated method stub
            menu.deleteAll();
            menu.add(new MenuItem("Language", 120, 10) {
                public void run() {
                    // TODO Auto-generated method stub
                    super.run();
                    UiApplication.getUiApplication().pushScreen(new SplashScreen());
                }
    
            });
            menu.add(new MenuItem("About", 120, 10) {
                public void run() {
                    // TODO Auto-generated method stub
                    super.run();
                    UiApplication.getUiApplication().pushScreen(
                            new AboutScreen_en());
                }
            });
            menu.addSeparator();
        }
    }
    

    Please help me

    scrolling takes in the focusable fields only.
    You can add a NullField in the top to allow scrolling to it.

  • Question about FieldChangeListener

    Finally, I'm going back to rewrite the custom PopupScreen that I created for a blackberry app staff.

    I had a question on a FieldChangeListener I set myself for a button.

    The code looks like this:

    FieldChangeListener fcl = new FieldChangeListener()
    {
      public void fieldChanged(Field field, int context)
      {
        fieldChangeNotify(cancel) //cancel is a public static final int
        close();
      }
    };
    
    ButtonField.setChangeListener(fcl);
    

    My question is this: how to retrieve the context of int fieldChangeNotify (int context) value if the listener is attached to the key?

    I am tempted to write a method that mimics the method getSelectedValue() of the dialog class.

    I just wrote to follow him, not production code, but I need something similar to what you want (a dialog box I could put things in).  I hope you can use it, and it shows you how to enable a button in a return code.

    Note that the questionField is optional, basically, the idea is that this screen will be used when it is necessary to confirm an action and collect additional information.  You can ignore it.

    Here is an example of using the screen - I have; ve just done upwards, so please forgive the errors:

    BasicEditField _questionField = new BasicEditField ("reason for Deferring:", "");
    Create the popup to confirm the defer
    ConfirmActionPopupScreen caps = new ConfirmActionPopupScreen ("Confirm Report", _questionField);
    int response = caps.doModal ();
    If (int ==-1) {}
    cancelled
    } else {}
    Oudit
    String pattern = _questionField.getText ();
    ...
    }

    And here is the screen.  Note that I had to change a few things that are specific to what I do, so it would not work, but you get the idea.

    I hope it works for you.

    class ConfirmActionPopupScreen extends PopupScreen
                                   implements FieldChangeListener {
    
        private ButtonField _okButton = new ButtonField("OK");
        private ButtonField _cancelButton = new ButtonField("Cancel");
        private BasicEditField _questionField = null;
    
        private int _returnCode = -1; // Default to Cancel value
    
        //statics ------------------------------------------------------------------
        private static ResourceBundle _resources = ResourceBundle.getBundle(UIResource.BUNDLE_ID, UIResource.BUNDLE_NAME);
    
        public ConfirmActionPopupScreen(String confirmString, BasicEditField questionField) {
            super(new VerticalFieldManager(),Field.FOCUSABLE);
            // Question Icon and text on top
            HorizontalFieldManager hfm = new HorizontalFieldManager();
            hfm.add(new BitmapField(Bitmap.getPredefinedBitmap(Bitmap.QUESTION), BitmapField.FIELD_LEFT));
            hfm.add(new LabelField(" ")); // Just to space it a bit
            hfm.add(new RichTextField(confirmString, RichTextField.FIELD_HCENTER | RichTextField.FIELD_VCENTER ));
            this.add(hfm);
            this.add(new SeparatorField());
            // Optional Question
            _questionField = questionField;
            if ( _questionField != null ) {
                this.add(_questionField);
                this.add(new SeparatorField());
            }
            // Buttons at bottom
            hfm = new HorizontalFieldManager(Field.FIELD_HCENTER);
            hfm.add(_okButton);
            _okButton.setChangeListener(this);
            hfm.add(_cancelButton);
            _cancelButton.setChangeListener(this);
            add(hfm);
    
            // Focus on Question or Cancel Button
            if ( _questionField != null ) {
                _questionField.setFocus();
            } else {
                _cancelButton.setFocus();
            }
        }
    
        /**
         * Diaplay this Screen and wait for response
         * @return indicator of selected button
         */
        public int doModal() {
            UiApplication.getUiApplication().pushModalScreen(this);
            return _returnCode;
        }
    
        /**
         * Only used to process ESC as Cancel
         */
        public boolean keyChar(char key, int status, int time) {
            //intercept the ESC key - exit the app on its receipt
            boolean retval = false;
            switch (key) {
                case Characters.ESCAPE:
                    _returnCode = -1;
                    close();
                    return true;
            }
            return super.keyChar(key,status,time);
        }
    
        public void close() {
            UiApplication.getUiApplication().popScreen(this);
        }
    
        /**
         * Listen for Button press, and process accordingly.>
         */
        public void fieldChanged(Field field, int context) {
            if ( context == FieldChangeListener.PROGRAMMATIC ) {
                return;
            }
            if ( field == _cancelButton ) {
                _returnCode = -1;
                close();
            } else
            if ( field == _okButton ) {
                if ( _questionField != null ) {
                    // Make sure there is some data entered
                    String temp = _questionField.getText();
                    if ( temp == null || temp.length() < 1 ) {
                        Status.show("Input required, please update \"" + _questionField.getLabel() + "\"");
                        _questionField.setFocus();
                        return;
                    }
                }
                _returnCode = 0;
                close();
            }
        }
    
    }
    
  • Relative position of an image in SO5.0

     public static Field getBanner(){
                Background bg = BackgroundFactory.createSolidBackground(Color.WHITE);
    
                HorizontalFieldManager hfm = new HorizontalFieldManager();
    
                final Bitmap logo = Bitmap.getBitmapResource("ban_40px.png");
                BitmapField _bitmap1 = new BitmapField(logo);
                _bitmap1.setPadding(10,5,5,65); 
    
                HorizontalFieldManager vfm = new HorizontalFieldManager(Field.USE_ALL_WIDTH | Field.FIELD_VCENTER);
    
                hfm.add(_bitmap1);
    
                hfm.add(vfm);
                hfm.setBackground(bg);
                return hfm;
          }
    

    This is my code. I want to have a banner on the top and it does, but as we have different BB with more than 1 type of screen I want to have the banner in the center of the screen at the top.

    Now is on top, but in some BB right in any other BB a little to the left and kills me because I can't find anything about this (lack of atm android )

    any help? How can I put a bit of the image on the screen or other objects! Here is a RelativeLayout or something like?

    Kind regards!

    calculate your padding using Display.getWidth and the size of your image.

  • Problems of UI to render with scrolling

    Hello experts!

    I developed an application that has a child field of verticalManager with a specific height, example:

    VerticalFieldManager vfm = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR | Manager.USE_ALL_WIDTH) {
           protected void sublayout(int maxWidth, int maxHeight) {
            int width = maxWidth;
            int height = 200;
    
            super.sublayout(width, height);
            setExtent(width, height);
        }};
    

    Then, I added a few manager´s with label fields and confines internally, example:

    HorizontalFieldManager hfm = new HorizontalFieldManager(Field.FIELD_LEFT);
    hfm.setBorder(anyborder);
    final LabelField idLabel = new LabelField("BLA ");
    hfm.add(idLabel);
    final LabelField idValue = new LabelField(" BLA");
    hfm.add(idValue);
    

    Well, unfortunately when appear scrolls and I scroll the last element with focus doesn´t appear.

    If I scroll down again the element which should have appeared focusing appear without focus and update the point passed to the order of the day and he didn t show again, unless the item is the last one.

    Any sugestion?

    Best regards, Rampelotti.

    I hoped the calculation would be obvious, but here are a few tips.  This means that the field is added directly to the Manager within which you want to Center.  If this isn't the case, travel managers of the field via getManager() until you get to the one you need and adjust the position of your domain with each Manager (add their x to x of your domain and their y-to-y in your domain).

    1. decide in which Manager you want to visually Center your target area.  Discover the height as using int visualHeight = . getHeight();

    2. find out the scope of your targeted using XYRect fieldExtent = . getExtent().

    This is where you can browse your field managers until you get to the one you need.

    3 calculate the position to reach:

    int newScrollPosition = Math.max (fieldExtent.y - (visualHeight - fieldExtent.height) / 2, 0); cannot access a negative position

    .setVerticalScroll (newScrollPosition);

    If you find it useful, please mark this message as a solution for the benefit of others who may come here via search.

  • Vertical button discussion questions

    I've been at this for hours and can't seem to understand the problem.

    What I want is simple - vertical skinny 6 buttons that stretch to the top of the screen down (fact). I want that they regularly spaced from left to right (done). So I want to click on each of them for different actions. What is happening, it is the first button immediately Gets the focus and seems to have the focus on the entire screen. No matter where I click, the first button is the one that keeps the focus. Help? Here's the code to application below. The buttons spread the field and are inspired by PictureBackgroundButtonField one of the examples.

    SerializableAttribute public class MyApp extends UiApplication implements FieldChangeListener
    {
    //------------------------- Class Attributes -------------------------------
        
    //------------------------- Class Methods ----------------------------------
    Public Shared Sub main (String [] args)
    {
    MyApp PAP = new MyApp ();
            
    Have this app into the event queue
    theApp.enterEventDispatcher ();
    }

    //------------------------- Attributes -------------------------------------
    private display display;
        
    private HorizontalFieldManager hfm;

    private VLineButtonField [] lineButtons = new VLineButtonField [6];

    //------------------------- Constructor ------------------------------------
    public GuitarTunerApp()
    {
    Screen is the screen or basic framework of the user of RIM interface class.
    Screen = new MainScreen();
          
    lineButtons [0] = new GuitarStringButtonField (10, 480, Field.FOCUSABLE |) Field.USE_ALL_HEIGHT, 'E');
    lineButtons [0] .setChangeListener (this);
     
    lineButtons [1] = new VLineButtonField (10, 480, Field.FOCUSABLE, "A");
    lineButtons [1] .setChangeListener (this);
     
    lineButtons [2] = new VLineButtonField (10, 480, Field.FOCUSABLE, "B");
    lineButtons [2] .setChangeListener (this);

    lineButtons [3] = new VLineButtonField (10, 480, Field.FOCUSABLE, "C");
    lineButtons [3] .setChangeListener (this);
     
    lineButtons [4] = new VLineButtonField (10, 480, Field.FOCUSABLE, "D");
    lineButtons [4] .setChangeListener (this);

    lineButtons [5] = new VLineButtonField (10, 480, Field.FOCUSABLE, "E");
    lineButtons [5] .setChangeListener (this);
             
    Add a Horizontal field Manager that contains the custom button sample fields.
    HFM = new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH |)
    HorizontalFieldManager.NO_HORIZONTAL_SCROLL)
    {
    public int getPreferredWidth()
    {
    Return getManager () .getWidth ();
    }
                
    protected void sublayout (int maxWidth, maxHeight int)
    {

    Super.sublayout (maxWidth, maxHeight);

    * If I remove this loop, the buttons eat together on the left with

    most of the buttons has focus on the rest of the screen open at the time. *****

    for (int i = 0; i)< 6;="">
    {
    Field field = getField (i);
    setPositionChild (on the ground, 48 + 51 * i, 0);
    }
    }
    };
            
    Background bg = BackgroundFactory.createBitmapBackground (Bitmap.getBitmapResource ("funImage.png"));
    hfm.setBackground (bg);
            
    for (int i = 0; i)< 6;="">
    {
    HFM. Add (lineButtons [i]);
    }
        
    mainScreen.add (hfm);

    pushScreen (mainScreen);
    }

    ' Public Sub fieldChanged (field field, int context)
    {

    String text = "Button";
            
    If (GuitarStringButtonField instanceof field)
    {
    text = ((VLineButtonField) field) .getName ();
    }
                     
    Dialog.Inform (text + "was clicked.");
         
    }

    Never fails. Post something, then shortly after solve it. It turns out that the super.sublayout (maxWidth, maxHeight);

    was causing me problems. Remove that and setting the scope solved my problems.

  • Tag XBRL

    Hello world

    As we know that we can place XBRL tags in properties of accounts (Max 225 characters).

    We can refer these accounts using the syntax: Hs.Account.XBRLTags (account)

    But how exactly a report which is usefule for analysia and XBRL code will be / can be generated to Hyperion financial management / Financial reporting?

    Rgds
    Payous999

    The XBRL field has been added to the metadata long before the end of the standard ws. In this, it was a 'location '. Later it became more clear that XBRL tagging belongs to the reporting tool, and actually at this time there Hyperion added XBRL functionality in the financial reports. Oracle has published last month a much more complete and robust solution for XBRL called disclosure of the report management. I will present a webcast on May 13, with this product - site ranzal.com under Webinars for more details.

    As for the original question: the XBRL field in HFM metadata can be used as a field defined by the user, with up to 255 characters. So it is a user-defined field fourth in 'secret' for accounts.

    -Chris

  • Fields behind the HFM above

    Hello

    know that I had passed the 1st HFM is every time on the top of the screen, I have another problem! When I add a field to the 2nd HFM and I start this app I don't see this field, because it is behind the 1st HFM and I have to scroll over to see this. Can someone help me?

    Here is my code:

    VerticalFieldManager fieldManagerAll = new VerticalFieldManager(USE_ALL_HEIGHT | USE_ALL_WIDTH | NO_VERTICAL_SCROLL){
                protected void subpaint(Graphics graphics){
                    int height = Display.getHeight();
                    int width = Display.getWidth();
    
                    super.sublayout(width, height);
                }
            };
    
    //      VerticalFieldManager contains title
    VerticalFieldManager fieldManagerTop = new VerticalFieldManager(Field.USE_ALL_WIDTH | NO_VERTICAL_SCROLL){
    
                protected void subpaint(Graphics graphics){
                    int height = Display.getHeight() / 8;
                    int width = Display.getWidth();
    
                    super.sublayout(width, height);
                }
            };
    
    VerticalFieldManager fieldManagerMiddle = new VerticalFieldManager(USE_ALL_WIDTH | VERTICAL_SCROLL){
    
                protected void subpaint(Graphics graphics){
                    int height = (Display.getHeight() / 8) * 5;
                    int width = Display.getWidth();
    
                    super.sublayout(width, height);
                }
            };
    
    //      all fields for title
    
    //      all fields for the middle
    HorizontalFieldManager middleTop = new HorizontalFieldManager(){
    
      protected void subpaint(Graphics graphics){
        int height = (Display.getHeight());//) / 12) * 5;
        int width = Display.getWidth();
    
        super.sublayout(width, height);
                }
    };
    
    HorizontalFieldManager middleTopLeft = new HorizontalFieldManager(HorizontalFieldManager.FIELD_HCENTER){
        protected void subpaint(Graphics graphics){
            int height = (Display.getHeight() / 12) * 5;
            int width = Display.getWidth() / 2;
            super.sublayout(width, height);
            }
    };
    
    Bitmap symbol = Bitmap.getBitmapResource("ressources/100000.png");
    BitmapField symbolField = new BitmapField(symbol, Field.FOCUSABLE);
    middleTopLeft.add(symbolField);
    
    VerticalFieldManager middleTopRight = new VerticalFieldManager(){
        protected void subpaint(Graphics graphics){
            int height = (Display.getHeight() / 12) * 5;
            int width = Display.getWidth() / 2;
    
            super.sublayout(width, height);
            }
    };
    
            middleTop.add(middleTopLeft);
            middleTop.add(middleTopRight);
    
            fieldManagerMiddle.add(middleTop);
    
            fieldManagerAll.add(fieldManagerTop);
            fieldManagerAll.add(fieldManagerMiddle);
    
            add(fieldManagerAll);
    

    The additional Bitmap isn't schown on the screen, I have to scroll!

    Best regards

    Maja

    OK I solved the problem! When I don't value width and height it works!

  • Value of FDM Data Protection - may refer to the HFM account defined field by the user?

    Dear experts,

    regarding the Protection of FDM data feature, is it possible to set as the value of protection all accounts with a given UD1?
    For example, I want to protect all the accounts that have been defined in the HFM with UD1 metadata = Form_Input. Is this possible?
    If so, what should I put in the field of Protection value 1 FDM?

    Thank you!

    It is unfortunately not possible. You can consider using one of the custom dimensions that you probably have hard-coded on the form as protection value instead.

  • Virtual keyboard hides part of the change to the field

    Hello

    I have a labelfield, field change and a button that are centered aligned vertically. The three fields, I added in a Verticalfield Manager which is then added to a horizontal region Manager. And finally the HFM is added to an another value for money. Now in the 9800 device or curve 9380, I noticed that when I touch the edit field, virtual keyboard is coming. And he hides the field partially change.

    I want to move things to the top when the virtual keyboard appeared. How can I do. My code is here:

           HorizontalFieldManager hfm = new HorizontalFieldManager();
            VerticalFieldManager vfmComponent = new VerticalFieldManager(USE_ALL_WIDTH);
            vfmComponent.add(lfServerUrl);
            vfmComponent.add(mEfURL);
            vfmComponent.add(mBtnSave);
            hfm.add(vfmComponent);
            int topEmptySpace = (Display.getHeight() - (Bitmap.getBitmapResource(mStrTopBar).getHeight() + hfm.getPreferredHeight() + 25)) / 2;
            hfm.setMargin(topEmptySpace, 0, 0, 0);
            VerticalFieldManager vfmMain = new VerticalFieldManager(VERTICAL_SCROLL| NO_HORIZONTAL_SCROLL );
            vfmMain.add(hfm);
            add(vfmMain);
    

    Help, please.

    When you start to need as many managers to get the look you want, then you know that you should really create your own Manager.

    These two should help you to do:

    http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-custom-layout-manager-for-a-screen/...

    For example, I hacked together a "centeringManager" and the screen, which should do what you want.  But please use this as a reference sample, understand what he does and maybe even improve it.

    In production code, I would really remove the centeredManager and centering Manager across all fields and place them, but then you must code a manager which includes margins, which would confuse the point of this example - as a basic implementation of a Manager.

    Hope it's what you want.

    public final class CenteringScreen extends MainScreen {
    
        /**
         * verticallyCenteringManager takes one Field and positions it
         * centered in the space it has.
         */
        VerticalFieldManager centeringManager = new VerticalFieldManager() {
            protected void sublayout(int maxWidth, int maxHeight) {
                if ( this.getFieldCount() > 1 ) {
                    throw new RuntimeException("Expecting only one Field or Manager to be added");
                }
                if ( this.getFieldCount() == 1 ) {
                    Field f = this.getField(0);
                    layoutChild(f, maxWidth, maxHeight);
                    int requiredTopMargin = (maxHeight - f.getHeight())/2;
                    int requiredLeftMargin = (maxWidth - f.getWidth())/2;
                    setPositionChild(f, requiredLeftMargin, requiredTopMargin);
                    setExtent(maxWidth, maxHeight);
                } else {
                    setExtent(0, 0);
                }
            }
        };
    
        /**
         * Fields added to centeredManager will be displayed 'centered' vertically
         * regardless of orientation of screen and presence or absence
         * of virtual keyboard
         */
        VerticalFieldManager centeredManager = new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL | VerticalFieldManager.VERTICAL_SCROLLBAR);
    
        // Sample Fields to be added
        ButtonField sampleButton = new ButtonField("Button", ButtonField.FIELD_HCENTER);
        LabelField sampleLabel = new LabelField("Label", LabelField.FIELD_HCENTER);
        BasicEditField sampleBef = new BasicEditField("Text", "", 255, BasicEditField.FIELD_HCENTER);
    
        public CenteringScreen() {        
    
            super(Manager.NO_VERTICAL_SCROLL); // very important
            // The NO_VERTICAL_SCROLL means that the only Manager added to this Screen - centeringManager -
            // will be given as its maxHeight, the available screen height, regardless of
            // orientation or whether there is a virtual keyboard displayed
    
            // add Fields to centeredManager
            centeredManager.add(sampleButton);
            centeredManager.add(sampleLabel);
            centeredManager.add(sampleBef);
            centeringManager.add(centeredManager);
            this.add(centeringManager);
    
        }
    
    }
    
  • How to set horizontal scrolling to horizontal field Manager when fields are added using a loop for?

    The following code snippet contains a horizontal field Manager to which are added five buttons.

    1. I can't the value of horizontal scrolling to horizontal management Manager because of who I am not able to access the keys 4 and 5.

    2. usually, we put horizontal scrolling in the following way:

    container = new HorizontalFieldManager(USE_ALL_WIDTH|HORIZONTAL_SCROLL|HORIZONTAL_SCROLLBAR);
    

    3. so I also tried setting of horizontal scrolling in the following way

       container = new HorizontalFieldManager(Manager.HORIZONTAL_SCROLL|Manager.HORIZONTAL_SCROLLBAR)
                {
    
                    protected void sublayout(int maxWidth, int maxHeight) {
    
                        Field field = null;
                        int x = 0;
                        int y = 0;
                        int maxFieldHeight = 0;
                        int maxFieldWidth = 0;
                        for (int i = 0; i < getFieldCount(); i++)
                        {
                            field = getField(i);
                            layoutChild(field, maxWidth, maxHeight);
                            setPositionChild(field, x/*width-field.getWidth()*/,y);
    
                            x+=field.getWidth();
    
                            maxFieldWidth = maxFieldWidth + field.getWidth();
                            System.out.println("field width"+field.getWidth());
                            System.out.println(" max field width"+maxFieldWidth);
    
                            if(i==0)
                            {
                                maxFieldHeight = field.getHeight(); // height set of the first button since all components have the same height
                            }
                        }
                        System.out.println("final max field width"+maxFieldWidth);
    
                        setExtent(maxFieldWidth, maxFieldHeight);
    
                    }
                };
    

    but it's not working.

    4 I found this property: (position) horizontalFieldManager.setHorizontalScroll; that contains the parameterioo where the post is supposed to be the new horizontal scroll position. I tried passing the coordinate x of horizontal field Manager, but it does not work. I should pass as a parameter position?

    HorizontalFieldManager container = new HorizontalFieldManager()
    {
        protected void sublayout(int maxWidth, int maxHeight)
        {
            Field field = null;
            int x = 0;
            int y = 0;
            int maxFieldHeight = 0;
            for (int i = 0; i < getFieldCount(); i++)
            {
                field = getField(i);
                layoutChild(field, maxWidth, maxHeight);
                setPositionChild(field, x,y);
                x+=field.getWidth();
                if(i==0)
                {
                    maxFieldHeight = field.getHeight(); // height set of the first button since all components have the same height
                }
            }
    
            setExtent(Display.getWidth(), maxFieldHeight);
    
        }
    };
    
    ButtonField button1 = new ButtonField("Button1");
    ButtonField button2 = new ButtonField("Button2");
    ButtonField button3 = new ButtonField("Button3");
    ButtonField button4 = new ButtonField("Button4");
    ButtonField button5 = new ButtonField("Button5");
    
    container.add(button1);
    container.add(button2);
    container.add(button3);
    container.add(button4);
    container.add(button5);
    
    add(container);
    

    Need your valuable comments and suggestions. Please help me.

    I think that there is a bug in the sublayout (your HorizontalFieldManager 0 mode.  Given that the code did what I think WHAT HFM will do anyway, I recommend that you try to do this with a standard HFM, using this style:

    Manager.HORIZONTAL_SCROLL | Manager.HORIZONTAL_SCROLLBAR

    Let us know how you go.

    When I have more time I'll explain the bug, but if you want to investigate something, be aware that the maximum size that you can use in setExtent are the values that are passed to sublayout.  Compare the width as you try to define in setExtent whose width is increased.

Maybe you are looking for

  • Satellite C660 - what is VEN_8086 & DEV_3B56?

    PCI\VEN_8086 & DEV_3B56 & SUBSYS_FD3C1179 & REV_05\3 & 115 83659 & 0 & D8 What is it?

  • Can I remove older versions of Libskylib?

    My com.skype.raider/lib file contains Total 440M a system - rwxr-xr-x 1 114 K 2016-05-05 06:09 libBreakpadIntegration.so a system - rwxr-xr-x 1 374 K 2016-02-12 19:09 libcodecs.so a system - rwxr-xr-x 1 94 K 2016-05-05 06:09 libgleffects.so a system

  • windows HP Mini 311-1100 CTO PC upgrade

    Hi people: I hope some can help.  I just got the notice that Microsoft ends in favor of XP.  I have a Mini 311 and executed the windows Upgrade Wizard 8. She was experiencing some difficulties in HP integrated module with Bluetooth HP, Version 5.5.0.

  • How to use USB with the name of resource VISA?

    Hello I am new to LabVIEW and I'm working on a code that must acquire data from a measuring device. This unit has only a USB output, so I have to work with it. As far as know the block that is used to refer to an external port is VISA resource name.

  • How can I remove print that I slipped in simplepass access to my email?

    Is it possible to remove the impression that was accidentally slipped in simplepass scanner ' cuz I click the wrong email on the choice of pop up in the webmail toolbar? [Moved from comments]