Aligning managers

Hello. This is my first post on these forums. I recently created my own tab bar with a HorizontalFieldManager. This works as expected, but I would like to the bar of tabs to be at the bottom of the screen (anchored here if possible), as I know by default fields are placed in a left to right and from top to down, is fashion the same applies for managers? What I have to put other fields or managers above my tabs bar in order to "push"? Thanks in advance.

public class MyScreen extends MainScreen {
    public MyScreen {
        super();
        HorizontalFieldManager yourManager = new HorizontalFieldManager();
        //Do stuff to set up your manager with the fields it needs

        setStatus(yourManager);
    }
}

Tags: BlackBerry Developers

Similar Questions

  • How to align managers Ref in head

    I'm new to FrameMaker and inherited a license for FrameMaker 8 and some content in this format.

    I usually find FM to have a very usable interface (especially for the power it provides) but I'm stuck on a problem, and I hope it's just me lack of something simple.

    I have a paragraph called style "Note".  It is located to have frameworks above and below, with colored dotted lines.  These work perfectly.

    However, I would like this style should be harmonized in the head to one side, rather than the main column.  If I change that setting, it moves to the correct place, the Ref framework aligns correctly, covering only the head of the side under the text... but the superior Réf framework is aligned to the left of the page and running its full width (regardless if the page is odd or even and the head is on the right or left respectively).

    I can't find any setting that will change the set up of the superior Réf framework and I am getting very frustrated.  Can anyone offer all understand why this is happening and how to fix it?

    -Seth Hanisek

    Seth,

    If you want the graphic top (in box above) to be automatically cut by the width of sidehead, it won't work as you put in place, with stops up and down in the same tag.

    When you use sideheads, the frame above behaves in a weird way. Since it is physically before the content of the paragraph of the tag regardless the alignments of content sidehead (first base line, top edge, last line of base), there will always be placed across the width of the frame of reference that is drawn on the reference page (this is the behavior in all versions of FM I know).

    The frame of reference used in the frame position below, however, gets always cut to the width of the column or sidehead. Therefore, you must really use this location for your top graphic element.

    How to use this in a below position with content that will succeed him in so if you get something like that?

    Must be actually used three whole paragraph tags to achieve the correct effect. In the example graph above, the magenta squares show for two lines line spacing so that you can see that this vertical alignment/spacing is preserved between paragraphs when the sidehead is entered.

    First of all, make sure that your frames of reference (I'll call them up and down) on the reference page are exactly the same height as the line spacing: used to your body paragraphs (14pt in the example).

    Then, you must create three paratags: sidehead_anchor, sidehead_top and sidehead_bottom (or whatever you want to call them).

    The sidehead_anchor paratag (spotted by Red fly in the example above) must be set to have the space below the NEGATIVE twice body paragraph (and the terms of reference) width, that is - 28pt in this case. Line spacing should be set to 0 PT and the following Pgf tag must be set to the paratag of sidehead_top.

    Now, for the paratag of sidehead_top , you must set this to have TFP above: identical to the previous sidhead_anchor below, spacing spacing that is - 28pt in this case. Then set to normal soacing spacing used in the body paragraphs (14pt in this case), and then set the platform next to the sidehead_bottom tag tag. You must also define the reference below bmp: (no higher) to be the one you want to show above your text of sidehead, for example Top.

    Then, you must specify for the paratag of sidehead_bottom 0pt both above and below the FMP spacing and have normal spacing of body (in this case 14pt). Set the next tag FMP to be the body paratag (or other) that you use for the standard text that you enter. Also set the terms of reference background in TFP below: setting.

    Now you're ready.

    To use these tags, first insert the paratag of sidehead_anchor , and then press ENTER two times (this will insert the following tags automatically) and start typing your sidehead cutting-edge content (which will move into the paratag of sidehead_bottom ) and press ENTER when the fact to return to the paratags of the body.

    I hope this work for you.

  • Alignment editfields & bitmapfield using managers

    Hello

    I am the creation of screen which has 4 editfields basic and in the an of the fundamental change field I want to add a question mark image (which is a field that is focusable)

    all editfields have a limit of 64 characters, and it will not allow NEW_LINE (so NEW_NEWLINE)

    The arrangement is as follows

    basicedit1: aaa

    basicedit2: bbbb?

    basicedit3: ccccc

    basicedit4: ddddd

    I use a horizontal for the basicedit2 Manager & the question mark field.

    This Manager and other areas of the basic edition are added to the vertical field Manager

    The problem is when I enter 64 char basicedit1 (when the w & m when the tank move to the new line) moving the image to the left. How can I avoid this in basic edit2 the tank behind the image?

    How can I implement this better

    You could add a pair of VerticalFieldManagers to the HorizontalFieldManagers that make your line for a column as layout within each line.

  • Performance of managers

    Hello

    A question about the performance:

    Is it better to use nested HFMs and VFMs to use custom managers?

    What you normally use in your applications? You nest managers and use alignment to get the user interface looks like as you want or just use your own custom managers?

    Personally, I like custom managers, but I don't know if it's the right way to code in terms of performance.

    Thank you so much

    Concerning

    The answer (as would be expected) is: it depends.

    Integrated managers are indeed well optimized. The problem is that they seem to be too optimized in some places. In addition, if you rely on them, you give up a checksum on your application. It can be very annoying trying to achieve this exact layout you are targeting if you use just VFMs and HFMs.

    However, managers customized, giving you total control, shift all the weight of the responsibility for the work of the application on you. You need some excruciating attention to detail so that they work properly, smoothly and intuitive.

    For example: If you use a HFM in your application, horizontal navigation causes shifts focus, while vertical jump to other handlers (if any). You can get the same result with your custom manager - but you need to know exactly what you're doing, so don't forget you want to achieve this in the first place!

    It is extremely easy to screw up a custom Manager. However, you can create much more beautiful applications if you use them correctly. I work a lot with custom managers (the extent of dynamically loading XML page layout), but I always start with built-in ones and go to the custom layout after fully understand what I want to achieve.

    Good luck!

  • What is the best way to manage fields on a screen to draw in paint () or manage through managers and their layout() method?

    Hi all,

    Sorry if this is a stupid question, but I'm kind of confused because of my friends on my code examination. I just thought that this forum is the right place have the answer

    I develop a very simple screen but I m using feeders to quidon all the placement of objects on the screen.

    I has a high HFM which has 2 tags that is exterme right and the other is on the far left of the hfm screen.this is added to the screen

    There is a value for money including two labels and two basicEditFields.

    There is an another HFM which has two button in what should be at the centre of the screen.

    This button HFM is add in the optimization of the resources that are directly added to the screen

    Now all the alignment of the manipulated by the sublayout methods of the manager.

    According to my friends, I should HAV done this VIA object not via too many Manager and their layouts...

    I want to know are right? or you can suggest a better way?

    Concerning

    In General, having too many managers slows down things. It is generally recommended to have as little as possible nesting Manager.

    That being said, your friend is too complicate things. Managers are there for a reason and you use them for good reasons (to quickly, glancing at your description, this can be done via a single Manager custom without using a lot of nesting of the optimization of the resources/HFM).

    Managers will take care of the tune-up, scrolling, etc.. Fact all through painting is stupid for this use case.

    With the help of de facto managers save time, makes it easily manageable code, reduced the number of errors and makes things simpler to support/extend in the future.

    There are cases where the surrogate object and made everything yourself is preferable, is not. For this particular case, your friend is wrong.

  • Home of the alignment Manager!

    Hi, deve

    In my last project, I use many managers temporary position fields on the LEFT, CENTER, RIGHT... with pading, margin etc (very difficult).

    Now, I want to set up my own HorizontalManager just like the former HFM, but has RESPECT for the style LEFT, RIGHT, CENTER, TOP, BOTTOM... so that all beginners like me will position the field where we want!

    Please help me to find the bugs and get an executable demo of it.

    public class HorizontalManager extends HorizontalFieldManager
    {
        public HorizontalManager()
        {
            super(USE_ALL_WIDTH | USE_ALL_HEIGHT);
        }
    
        protected void sublayout(int width, int height)
        {
                    if(field.isStyle(FIELD_CENTER))
                    {
                      //...
                    }
                    else
            super.sublayout(width, height);
        }
    }
    

    Well,.

    It is natural for HorizontalFieldManager neglect alignments of the child fields FIELD_LEFT, FIELD_HCENTER and FIELD_RIGHT. It respects all kinds of vertical alignment, however.

    If you want to do something more versatile, first to define its behavior in cases like all several fields with FIELD_LEFT (same for styles FIELD_HCENTER and FIELD_RIGHT). Don't even start to program before making these decisions (and documented!)

    HTML/CSS float: left and float: right may seem good examples-, but they must specify their width beforehand or the behavior becomes unpredictable.

    If you want a manager with only three fields – left, Center and right - the task becomes much easier (and much, much more limited in scope). It's a very simple thing to do — in fact, it has been done several times already. I suggest that you first look at the code here:

    Managers, the fields and advanced buttons

    Special attention to HorizontalButtonFieldSet and JustifiedHorizontalFieldManager.

  • Alignment of the field does not

    Hi, I am building a user interface with Blackberry JDE 5.0 using plugin Eclipse and test the app in Blackberry 9550 Storm Simulator.

    I'm trying to align a button may be down (first left, second right).

    I try first with a single and I can not aligned at the bottom.

    ButtonField propertiesButton = new ButtonField("Propiedades",ButtonField.FIELD_RIGHT);
    

    This is the complete class code:

    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.ui.decor.BackgroundFactory;
    
    public class SplashScreen extends MainScreen {
    
        //BitmapField splashImage=new BitmapField(Bitmap.getBitmapResource("splash_image_"+Main.getDimentions()+".png"));
        Bitmap bg=Bitmap.getBitmapResource("splash_image_"+Main.getDimentions()+".png");
    
        VerticalFieldManager verticalManager= new VerticalFieldManager(USE_ALL_WIDTH | USE_ALL_HEIGHT | VERTICAL_SCROLL | VERTICAL_SCROLLBAR);
    
        ButtonField propertiesButton = new ButtonField("Propiedades",ButtonField.FIELD_BOTTOM);
    
        public SplashScreen(){
            super();
            //SETS background image
            verticalManager.setBackground(BackgroundFactory.createBitmapBackground(bg));
            verticalManager.add(propertiesButton);
    
            //ADDS Vertical manager REQUIRED!!!!
            add(verticalManager);
        }
    
    }
    

    When I run it, it shows the background without problems and it shows the TOP button. LEFT.

    What is happening maybe?

    The only thing I can think of is the "work area" is only at the height of the button, but vertical Manager USE_ALL_HEIGHT | USE_ALL_WIDTH, and if I set the alignment as ButtonField.FIELD_RIGHT properties it shows still left.

    Any ideas?

    Thanks for your answers, I will appreciate it.

    There is a brief description of how to implement a handler custom in Manager API documentation. There is also a very informative video from RIM:

    http://www.BlackBerry.com/DevMediaLibrary/view.do?name=HowToExtendManager

    There is also a good discussion of BB here layout managers:

    http://developerlife.com/tutorials/?p=808

    Below is a link to an another nice video RIM on how to expand the screen.

  • scroll pane cannot align its content

    When a node (Group for example) is added in a scrolling pane, the scroll pane automatically align the node to the left upper corner of the content area of the scroll pane. How can I customize the alignment of the node (Middle center for example) in the scroll pane. When the size of the node is scaling greater than the size of the pane to scroll bar scroll the scroll pane is displayed and if the node size is shrinking, and there the size becomes smaller that the scroll pane is then the node is aligned on the Community Center. It seems do not take effect if I replace layoutChildren method of the scroll pane and set layoutX and one property of the node.
    If anyone can give me some clue?
    Thank you

    ScrollPanes are a bit tricky to use. They line up not happy, you must use layout managers to do or you need to provision yourself with shapes in groups using absolute coordinates or translations. ScrollPane sets there own viewport associated coordinated and you need to provision your content in this window.

    How can I customize the alignment of the node (Middle center for example) in the scroll pane.

    The layoutBoundsInParent of the node, get the viewportBounds of scrollpane and perform the conversion of the node, such as the center of the node is at the center of the viewportBounds (requires a bit of simple math to do this) by adding listeners on each property.

    When the size of the node is scaling greater than the size of the pane to scroll bar scroll the scroll pane is displayed and if the node size is shrinking, and there the size becomes smaller that the scroll pane is then the node is aligned on the Community Center.

    Similar to above, come to work with these properties.

    Not exactly a direct answer to your question, but you can try to play with the code after if you like Saludon. This is something I wrote to learn about JavaFX layoutbounds system. Resizing of the scene and activating / deactivating elements on and outside will allow you to see the scroll pane. View limits listeners show you properties that you are interested in getting the desired effect.

    import javafx.application.Application;
    import javafx.beans.value.*;
    import javafx.event.*;
    import javafx.geometry.Bounds;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.*;
    import javafx.scene.effect.DropShadow;
    import javafx.scene.layout.*;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.*;
    import javafx.stage.Stage;
    
    public class LayoutBoundsScrollableAnchorPane extends Application  {
      // define some controls.
      final ToggleButton stroke    = new ToggleButton("Add Border");
      final ToggleButton effect    = new ToggleButton("Add Effect");
      final ToggleButton translate = new ToggleButton("Translate");
      final ToggleButton rotate    = new ToggleButton("Rotate");
      final ToggleButton scale     = new ToggleButton("Scale");
    
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage stage) throws Exception {
        // create a square to be acted on by the controls.
        final Rectangle square = new Rectangle(20, 30, 100, 100); //square.setFill(Color.DARKGREEN);
        square.setStyle("-fx-fill: linear-gradient(to right, darkgreen, forestgreen)");
    
        // show the effect of a stroke.
        stroke.setOnAction(new EventHandler() {
          @Override public void handle(ActionEvent actionEvent) {
            if (stroke.isSelected()) {
              square.setStroke(Color.FIREBRICK); square.setStrokeWidth(10); square.setStrokeType(StrokeType.OUTSIDE);
            } else {
              square.setStroke(null); square.setStrokeWidth(0.0); square.setStrokeType(null);
            }
            reportBounds(square);
          }
        });
    
        // show the effect of an effect.
        effect.setOnAction(new EventHandler() {
          @Override public void handle(ActionEvent actionEvent) {
            if (effect.isSelected()) {
              square.setEffect(new DropShadow());
            } else {
              square.setEffect(null);
            }
            reportBounds(square);
          }
        });
    
        // show the effect of a translation.
        translate.setOnAction(new EventHandler() {
          @Override public void handle(ActionEvent actionEvent) {
            if (translate.isSelected()) {
              square.setTranslateX(100);
              square.setTranslateY(60);
            } else {
              square.setTranslateX(0);
              square.setTranslateY(0);
            }
            reportBounds(square);
          }
        });
    
        // show the effect of a rotation.
        rotate.setOnAction(new EventHandler() {
          @Override public void handle(ActionEvent actionEvent) {
            if (rotate.isSelected()) {
              square.setRotate(45);
            } else {
              square.setRotate(0);
            }
            reportBounds(square);
          }
        });
    
        // show the effect of a scale.
        scale.setOnAction(new EventHandler() {
          @Override public void handle(ActionEvent actionEvent) {
            if (scale.isSelected()) {
              square.setScaleX(2);
              square.setScaleY(2);
            } else {
              square.setScaleX(1);
              square.setScaleY(1);
            }
            reportBounds(square);
          }
        });
    
        // layout the scene.
        final AnchorPane anchorPane = new AnchorPane();
        AnchorPane.setTopAnchor(square,  0.0);
        AnchorPane.setLeftAnchor(square, 0.0);
        anchorPane.setStyle("-fx-background-color: cornsilk;");
        anchorPane.getChildren().add(square);
    
        // add a scrollpane and size it's content to fit the pane (if it can).
        final ScrollPane scrollPane = new ScrollPane();
        scrollPane.setContent(anchorPane);
        square.boundsInParentProperty().addListener(new ChangeListener() {
          @Override public void changed(ObservableValue observableValue, Bounds oldBounds, Bounds newBounds) {
            anchorPane.setPrefSize(Math.max(newBounds.getMaxX(), scrollPane.getViewportBounds().getWidth()), Math.max(newBounds.getMaxY(), scrollPane.getViewportBounds().getHeight()));
          }
        });
        scrollPane.viewportBoundsProperty().addListener(
          new ChangeListener() {
          @Override public void changed(ObservableValue observableValue, Bounds oldBounds, Bounds newBounds) {
            anchorPane.setPrefSize(Math.max(square.getBoundsInParent().getMaxX(), newBounds.getWidth()), Math.max(square.getBoundsInParent().getMaxY(), newBounds.getHeight()));
          }
        });
    
        // layout the scene.
        VBox controlPane = new VBox(10);
        controlPane.setStyle("-fx-background-color: linear-gradient(to bottom, gainsboro, silver); -fx-padding: 10;");
        controlPane.getChildren().addAll(
          HBoxBuilder.create().spacing(10).children(stroke, effect).build(),
          HBoxBuilder.create().spacing(10).fillHeight(false).children(translate, rotate, scale).build()
        );
    
        VBox layout = new VBox();
        VBox.setVgrow(scrollPane, Priority.ALWAYS);
        layout.getChildren().addAll(scrollPane, controlPane);
    
        // show the scene.
        final Scene scene = new Scene(layout, 300, 300);
        stage.setScene(scene);
        stage.show();
    
        reportBounds(square);
      }
    
      /** output the squares bounds. */
      private void reportBounds(final Node n) {
        StringBuilder description = new StringBuilder();
        if (stroke.isSelected())       description.append("Stroke 10 : ");
        if (effect.isSelected())       description.append("Dropshadow Effect : ");
        if (translate.isSelected())    description.append("Translated 100, 60 : ");
        if (rotate.isSelected())       description.append("Rotated 45 degrees : ");
        if (scale.isSelected())        description.append("Scale 2 : ");
        if (description.length() == 0) description.append("Unchanged : ");
    
        System.out.println(description.toString());
        System.out.println("Layout Bounds:    " + n.getLayoutBounds());
        System.out.println("Bounds In Local:  " + n.getBoundsInLocal());
        System.out.println("Bounds In Parent: " + n.getBoundsInParent());
        System.out.println();
      }
    }
    
  • Font managers of the RAM and fonts

    Hi all

    I feel that the ability to enable and disable individual fonts using font (font book or third party) management software is designed to eliminate RAM memory (or at least somehow the unloading of the treatment of the Mac).

    I also believe I read that he mentioned somewhere that all fonts placed in the user/Library/Fonts location are always active in the RAM, and this is perhaps why it is important to not just throw hundreds of fonts in this folder.

    I wonder:

    -If above are true?

    -If you use third-party font management software to disable a font placed in the folder User/Library/Fonts eliminates actually he RAM memory (as is probably for policies outside the system of appointed police records)?

    -If none of this is true, then why even should we use font management software to disable or deactivate fonts - why not just let them all turned on if they are not in the RAM?

    I want to make sure that I fully understand. I hope that this will help me make more informed decisions about my workflow of font management.

    I'm under El Capitan 10.11.6, although I don't think that this specificity is relevant.

    Thanks for the informed answers!

    I don't think you are quite correct, I hope someone will correct me if I'm wrong but here is my assessment of the situation...

    All installed or active policies are not loaded in RAM at startup because it would be than a useless on memory limited to Macs. System fonts will be loaded into memory as they are usually required.

    I believe that certain police functions get cached, such as previews of the fonts that are used in some applications, these selection committees are often written cache files stored on the drive that I can tell.

    Installation and activation of the thousands of fonts may cause some problems as apps may need to generate previews of these fonts - for example MS Word has its own custom selector of fonts that use the real font for names selection. Some design apps can analyze or search fonts when opening certain documents with the related font styles. Other applications such as TextEdit, Mail system use based Gatherer so that they benefit the plan puts large fonts in cache.

    The reason of FontBook is to assist in the management of fonts. OS X uses the 'library' system to allow multiple levels of abstraction, by example/System/Library is for OS-level files (stuff own apples), / library of the third parties who rely on the scale of the support system, ~/Library for user specific files. There is even in charge of resources to be stored in/Network/Library for use with a server on a WAN.

    Manage all this complex without a central application. In my view, that order preference is the user on the highest levels, so your own user fonts folder is selected on the system if you named the same way fonts. Part of the idea is also that you can export fonts in your own home library without affecting the other users of the system.

    Third parties also have police managers this attempt to 'do the right thing' based on what documents and applications you use. These are for most major design offices that use custom fonts or is needed to deal with versions of specific fonts, variations and even if the fonts are licenses for specific customers etc.. Fonts dynamically loading & unloading can cause headaches depending on what software you use.

    I do not think that average users need to think about fonts on OS X (beyond adding their favorites occasionally), you may be overthinking it unless you're in lots of design work.

    If you are concerned about running out of RAM, you probably need to install more, get a better Mac or run applications less. Just keep in mind what OS X tent now to use all the RAM available most of the time if not what is the point of installing it?

  • Move the 3 letters for word-how to align results in Keynote?

    As you can see, I am to spoil it enormously. What step I got?

    Thank you.

    In your example, I can't tell what you are trying to do.

    I'll assume that the word "cat" is your difficulty. If you have each of the letters in an individual text box and then select all and choose align > way. If the letters are not text boxes you have set "basic" for the letter t and maybe "character spacing" to the other letters. Enter these words in the help.

  • How to change the default alignment of text in the cells in a table on the demand for numbers?

    I'm new to Mac. I own a MacBook pro MF839HN/A and currently using the 3.6.2 release NUMBERS (2577). I want to know if I can change the default alignment of text in the cell in a table of NUMBERS application? Also, when I select all the cells in a table to change their alignment, I can only change the horizontal alignment of the text and not the vertical alignment. To change the vertical alignment of the text in a cell, I have to select them individually. Help me with two questions.

    The only way I know is to create a table that is set up as you like, then save the empty document as a template customized by using the menu item "file > save as template:

  • moving text, very slightly to align with precision

    Hello

    I do a menu in pages and I would like to move some of the prices on the right side, so they all line up nicely. I don't want to choose all the 'align right' as then the food not all vertically aligned. Is there a command or action that allows me to just move the desired text by small steps?

    Thank you

    There is no adjustment convenient to move the text in small increments. Maybe with InDesign, Quark, or Scribus, but not in Pages.

    If you want your menu items and prices aligned differently and especially perfectly aligned to the right, then use a table that has cell formatting for this purpose.

  • Paging in the poorly aligned table of contents

    As you can see in the screenshot below, the pagination is right-aligned, sometimes in the table of contents, and sometimes it seems all wrong. What should I do to fix this?

    Hello joachim,.

    Pages 5.6.2 on OS X El Capitan 10.11.5

    Menu > view > show rules.

    You can select (click) each level (Style) of the Table of contents and view the parameters of the rule.

    With the second level selected, look in Control Panel of Format > text > tabs

    Please call with questions.

    Kind regards

    Ian.

  • Facebook ask for enable cookies when I already did. Page is white and blue just link on the left-aligned words.

    Facebook appears on white background and text, some with links left alignment.

    allowed, history, cookies, cache, everything I searched on google.

    cookies are already enabled.

    all other websites are ok except fb.

    pls help.

    Apparently, facebook could have updated their ads stuff that make my anti-ad on my phone does not not with facebook. fuck Facebook.

  • How can I display a grid of horizontal alignment in Pages.

    How can I display a grid of horizontal alignment in pages. I can show a vertical, but there seems to be no option to show a horizontal. I use El Capitan with maps, version 5.6.2 Pages.

    Pages v5.6.2 has horizontal and vertical guides, but no grid. The vertical guide is enabled in the menu Pages: preferences: sovereign.

    With the two visible leaders after menu display: display the rule, place the cursor of the black needle on the edge of the respective sovereign and then click. When you see the following icon, drag the new guide in your document. Several vertical and horizontal guides may be present. The view menu has an element of Guides to hide menu or erased.

    • Indicator of horizontal ruler guide
    • Indicator of vertical ruler guide

Maybe you are looking for