TilePane within the scroll pane occupies only a small part of the screen

I have a TilePane consisting of images, the images inside the tilepane is based on the number of images in the folder selected by the user. But there was no scrollpane in the tilepane component, so I decided to put the tilePane within a ScrollPane, but I'm not able to control the height of the scrolling pane to occupy the entire page.

public ScrollPane viewGallery (steps)

{

ScrollPane root = null;

final TilePane tile = new TilePane();

try {}

root = new ScrollPane();

tile.setPadding (new INSET (5, 5, 5, 5));

tile.setVgap (4);

tile.setHgap (4);

tile.setPrefHeight (stage.getHeight ());

tile.setStyle ("background - fx - color: DAE6F3 ;"); ")

File [] listOfFiles = outputFolder.listFiles ();

System.out.println (outputFolder.listfiles (). Length);

for (file: listOfFiles) {}

System.out.println (file. GetPath());

Image image = new Image ("file:"+file.getPath());

Iv2 ImageView = new ImageView();

IV2. SetImage (image);

IV2.setFitWidth (250);

IV2.setPreserveRatio (true);

IV2.setSmooth (true);

IV2.setcache (true);

tile.getChildren () .add (iv2);

}

} catch (System.Exception e)

{

e.printStackTrace ();

}

root.setHbarPolicy (ScrollPane.ScrollBarPolicy.NEVER);    Horizontal scroll bar

root.setVbarPolicy (ScrollPane.ScrollBarPolicy.AS_NEEDED);    Vertical scroll bar

root.setFitToHeight (true);

root.setFitToWidth (true);

root.setContent (tile);

Returns the root;

}

The output is something like this...

http://i.stack.imgur.com/wpD1V.jpg

But I want that it covers the entire page.

I had the problem, did not know that borderPane behaved like that. I always used to think no matter where we are providing in borderPane that it must occupy the entire screen.

As soon as I changed the piece of code below for

border.setCenter (upperPart (internship));

The problem has been resolved.

MainWindow.java (where execution begins)

@Override

public void start (final stage)

{

try {}

Use a component of border as root for the stage

Border BorderPane = new BorderPane();

border.setTop (upperPart (internship));

Tags: Java

Similar Questions

  • Photo Gallery/Windows Vista to scan an image on my Canon printer/scanner and it produces only a small part of the original.

    original title: Trouble scanning an image.

    I use Vista/Windows Photo Gallery to scan a picture on my Canon printer/scanner and it produces only a small part of the original. What should I do to make it load to 100% of the original?

    Sometimes, there is not enough contrast of a photo
    and a scanner may have problems with the edge detection.

    On the preview screen, you should be able to see the
    part of the picture will be scanned.

    This article may be useful:

    Windows Vista - Windows Photo Gallery - scan a picture
    http://Windows.Microsoft.com/en-us/Windows-Vista/scan-a-picture

  • I use iphone videos and still images in a project.  When I drag the videos in the timeline, they work fine, but when I drag still images, I have only a small part of the original photo.  No idea how to solve this problem?

    I use iphone videos and still images in a project of first Pro CC.  When I drag the videos in the timeline, they work fine, but when I drag still images, I have only a small part of the original photo.  No idea how to solve this problem?

    Right click on the photo in sequence and "ladder to the chassis '. Can also be set in the preferences and affect imports after the change

    Thank you

    Jeff

  • The visible property works in content within a scroll pane?

    I have google searche and asked for a solution, but I can't mc._visible = false: or = true; work inside a scroll pane. I have several bubbles placed on a clip that is referenced by the scroll pane. I want the ToolTip to display the mouse on an affected area and disappear on mouse out. This code does not work:

    / * menu * /.
    sp.content.menuTxt._visible = false;


    sp.content.menux.onRollOver = function()
    {
    sp.content.menuTxt._visible = true;
    TPI Content.MenuX._alpha = 50;
    }

    sp.content.menux.onRollOut = function()
    {
    sp.content.menuTxt._visible = false;
    TPI Content.MenuX._alpha = 0;
    }

    But if I move the movie clip to the main stage and copy the code next works:


    / * menu * /.
    menuTxt._visible = false;


    sp.content.menux.onRollOver = function()
    {
    menuTxt._visible = true;
    TPI Content.MenuX._alpha = 50;
    }

    sp.content.menux.onRollOut = function()
    {
    menuTxt._visible = false;
    TPI Content.MenuX._alpha = 0;


    }
    There are some of the affected areas and ToolTips in the clip, and they are also video clips. Am I hitting against a limitation? I found a few references to the depth of clips with regard to scrolling but component which was confusing.

    The only reason why I don't see why the menuTxt would not work inside the scrollpane would be if he was missing his name of the instance.  I say this because to take your code and recreate what I can make the drawing or model and see it work in accordance with what the code told him to do.   It works according to the code, so if you see that it does not work by what you expected, it says not to do everything that it is.   Here is a link to the file...

    http://www.nedwebs.com/Flash/AS2_ScrollPane_MC.fla

  • Button to access within a scroll pane?

    I've set up a scroll pane component and the content of it is a layout of images that are buttons.

    Name of the scroll pane is "mc_pane2".

    Class content is "MyContent".

    And the instance name of the button is 'FloraLytell_btn' (it is essensially a mc with TweenLite code in it to roll over and spread the effects)

    I'm not able to determine what would be an access code to a button in the scroll pane. Here's what I've tried and it doesn't work.

    mc_pane2. MyContent.FloraLytell_btn.addEventListener (MouseEvent.CLICK, onClick_floralytellPopUp);

    function onClick_floralytellPopUp(event:MouseEvent): void {}

    gotoAndPlay ("floralyte2pp");

    }

    Try to launch the content as a MovieClip (the compiler refuses to accept that content is a DisplayObject without explicitly telling you)...

    TweenLite.to (MovieClip (mc_pane2.content). FloraLytell_btn, 1, {x: 200});

  • right-aligned a BasicEditField within the screen

    Hello

    How do your right justify a BasicEditField in a screen?

    If you do the following, framed in any case left field shows:

    Processes = new BasicEditField ("process", 7, Field.FIELD_RIGHT);
    This.Add (processes);

    If you create a LabelField, you can right-aligned it on the screen with this:

    This.Add (new LabelField ("Login al sistema", LabelField.FIELD_RIGHT));

    TKS.

    I wrote my own...

    import net.rim.device.api.system.Display;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.component.EditField;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    
    public class JustifiedEditField extends HorizontalFieldManager implements FieldChangeListener {
    
        LabelField lf;
        EditField ef;
        int dw = Display.getWidth();
        int rightMargin;
    
        public JustifiedEditField(String label, String value, int maxChars, long style) {
            super(USE_ALL_WIDTH);
            ef = new EditField(null, value, maxChars, style) {
                protected void onDisplay() {
                    update(0);
                }
    
                protected void update(int d) {
                    super.update(d);
                    int efw = getFont().getAdvance(super.getText());
                    setPosition(dw - efw - rightMargin, 0);
                }
            };
            ef.setChangeListener(this);
            lf = new LabelField(label);
            add(lf);
            add(ef);
        }
    
        public LabelField getLabelField() {
            return lf;
        }
    
        public EditField getEditField() {
            return ef;
        }
    
        public String getText() {
            return ef.getText();
        }
    
        public void setRightMargin(int m) {
            rightMargin = m;
        }
    
        public int getRightMargin() {
            return rightMargin;
        }
    
        public void fieldChanged(Field field, int context) {
            invalidate();
        }
    
    }
    
  • Movie Maker 6.0 when you try to publish it on a DVD is only a small part

    Issues of MovieMaker
    I made a video in Movie Maker 6.0 and when I try to publish it on a DVD, I get only a tiny part of it.  What I am doing wrong?

    Hello

    I suggest you to see link below and check if it helps.

    Publish a movie in Windows Movie Maker:

    http://Windows.Microsoft.com/en-us/Windows-Vista/publish-a-movie-in-Windows-Movie-Maker

    Solve problems with creating a DVD-video using Windows DVD Maker:
    http://windowshelp.Microsoft.com/Windows/en-us/help/bc732dc8-0cde-43fe-bec6-cd85215810801033.mspx#El

    Hope this information is useful.

  • FF downloads only a small part of an .exe file

    When I go to a Web site that offers a download of their product (.exe), FF gives only option to save (does not) and when I try to save him, I find myself with a file in the destination folder that is only a couple of KB in size... but it should be 3.4 MB.

    Hello

    Please see this.

  • I have a printer HP Deskjet 3054 - when parsing it will be only a small part of what I want to scan

    my printer will scan only the upper left what whether I want to be scanned and I need a whole letter to scan. I went into the settings and there is nothing I can find that will help me. What can I do?

    Hi almarlane,

    What version of OS are you running?

    What application program that you use to scan (capture image scanning HP, ECT.)?

    Make sure you have selected the entire document by holding down the mouse button and drag over the area you're wanting to analyze before hitting the scan button. Here are some documents that help with scanning.

    How to perform a scan: OS X v10.8

    How to perform a scan: OS X v10.7

  • I imported IE Favorites and Firefox recorded only a small part of them.

    I read the other explanations, but am not not clear on how to save bookmarks in html file - there seems to be some missing steps in the explanations or I just don't get it. Want to stop using IE but there are bookmarks. Thanks in advance for any help!

    In Internet Explorer:

    File > Import/Export - Export to HTML file

    then in Firefox:

    Bookmarks > show all bookmarks-> import and backup - import HTML... = HTML file

  • Why make the audio for the whole sequence when you export only a small section?

    If I export only a small part of my calendar, why the first emphasizes the provision of audio for the entire timeline?

    Normally this wouldn't be a problem, except that my timeline has tons of audio on it and the window "made necessary Audio Files" may take 5-10 minutes.

    Here is the link Jim referred to as:

    Feature request/Bug Report Form

  • Graph to render data off the screen

    I have a problem a little bit annoying with graphics. I try to display only a small part of data related to a line chart. I do this by setting the minimum and maximum values of axes. However, when I do this, only the lines between data points falling within the min and max values are displayed. I would like to I see parts of lines all lines that the area of the transect to appear. How can I do this?

    On the LineSeries, try adding filterData = 'false' and see what happens. I have not done so I'm not certain of the outcome.

  • Weather gadget stuck off the screen

    I installed Vista to Windows 7 on my Dell laptop. The Weather Channel gadget is stuck off the screen, with only a small part visible. I can't move it, but I can open it from the small arrow is the only thing that I can see. How can I take off it to move on the desktop?

    Hello Smarski,

    I don't know what you see for the arrow. I installed the Weather Channel widget and find the normal buttons, including relatives, gadget drag more big size, Options. Try to right-click on it and using the menu shortcut or select move and move the gadget, or select close and then open again to place it in the default location on the desktop.

    Hope this helps

    Chris.H
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Desktop doesn't fill the screen

    I have recently reinstalled the operating system on an inspiron 8100 and gave in and gave to a former friend.   The unit is having the same problem I had with it, years ago.  However, I don't remember how I fixed it then.

    The problem is that when you start the unit in place the splash screen, the bios screen will occupy only a small part of the screen.  After windows starts, it seems perfect until you set resolutions lower then a resident and then it changes the size of the office and the external parts of the screen are black.  It's as if it were a screen 8 ".

    And Yes, I have all the drivers up to date

    The first time I had this problem, I found the fix for this immediately.  He has been pressing a few keys on the keyboard and presto, back to full screen.  Unfortunately, it was several years ago and o do not remember the fix.


  • Scroll in the pane to scroll pane

    Hi all

    I'm trying to implement a user interface in which a horizontal ScrollPane behaves something like the iPhone (the one with all the app icons) home screen.  When a smear user right or left, the screen moves in the appropriate direction, snapping to the appropriate 'page'.

    This worked pretty well, but the first view must have a vertical ScrollPane inside.  If the user left or right moves the view has pass, but if the user slides up or down, the view remains the same - on the first page of scrolling pane scrolls right in the appropriate direction.  As soon as I added the second ScrollPane, everything stopped working.  Then, I made the internal ScrollPane has been to launch the ScrollEvent.SCROLL_BEGIN and ScrollEvent.SCROLL_END events, and now the part slam and scrolling, but very erratically.  I'm quite frustrated, I was wondering if someone could give me a hand here.

    Here's what I mean:

    var scroller:ScrollPane;
    var containerMain:Container;
    
    var containerHome:Container;
    var container2:Container;
    var container3:Container;
    
    function ContentSlider(){
    ...
    //configure containerMain, containerHome, container2, container3, etc.
    ...
    var v:ViewHome = new ViewHome();
    configureScroller(v);
    containerHome.addChild(v);  
    
    containerMain.addChild(containerHome);
    containerMain.addChild(container2);
    containerMain.addChild(container3);
    numPanes=3;
    
    //1024 * number of views
    containerMain.setSize(1024*3,600);
    
    scroller.setScrollContent(containerMain);
    addChild(scroller)
    }
    
            private function onScrollBegin(ev:ScrollEvent):void{
                originalScrollX=scroller.scrollX;
            }
    
            var i:int=0;
            var oldDelta:int=0;
            private function onScrollEnd(ev:ScrollEvent):void{
                trace(i.toString() + ": "+ev.currentTarget);
                i++;
                if(ev.currentTarget!=this.scroller)
                    return;
    
                var delta:int = originalScrollX - scroller.scrollX;
                if(oldDelta==delta)
                    return;
    
                oldDelta=delta;
    
                var scrollTo:int=0;
                var scrollTime:Number = 0.4;
    
                if(delta >1024)
                    delta=1024;
    
                if(delta<-1024)
                    delta=-1024;
    
                l2.text=delta.toString();
    
                //snap to previous view (to the left)
                if( delta > this.SCROLL_THRESHOLD ||
                    ( (0<(delta*-1)) && (delta*-1) this.SCROLL_THRESHOLD){
                    selectedIndex++;
                    if(selectedIndex>numPanes-1)
                        selectedIndex=numPanes-1;
                }
                scrollTo = selectedIndex*1024;
                trace("delta: " + delta);
                trace("scroll to: " + scrollTo.toString());
                trace("selected index: " + selectedIndex.toString());
                //meat and potatoes:
                Tweener.addTween(scroller,{scrollX:scrollTo,time:scrollTime,transition:"linear"});
            }
    

    And in the other class (ViewHome), I have a lot of Visual elements, one of them being the vertical ScrollPane.  Everything I have there are

    scrollerVertical.addEventListener(ScrollEvent.SCROLL_BEGIN,f);
                scrollerVertical.addEventListener(ScrollEvent.SCROLL_END,f);
                scrollerVertical.addEventListener(ScrollEvent.SCROLL_MOVE,f);
    
    private function f(ev:ScrollEvent):void{
                this.dispatchEvent(ev);
            }
    

    Hey cyangreen,

    Yes, I came across the same problem some time. I couldn't find a solution for this. When you have a scrollpane in a scroll pane, strange things begin to happen. I feel (from what I've read and seen) it's because the ScrollPane uses the position of the mouse in the scene. also the fact that the scrollpane receives apparently even mousedown events when there is an object on top of it he receives first. the only thing I can think is waiting until we have Swipe gestures available to use in the Simulator. hope that sheds some light. Good luck!

Maybe you are looking for