MinHeight/MinWidth is ignored

After setting the MinHeight value of a AnchorPane with SceneBuilder (writes correctly to fxml file) the window is still resizable into a size with a smaller height.
From Java this.rootPane.getMinHeight() does return the right value.
Example FXML:
<minHeight>
<Long fx:value="400" />
</minHeight>
Using JavaFX 2.2 (JDK7u7)

I didn't get why there are these "minimum" properties? Where do they occur?The minHeight/minWidth properties on Region are enforced in Layout Panes.
http://docs.oracle.com/javafx/2/api/javafx/scene/layout/Region.html#minHeightProperty
For the root pane root pane it can seem that the minimum size properties have no effect because the root scene will be clipped to the available area as the stage is sized small so, in effect part of the control does not lie within the visible window (unless you also set a minimum size for the stage as Daniel mentions).
To see suggestions on how the property may be used, search for minHeight in the following tips document:
http://docs.oracle.com/javafx/2/layout/size_align.htm
Usually you use the properties to enforce a minimum or maximum size of resizable nodes placed in a layout manger that are being laid out relative to each other. You can think of the preferred size as the default size of a node and the node can stretch in size like a rubber band between it's minimum and maximum sizes. Note that there are a few tricks in the layout managers where you can set static constraints for sizing using things like HBox.setHGrow(node, Priority.NEVER). Additionally, some things like buttons by default have there max sizes clamped to their preferred size.

Similar Messages

  • As2 fullscreen gallery

    Hi!
    I want to create a simple but sweet flash portfolio like:http://www.jeanmalek.com/
    That one is a bit over the top for me though, with al the transitions and stuff.
    I want it to start with a menu with btns calling different xmls showing infullscreen my photographs.
    I want the gallery to be controlled with next and prev btns on top of the picture. It would be nice to have the cursor changing to arrows when hovering over each side.
    Layout jpgs:
    http://wimmerman.se/portfolio/layout1.jpg
    http://wimmerman.se/portfolio/layout2.jpg
    I guess the first step is to make the "menu btns" calling each xml gallery.
    Its based on Noponies tutorial:
    example: http://www.noponies.com/dev/fullscreen/
    files: http://www.noponies.com/dev/fullscreen/xmlFullCrossXML.zip
    What code do I import.
    Cheers!

    Furianaxus wrote:
    Hi There,
    http://gotoandlearn.com/play.php?id=22
    Watch that video tutorial. It should cover absolutely everything you need to get this done.
    oh sweet thanks!
    Ive been trying to implement the code but im not getting it to work right.
    For the moment its working as a slideshow and I think there is something with:
    bitmapFadeInterval = setInterval(_root, "loadRandomBitmap", imageTime);
    That launghes the loadRandomBitmap function.
    thanks for your help
    Here is my code:
    Terms and Conditions of use
    http://www.blog.noponies.com/terms-and-conditions
    //init
    import flash.display.BitmapData;
    Stage.scaleMode = "noscale";
    import gs.TweenLite;
    stop();
    //load in background images XML details
    var backImage:XML = new XML();
    backImage.ignoreWhite = true;
    var bgImages:Array = new Array();
    var p:Number = 0;//track pos in arrays
    //Variables pulled in from XML
    var minHeight:Number;
    var minWidth:Number;
    var crossFadeTime:Number;
    var imageTime:Number;
    var order:String;
    backImage.onLoad = function(success:Boolean) {
         if (success) {
              //get vars from XML file
              minHeight = this.firstChild.attributes.minHeight;
              minWidth = this.firstChild.attributes.minWidth;
              crossFadeTime = this.firstChild.attributes.crossFadeTime;
              imageTime = this.firstChild.attributes.imageTime;
              imageTime = (1000*60)*imageTime;
              order = String(this.firstChild.attributes.order);
              p = 0;
              bgImages = [];//reset the array var, should for some reason you want to load in a different set of images
              xmlNodes = this.firstChild;
              largeImages = xmlNodes.childNodes.length;
              for (i=0; i<largeImages; i++) {
                   bgImages[i] = xmlNodes.childNodes[i].childNodes[0].firstChild.nodeValue;
              //load random image when we successfully parse XML
              loadRandomBitmap();
         } else {
              trace("Fatal Error - Loading background image XML failed");
    //name of your xml file
    backImage.load("backimages.xml");
    /*create an empty mc to act as the background smoothed bitmap holder
    change the depth etc here should you need to..Note that this is created inside the
    small mc on the stage*/
    bgHolder_mc.createEmptyMovieClip("bg_mc",1);
    //var to track the fading, we use this to try to resize the temp bitmap with a resize, should the user be resizing the window when we fade in out
    var fadingComplete:Boolean = true;
    var firstRun:Boolean = true;
    //BITMAP BACKGROUND LOADING///
    function loadRandomBitmap():Void {
         if (order == "random") {
              //create the temp loader mc that we load our unsmoothed bitmap into
              //a limitation of this approach is that as this top image fades in/out it looks a little jagged for 2 seconds or so..
              bgHolder_mc.createEmptyMovieClip("bg_loader",2);
              //random function for loaded images
              randomImg = Math.floor(Math.random(bgImages.length)*bgImages.length);
              bitLoader.loadClip(bgImages[randomImg],bgHolder_mc.bg_loader);
         } else {
              //sequential loading of images
              bgHolder_mc.createEmptyMovieClip("bg_loader",2);
              bitLoader.loadClip(bgImages[p],bgHolder_mc.bg_loader);
              p++;
              if (p == bgImages.length) {
                   p = 0;
    //MovieClipLoader for bitmap image loading
    var bitLoader:MovieClipLoader = new MovieClipLoader();
    var bitlistener:Object = new Object();
    bitlistener.onLoadStart = function(target:MovieClip):Void  {
         //alpha out our image we load our bitmap into
         target._alpha = 0;
    bitlistener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void  {
         //amountLoaded = Math.floor((bytesLoaded/bytesTotal)*100);//calulate a loading percentage!
         //do something with this data if you want
    /*here we both draw our bitmap to our offscreen MC and handle the cross fading in and out -
    First we load our bitmap into our temp mc which is set to alpha 0, then we resize and fade our
    temp mc in so that we achieve the cross fading effect. When the temp MC is at 100% alpha we
    attach our bitmap object to our smoothed background MC and then quickly fade out and remove the temp MC.*/
    bitlistener.onLoadInit = function(target:MovieClip):Void  {
    /*clear the timer interval each time. We do this so that each new iteration of the timer
    starts from when the bitmap is loaded, this stops us from trying to fade images etc that have not loaded
    and ensures that each bitmap is displayed for the required amount of time on screen. Essentially it negates
    download time*/
         clearInterval(bitmapFadeInterval);
         //create the bitmap object, each time this is reset, keeping memory footprint fairly low..
         var bitmap:BitmapData = new BitmapData(target._width, target._height, true);
         //draw the bitmap
         bitmap.draw(target);
         //we are starting to fade, so set our var to false and let the temp resize functions run
         fadingComplete = false;
         //resize the temp bitmap to match the size of the bg bitmap
         this.resizeTemp = function() {
              if (Stage.height/Stage.width>target._height/target._width) {
                   img_propa = target._width/target._height;
                   target._height = Stage.height;
                   target._width = Stage.height*img_propa;
                   target._y = 0;
                   target._x = 0;
              } else {
                   img_propa = target._height/target._width;
                   target._width = Stage.width;
                   target._height = Stage.width*img_propa;
                   target._y = 0;
                   target._x = 0;
         this.resizeTemp();
         //fade in the temp bitmap
         TweenLite.to(target,crossFadeTime,{_alpha:100, onComplete:fadedIn, onCompleteParams:[this], onUpdate:this.resizeTemp});
         function fadedIn(ref):Void {
              ref.resizeTemp
              //attach our loaded bitmap to our background mc when the temp totally obscures it
              //this is the smoothed bitmap
              bgHolder_mc.bg_mc.attachBitmap(bitmap,0,"auto",true);
              //make the bg resize
              fullScreenBg();//This is  abit of a hack to catch user resizes
              TweenLite.to(target,.1,{_alpha:0, onComplete:cleanUpTemp});
              function cleanUpTemp():Void {
                   //remove the temp mc
                   removeMovieClip(bgHolder_mc.bg_loader);
                   //we are done fading..
                   fadingComplete = true;
              //reset the timer
              bgHolder_mc.bg_mc.attachBitmap(bitmap,0,"auto",true);
              bitmapFadeInterval = setInterval(_root, "loadRandomBitmap", imageTime);
              //resize the bg image
              fullScreenBg();
              //add the stage listener, which fixes an issue with the image being scaled out to
              //some crazy size if a user is resizing as the image loads in for the first time.
              if (firstRun) {
                   Stage.addListener(catchStage);//stage resize listener, added here after first image load.
                   firstRun = false;
    bitLoader.addListener(bitlistener);
    //stage listener to handle resizing images
    var catchStage:Object = new Object();
    catchStage.onResize = function() {    
         /*simple "OR" conditional to set a min size, if we are below that we don't do any more scaling
         note that we wrap this in a if/else so that the function that we actually use to to the bg
         resizing can be called independently of this check, for instance when we are below the resize
         min but we are fading in a new image, obviously we would want that new image to scale*/
         //**IF YOU WANT TO SCALE AT ALL STAGE SIZES, SET THE MIN HEIGHT ETC TO 0 IN THE XML
         if (Stage.width<minWidth || Stage.height<minHeight) {
              return;
         } else {
              //call the resize function
              fullScreenBg();
    //screen resize function
    function fullScreenBg() {
         if (Stage.height/Stage.width>bgHolder_mc.bg_mc._height/bgHolder_mc.bg_mc._width) {
              img_prop = bgHolder_mc.bg_mc._width/bgHolder_mc.bg_mc._height;
              bgHolder_mc.bg_mc._height = Stage.height;
              bgHolder_mc.bg_mc._width = Stage.height*img_prop;
              bgHolder_mc.bg_mc._y = 0;
              bgHolder_mc.bg_mc._x = 0;
         } else {
              img_prop = bgHolder_mc.bg_mc._height/bgHolder_mc.bg_mc._width;
              bgHolder_mc.bg_mc._width = Stage.width;
              bgHolder_mc.bg_mc._height = Stage.width*img_prop;
              bgHolder_mc.bg_mc._y = 0;
              bgHolder_mc.bg_mc._x = 0;

  • Changing Work Area

    Hi ,
    I am new to JAVAFX, just going through the documents and samples provided in the site.
    Example "IssueTrackingLite" has a single FXML file, based on the selection in the list view(Project1,Project2..) work area content changes.
    But if I had a requirement like different project selection should show different layout then how could it be achieved?
    Is it possible to create different FXML and based on the project selection can embed that in the content area?
    Thank you
    Kishan

    Hi Danel,
    I am experimenting the anchorpane properties to know it better ,
    I have created a very template which has AnchorPane,1 SplitPane, 2 text boxes.
    It generated the following FXML code,
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import javafx.scene.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>
    <AnchorPane id="AnchorPane1" prefHeight="591.0" prefWidth="359.0000999999975" xmlns:fx="http://javafx.com/fxml" fx:controller="javafxapplicationtest.first">
    <children>
    <SplitPane dividerPositions="0.5201005025125628" focusTraversable="true" prefHeight="591.0" prefWidth="400.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
    <items>
    <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
    <children>
    <TextField prefHeight="30.0" prefWidth="139.0" text="left" AnchorPane.bottomAnchor="275.0" AnchorPane.leftAnchor="39.5" AnchorPane.rightAnchor="25.5" AnchorPane.topAnchor="284.0">
    <minHeight>
    <Long fx:value="20" />
    </minHeight>
    <minWidth>
    <Long fx:value="20" />
    </minWidth>
    </TextField>
    </children>
    </AnchorPane>
    <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
    <children>
    <TextField fx:id="first" layoutX="14.0" layoutY="284.0" text="right">
    <minHeight>
    <Long fx:value="10" />
    </minHeight>
    <minWidth>
    <Long fx:value="20" />
    </minWidth>
    <prefHeight>
    <Long fx:value="30" />
    </prefHeight>
    <prefWidth>
    <Long fx:value="90" />
    </prefWidth>
    </TextField>
    </children>
    </AnchorPane>
    </items>
    </SplitPane>
    </children>
    <minWidth>
    <Long fx:value="400" />
    </minWidth>
    </AnchorPane>
    I observed few behaviours for which I couldn't figure it out the reason.
    In Designer, left Text Box properties "Layout X","Layout Y" are disabled where as right Text Box Layout X,Y are enabled.
    If I preview screen in "preview Windows" and try to resize the window then left box is resizing proportionally where as right one is statically located at the same place.
    Could you please tell why it is behaving differently?
    Best Regards,
    Kishan

  • How to render image from binary property of node?

    Hello!
    How to put the image to the page from binary property of node in cms? How tags can i use?

    Hi,
    I have an additional question, regarding the images of a page. As stated above, rendering them works fine. But now I would also like to have them resized within certain boundaries. Is there a way to define the min/max width/height in the design of the page component for these images?
    I tried adding a node (name='image', jcr:primaryType=nt:unstructured) to /etc/designs/<myproject>/jcr:content/<mypagecomponent>. I then added minHeight, minWidth, maxHeight, ... properties to that node, but it seems they are not being picked up by the img.png.java servlet from the libs/foundation/page component.
    I created this design node based on a similar node which was added in the design of <mypagecomponent> for an 'image' in a 'par' when I changed the design of it.
    So I'm wondering if it is at all possible to define a design for the image of a page and if it, how I should do it.
    Kind regards,
    Luc

  • Window size gets shrinked

    I'm writing an extension for Adobe Illustrator and I encountered a problem with the size of the extension panel.
    The problem is:
    If I alt+tab (or loose the focus in any other way) while Illustrator is launching, once I open Illustrator my extension panel size is shrinked to extremely small numbers (approximately 2x2 or something similar).
    This only happens if I set minHeight, minWidth and maxHeight maxWidth. It does not matter if I set it up in Bundle Manifest, or in <csxs:CSXSWindowedApplication declaration.
    Another strange thing is that, when i do not specify min and max size settings (thus my extension is completely resizable, and launches correctly event if i was alt+tabed while launching Illustrator),
    the function:
    var winGeom:WindowGeometry = new WindowGeometry();
    winGeom.width = 500;
    winGeom.height = 700;
    CSXSInterface.getInstance().requestStateChange(StateChangeEvent.WINDOW_RESIZE, winGeom);
    does NOT resize the panel.
    P.S. how to make your panel window not resizable? The way i'm doing it is setting minWidth, maxWidth and minHeight, maxHeight to the same numbers. Are there any better solutions?
    thanks for any and all help!

    anyone?

  • Layout issues

    Hi,
    I'm with some layout troubles. I want the app to look exactly like this:
    http://pastebin.com/d2bf719e3
    But when I fill the "Devices" container with some elements, the whole App extends its height. This is not what I want it to behave. I want this exact layout, clipping the contents (not expanding to fit then) and adding a scrollbar. Would someone give me a tip?
    Thanks in advance

    Whatever container should have scrollbars needs minHeight/minWidth=0

  • The problem about the Stage's minWidth or minHeight property.

    From the JavaFX 2.2 api, I see the minWidth or minHeight property, and then I attempt to use them to limit the contraction of stage when dragging. But it takes no effect. Are there some implications for using these properties?
    I have finally to write some codes in the dragging listener of the stage to set manually width or height of the stage to achieve the minWidth or minHeight effect.

    Hi, here is the test case: when we resize the stage UNDECORATED by dragging, we can minimize the stage size to zero even I set the minWidth and minHeight properties at first.
    import javafx.animation.KeyFrame;
    import javafx.animation.KeyValue;
    import javafx.animation.Timeline;
    import javafx.application.Application;
    import javafx.beans.binding.DoubleBinding;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.SimpleDoubleProperty;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Bounds;
    import javafx.geometry.Point2D;
    import javafx.scene.Cursor;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ScrollPane;
    import javafx.scene.effect.DropShadow;
    import javafx.scene.effect.Reflection;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.FlowPane;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    import javafx.stage.StageStyle;
    import javafx.stage.Window;
    import javafx.util.Duration;
    public class TestMinSizeStage extends Application {
      private ScrollPane scrollPane;
      private ObjectProperty<Point2D> anchor = new SimpleObjectProperty<Point2D>(null);
      private SimpleDoubleProperty widthStage = new SimpleDoubleProperty();
      private SimpleDoubleProperty heightStage = new SimpleDoubleProperty();
      public static void main(String[] args) {
      launch(args);
      @Override
      public void start(final Stage primaryStage) {
      Pane mainContainer = initstage(primaryStage);
      mainContainer.getChildren().addAll(
      createButton());
      primaryStage.show();// Show the primaryStage
      private Pane initstage(Stage primaryStage) {
      primaryStage.setTitle("Hello Java");
      primaryStage.initStyle(StageStyle.TRANSPARENT);
      /* The minWidth or minHeight is for the stage "DECORATED", it has on effect to the stage non "DECORATED". */
      primaryStage.setMinWidth(600);
      primaryStage.setMinHeight(400);
      final FlowPane mainContainer = new FlowPane();
      mainContainer.setStyle(
      "-fx-background-color: white; " +
      "-fx-background-radius: 10px; " +
      "-fx-padding: 10px;" +
      "-fx-hgap: 30px; " +
      "-fx-vgap: 50px;");
      scrollPane = new ScrollPane();
      scrollPane.setStyle("-fx-background-radius: 10px;");
      scrollPane.setContent(mainContainer);
      scrollPane.setPannable(true);
      mainContainer.prefWidthProperty().bind(new DoubleBinding() {
      super.bind(scrollPane.viewportBoundsProperty());
      @Override
      protected double computeValue() {
      Bounds bounds = scrollPane.getViewportBounds();
      if (bounds == null) {
      return 0;
      } else {
      return bounds.getWidth();
      AnchorPane root = new AnchorPane();
      root.setStyle(
      "-fx-border-color: black; " +
      "-fx-border-width: 1px; " +
      "-fx-border-radius: 10px; " +
      "-fx-background-color: rgba(0, 0, 0, 0); " +
      "-fx-background-radius: 10px;");
      DropShadow dropShadow = new DropShadow();
      dropShadow.setRadius(20.0);
      // dropShadow.setSpread(0.2);
      root.setEffect(dropShadow);
      enableDragging(root);
      root.getChildren().add(scrollPane);
      AnchorPane.setTopAnchor(scrollPane, 0.0);
      AnchorPane.setRightAnchor(scrollPane, 10.0);
      AnchorPane.setBottomAnchor(scrollPane, 10.0);
      AnchorPane.setLeftAnchor(scrollPane, 10.0);
      AnchorPane superRoot = new AnchorPane();
      superRoot.getChildren().add(root);
      AnchorPane.setTopAnchor(root, 10.0);
      AnchorPane.setRightAnchor(root, 10.0);
      AnchorPane.setBottomAnchor(root, 10.0);
      AnchorPane.setLeftAnchor(root, 10.0);
      Scene scene = new Scene(superRoot, 950, 650, Color.TRANSPARENT);
      scene.getStylesheets().add(getClass().getResource("controls.css").toExternalForm());
      primaryStage.setScene(scene);
      return mainContainer;
      * Enable the root node to be dragged. Realize some drag functions.
      * @param root - the root node
      private void enableDragging(final AnchorPane root) {
      /* This mouse event is for resizing window. Define some specific cursor patterns. */
      root.setOnMouseMoved(new EventHandler<MouseEvent>() {
      public void handle(MouseEvent me) {
      if ((me.getX() > root.getWidth() - 10 && me.getX() < root.getWidth() + 10)
      && (me.getY() > root.getHeight() - 10 && me.getY() < root.getHeight() + 10)) {
      root.setCursor(Cursor.SE_RESIZE);
      } else if (me.getX() > root.getWidth() - 5 && me.getX() < root.getWidth() + 5) {
      root.setCursor(Cursor.H_RESIZE);
      } else if (me.getY() > root.getHeight() - 5 && me.getY() < root.getHeight() + 5) {
      root.setCursor(Cursor.V_RESIZE);
      } else {
      root.setCursor(Cursor.DEFAULT);
      /* when mouse button is pressed, save the initial position of screen. */
      root.setOnMousePressed(new EventHandler<MouseEvent>() {
      public void handle(MouseEvent me) {
      Window primaryStage = root.getScene().getWindow();
      anchor.set(new Point2D(me.getScreenX() - primaryStage.getX(), me.getScreenY() - primaryStage.getY()));
      widthStage.set(primaryStage.getWidth());
      heightStage.set(primaryStage.getHeight());
      /* when mouse button is released, clear the initial position of screen. */
      root.setOnMouseReleased(new EventHandler<MouseEvent>() {
      public void handle(MouseEvent me) {
      anchor.set(null);
      /* when screen is dragged, translate it accordingly. */
      root.setOnMouseDragged(new EventHandler<MouseEvent>() {
      public void handle(MouseEvent me) {
      if (anchor.get() != null) {// The drag event on the root really takes place.
      Window primaryStage = root.getScene().getWindow();
      if (root.getCursor() == Cursor.H_RESIZE) {
      primaryStage.setWidth(widthStage.get() + (me.getScreenX() - (anchor.get().getX() + primaryStage.getX())));
      } else if (root.getCursor() == Cursor.V_RESIZE) {
      primaryStage.setHeight(heightStage.get() + (me.getScreenY() - (anchor.get().getY() + primaryStage.getY())));
      } else if (root.getCursor() == Cursor.SE_RESIZE) {
      primaryStage.setWidth(widthStage.get() + (me.getScreenX() - (anchor.get().getX() + primaryStage.getX())));
      primaryStage.setHeight(heightStage.get() + (me.getScreenY() - (anchor.get().getY() + primaryStage.getY())));
      } else {// moving the stage
      primaryStage.setX(me.getScreenX() - anchor.get().getX());
      primaryStage.setY(me.getScreenY() - anchor.get().getY());
      * Define a button
      * @return a button
      private Node createButton() {
      Button button = new Button();
      button.setEffect(new Reflection());
      button.setText("Say 'Hello Java'");
      button.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
      System.out.println("Hello Java!");
      /* add an animation effect */
      Timeline timeline = new Timeline();
      timeline.setCycleCount(Timeline.INDEFINITE);
      timeline.setAutoReverse(true);
      timeline.getKeyFrames().addAll(
      new KeyFrame(Duration.ZERO, new KeyValue(button.opacityProperty(), 1.0)),
      new KeyFrame(new Duration(5000), new KeyValue(button.opacityProperty(), 0.0)));
      timeline.play();
      /* set CSS style */
      button.setStyle(
      "-fx-font: 14px 'Cambria'; " +
      "-fx-text-fill: #006464; " +
      "-fx-background-color: #e79423; " +
      "-fx-background-radius: 20.0; " +
      "-fx-padding: 5.0;");
      return button;

  • MinWidth = USE_COMPUTED_SIZE is ignored?

    I want to lay out a simple HBox like this:
    [label1] [label2...] [label3]
    I want label3 to be right-justified, and I am more interested in seeing the contents of label1 and label3 than label2 when the container shrinks. So naively, I'd think that I should set minWidth = USE_COMPUTED_SIZE for the important labels, and to make label3 right justified I'd set HBox.hgrow=ALWAYS for the middle label:
    <HBox xmlns:fx="http://javafx.com/fxml" spacing="5">
      <maxWidth>
        <Double fx:constant="MAX_VALUE" />
      </maxWidth>
      <Label fx:id="label1" text="Important Label">
        <minWidth>
          <Pane fx:constant="USE_COMPUTED_SIZE" />
        </minWidth>
      </Label>
      <Label fx:id="label2" text="Vastly less important message" HBox.hgrow="ALWAYS" />
      <Label fx:id="label3" text="Important Label">
        <minWidth>
          <Pane fx:constant="USE_COMPUTED_SIZE" />
        </minWidth>
      </Label>
    </HBox>But that doesn't work in either respect! label3 is not right-justified, and labels 1 and 3 shrink to ellipses as fast, if not faster, than label2 when I make the window narrower. A little experimentation reveals that setting a large maxwidth on label2 achieves the right-justification that I want, but minwidth is still a problem.
    On closer inspection, I find that USE_COMPUTED_SIZE (-1.0) is actually the default minwidth! What good is that?
    If instead of using USE_COMPUTED_SIZE, I simply set the minwidth of labels 1 & 3 to a real value like 99, they do indeed shrink later than label2 does. But of course, I don't want to hard-code a minwidth like that. What am I supposed to do?

    Try something like the following.
    Load it up in SceneBuilder 1.1+ and then choose Preview | Preview in Window and resize the preview window to test out the resizing behaviour:
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import java.util.*?>
    <?import javafx.geometry.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>
    <?import javafx.scene.paint.*?>
    <StackPane id="StackPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="39.5" prefWidth="498.0000999999975" xmlns:fx="http://javafx.com/fxml">
      <children>
        <HBox prefHeight="39.5" prefWidth="496.0" spacing="5.0" style="-fx-background-color: cornsilk" StackPane.alignment="CENTER_RIGHT">
          <children>
            <Label minWidth="-Infinity" style="-fx-background-color: slategrey" text="Important Label" HBox.hgrow="SOMETIMES" />
            <Label style="-fx-background-color: lightgrey" text="Vastly less Important Label" HBox.hgrow="NEVER" />
            <Label alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" minWidth="-Infinity" style="-fx-background-color: palegreen" text="Important Label" HBox.hgrow="ALWAYS" />
          </children>
          <padding>
            <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
          </padding>
        </HBox>
      </children>
    </StackPane>It's probably not exactly what you want, but hopefully it is helpful.
    Oddly, in my tests, the HBox.hgrow SOMETIMES priority doesn't seem to have any preference over the NEVER priority. So when you resize the thing smaller, the first two labels start to get elided unless you start to specify minWidth values.
    So I set the minWidth of the first label to the preferred width (and same for the last label). That causes the two important labels to never get elided (which might be the behaviour you want for the important labels anyway).
    Setting the alignment of the HBox itself to CENTER_RIGHT means (in combination with the right most label's HBox.hgrow of ALWAYS and a minWidth of the preferred width) that the rightmost important label is always visible and the other labels get pushed off to the left hand side if there is not enough room.
    Setting the maxWidth of the rightmost label to MAX_VALUE and it's alignment to CENTER_RIGHT right aligns the label in the HBox.
    The styles are just in there so that it is easy to see how big each label is - normally you would stick that kind of stuff in a stylesheet.
    The values of things like minWidth="-Infinity" and maxWidth="1.7976931348623157E308" are weird constants because that is what SceneBuilder outputs rather than something sensical like Label.USE_PREF_SIZE or Double.MAX_VALUE
    And yeah, as you point out in your question "USE_COMPUTED_SIZE (-1.0) is actually the default minwidth", so there is no point in explicitly setting minWidth to that value.

  • MinWidth and minHeight not working for standalone swf

    First, you have to set your projects settings to not build
    the HTML template dir. this is done by right clicking on the
    project, going to properties, selecting Flex Compiler on the left,
    then unchecking the "Generate HTML wrapper file" checkbox.
    The goal is to use fscommand to build a fullscreen file with
    content in the center. I have attached code with two application
    tags, one commented out. first, build it as is. You'll see the
    content is centered. Then, hit escape, you'll see that the size of
    the window is less than 1024x768. If you load the other application
    tag, you'll see that the content window is the right size, but the
    fullscreen is aligned top left.
    I'll take any suggestions!
    Thanks.

    Anyone have any ideas?

  • MinWidth not working with Scroller container

    So, this might be a dumb question from a relative Flex newbie, but I haven't been able to figure it out for the last few hours, after trying many different combinations.  In a scrolling Group, I'm able to get the vertical scrolling to behave exactly as I want it to, but the horizontal scrolling just doesn't seem to function no matter what I do.
    Examples from Design view:
    As you can see, the content is larger than minHeight of 800, so the scrollbar appears...hooray!  Now, for the horizontal scrolling....
    Horrible, ugly mega-fail.  (Note also that only some of the text areas actually scale, despite the fact that they're all coded identically...what's up with that?!).  I do realize that each of the nested border containers have children with fixed heights, and I'm using fluid widths throughout this layout..which may account for the different behavior.  But isn't that the whole point of the minWidth property?  To create a limit at which the scrollbars will appear?  I know I could force the Scroller size to 300, but then it would limit the size of the viewport to a maximum of 300, which is the last thing I want.  Basically, I need some help in understanding how the new Scroller system works with fluid layouts.  In MX, minWidth/minHeight just worked....*sigh*
    Can anyone help me fix this?  Please stop me from losing faith in Abode's ability to create APIs that function inituitively.
    Here's the code:
    <s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx" dropShadowVisible="false"  width="100%" height="100%">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:Scroller horizontalScrollPolicy="on" verticalScrollPolicy="auto" width="100%" height="100%">
    <s:Group width="100%" height="100%" minHeight="800" minWidth="300">
    <s:layout>
    <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10" gap="20"/>
    </s:layout>
    <s:BorderContainer id="choiceContainer" width="100%" minWidth="300" height="150" cornerRadius="10" backgroundColor="0xDDDDDD" borderWeight="0" dropShadowVisible="false">
    <s:layout>
    <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="20" paddingBottom="10" gap="10"/>
    </s:layout>
    <s:Label text="Learner Choice" fontWeight="bold" fontSize="14"/>
    <s:HGroup width="100%" height="20" verticalAlign="middle" horizontalAlign="center">
    <s:Label text="Choice Label" width="100" textAlign="right"/>
    <s:TextArea height="100%" width="100%" id="choiceLabelField" editable="true"/>
    </s:HGroup>
    <s:HGroup width="100%" height="50" verticalAlign="middle" horizontalAlign="center">
    <s:Label text="Full Choice" width="100" textAlign="right"/>
    <s:TextArea width="100%" height="100%" id="choiceBodyField"/>
    </s:HGroup>
    </s:BorderContainer>
    <s:BorderContainer id="resultsContainer" width="100%" minWidth="300" height="275" cornerRadius="10" backgroundColor="0xDDDDDD" borderWeight="0" dropShadowVisible="false">
    <s:layout>
    <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="20" paddingBottom="10" gap="10"/>
    </s:layout>
    <s:Label text="Outcomes"  fontWeight="bold" fontSize="14"/>
    <s:HGroup width="100%" height="50" verticalAlign="middle" horizontalAlign="center">
    <s:Label text="Coach Feedback" width="100" textAlign="right"/>
    <s:TextArea width="100%" height="100%" id="feedbackBodyField"/>
    </s:HGroup>
    <s:HGroup width="100%" height="50" verticalAlign="middle" horizontalAlign="center">
    <s:Label text="Customer Says" width="100" textAlign="right"/>
    <s:TextArea width="100%" height="100%" id="saysField"/>
    </s:HGroup>
    <s:HGroup width="100%" height="50" verticalAlign="middle" horizontalAlign="center">
    <s:Label text="Customer Thinks" width="100" textAlign="right"/>
    <s:TextArea width="100%" height="100%" id="thinksField"/>
    </s:HGroup>
    <s:HGroup width="100%" height="20" verticalAlign="middle" horizontalAlign="center" gap="20">
    <s:Label text="Satisfaction Change: "/>
    <s:NumericStepper id="satisfactionStepper" maximum="100" minimum="-100"/>
    <s:Label text="Expression: "/>
    <s:DropDownList id="expressionDropDown" width="100"/>
    </s:HGroup>
    </s:BorderContainer>
    <s:BorderContainer id="nextActionContainer" width="100%" minWidth="300"  height="130" cornerRadius="10" backgroundColor="0xDDDDDD" borderWeight="0" dropShadowVisible="false">
    <s:layout>
    <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="20" paddingBottom="20" gap="20"/>
    </s:layout>
    <s:Label text="Next Action"  fontWeight="bold" fontSize="14"/>
    <s:HGroup width="100%" height="20" verticalAlign="middle" horizontalAlign="center">
    <s:Label text="Link to " width="100" textAlign="right"/>
    <s:DropDownList id="linkToDropDown" width="100%"/>
    </s:HGroup>
    <s:HGroup width="100%" height="20" verticalAlign="middle" horizontalAlign="center" gap="20">
    <s:CheckBox id="alertCheckBox" label="Show pop-up alert before learner advances: "/>
    <s:Button id="editAlertButton" label="Edit Alert" enabled="{alertCheckBox.selected}"/>
    </s:HGroup>
    </s:BorderContainer>
    </s:Group>
    </s:Scroller>
    </s:BorderContainer>

    There have been a few bugs reported with Scroller.  It is trying to take on
    some new capabilities, like resizing content so it doesn't get occluded by
    the scrollbars and there's been some bugs in there.  In MX, the scrollbars
    just showed up on top of your content, which was undesireable for many
    folks.

  • Defaults.css sporadically ignored

    I have a shared library project that specifies skins for common elements (scrollbars, buttons, etc.) in a defaults.css file.  The AIR and Flex applications that use this library usually pick up the styles fine, but sometimes they seem to be overridden by normal skins.  Skins for custom components are always found, as there's no other skin specified for them anywhere.  Components from other shared libraries with local skins also often default to their library skins rather than the local ones.
    Sometimes I can resolve this by cleaning my projects a few times.  I've hit it a few times though where even cleaning didn't resolve the problem, and the only resolution was to delete all of the projects and check them out of SVN again.  Is this a known issue?  I can't produce it consistently enough to create a test case to attach to a Jira.

    hello,Darrell
    I created a new set of Flex component library slib.swc (Flex 4.5). Would also like to have a default style. defaults.css file, making it the default style of the component library.
    Like flex the builder install directory of sdks \ 4.5.0 \ frameworks out \ libs directory has a spark.swc file, open with Winrar will see defaults.css this file. Defaults.css file defines the default style of the flex spark components.
    How can it be achieved?
    As follows
    slib.swc contains a CLabelEx components, and a defaults.css file
    defaults.css source file as follows:
    @ namespace s "library :/ / ns.adobe.com / flex / spark";
    @ namespace mx "library :/ / ns.adobe.com / flex / mx";
    @ namespace cn "http://os.slib.cn";
    cn | CLabelEx
            styBackgroundAlpha: 1;
            styBackgroundColor: # 569CC0;
            styBorderAlpha: 1;
            styBorderColor: # 569CC0;
            styBorderWeight: 1;
            styCornerRadius: 3;
    In slib.swc the application MyLabel.mxml of the source file as follows:
    <? xml version = "1.0" encoding = "utf-8"?>
    <s: Application, the xmlns: fx = "http://ns.adobe.com/mxml/2009
                               xmlns: s = "library :/ / ns.adobe.com / flex / spark"
                               xmlns: mx = "library :/ / ns.adobe.com / flex / mx"
                               xmlns: cn = "http://os.slib.cn
                               the minWidth = "955" The minHeight = "600">
            <fxeclarations>
            </ fxeclarations>
            <cn:CLabelEx x="67" y="112"/>
    </ s: Application>
    I hope CLabelEx default use cn | CLabelEx, style to display its appearance.
    I refer to above approach, but failed to achieve. Can you please re-Detailed
    thanks,

  • Animated GIF ignoring frame timing

    I am trying to create simple animated GIFs with a few layers
    of text that simply fade in and fade out in sequence. My initial
    attempt worked perfectly. Most frames use the default 7/100's of a
    second delay as they fade. A few frames were manually set to much
    longer delays so that the text pauses, before fading out to be
    replaced by the next text.
    When I reopened the file, to adjust the background color, and
    then re-saved it, the GIF now plays straight through, ignoring the
    timing of each frame. Nothing I do now can get it to pause on the
    appropriate frames. I've tried cutting the symbols out and pasting
    them into a new file, removing the animation from the symbols and
    reapplying it, etc.
    Any ideas, anyone?
    Thanks in advance.

    None, None.

  • How do i use one midi controller and ignore another in Mainstage 2.1?

    I am running Mainstage and Ableton Live in parallel and use two midi controllers. I would like the APC40 to just be recognized by Live, and my MPK49 to be recognized by Mainstage and Live. Right now, I get midi signal from Mainstage on both midi controllers and can't seem to figure out how to assign just Mainstage to just get midi input from the MPK49. Any ideas? Thanks.

    Yes, that worked a the device popups were set to all. Fixed that and moved on. Thanks! However another similar problem has come up...
    The sliders on the APC40 (which I just want to be recognized by Live), are affecting the Mainstage Channel Strips volume sliders. I can't seem to figure how to make Mainstage ignore this as all of the APC40 sliders are effecting Channel Strip 1. Thanks.

  • How to get Materialized View to ignore unused columns in source table

    When updating a column in a source table, records are generated in the corresponding materialized view log table. This happens even if the column being updated is not used in any MV that references the source table. That could be OK, so long as those updates are ignored. However they are not ignored, so when the MV is fast refreshed, I find it can take over a minute, even though no changes are required or made. Is there some way of configuring the materialized view log such that the materialized view refresh ignores these updates ?
    So for examle if I have table TEST:
    CREATE table test (
    d_id NUMBER(10) PRIMARY KEY,
    d_name VARCHAR2(100),
    d_desc VARCHAR2(256)
    This has an MV log MLOG$_TEST:
    CREATE MATERIALIZED VIEW LOG ON TEST with rowid, sequence, primary key;
    CREATE MATERIALIZED VIEW test_mv
    refresh fast on demand
    as
    select d_id, d_name
    from test;
    INSERT 200,000 records
    exec dbms_mview.refresh('TEST_MV','f');
    update test set d_desc = upper(d_desc) ;
    exec dbms_mview.refresh('TEST_MV','f'); -- This takes 37 seconds, yet no changes are required.
    Oracle 10g/11g

    I would love to hear a positive answer to this question - I have the exact same issue :-)
    In the "old" days (version 8 I think it was) populating the materialized view logs was done by Oracle auto-creating triggers on the base table. A "trick" could then make that trigger become "FOR UPDATE OF <used_column_list>". Now-a-days it has been internalized so such "triggers" are not visible and modifiable by us mere mortals.
    I have not found a way to explicitly tell Oracle "only populate MV log for updates of these columns." I think the underlying reason is that the MV log potentially could be used for several different materialized views at possibly several different target databases. So to be safe that the MV log can be used for any MV created in the future - Oracle always populates MV log at any update (I think.)
    One way around the problem is to migrate to STREAMS replication rather than materialized views - but it seems to me like swatting a fly with a bowling ball...
    One thing to be aware of: Once the MV log has been "bloated" with a lot of unneccessary logging, you may perhaps see that all your FAST REFRESHes afterwards becomes slow - even after the one that checked all the 200000 unneccessary updates. We have seen that it can happen that Oracle decides on full table scanning the MV log when it does a fast refresh - which usually makes sense. But after a "bloat" has happened, the high water mark of the MV log is now unnaturally high, which can make the full table scan slow by scanning a lot of empty blocks.
    We have a nightly job that checks each MV log if it is empty. If it is empty, it locks the MV log and locks the base table, checks for emptiness again, and truncates the MV log if it is still empty, before finally unlocking the tables. That way if an update during the day has happened to bloat the MV log, all the empty space in the MV log will be reclaimed at night.
    But I hope someone can answer both you and me with a better solution ;-)

  • Apple Support ignores me completely, there is no way I can complain about lack of feed back and I even have paid for a protection plan!

    I have paid for an extended support through the Apple protection plan. Frankly I do not understand what I´ve paid for as there is no support and no plan, except ignorance and waiting time.
    I have had and still have serious problem with my Mac Book Pro, and spent loads of money on phone charges with mainly negative results. All I have "achieved" is wasted time. I just wonder if it is only me who feel totally helpless as the Support People are not really helping. I´ve spent approsmimately 200 USD in phonecharges on their support phone, so far. But that is nothing compared to the hours spent waiting for answer and listening no absolute nonsense. Finally I went to an Apple store who sent the machine in for repair, and one fault was the motherboard. However I could still not connect with my Time Capsule and Aperture seemed to have lost all my photos. This all happende after upgrading to Mountail Lion. Also the cable network isn´t working. I can easily see on the net that I am not the only one with problems. I´ve ended up with solving most of this myself, except the network connection. It is still not working.
    I am actually deeply dissapointed with Apple and I cannot find any way to even forward a complaint. Not that I believe it would help, but at least I´ve tried. I also think it would be fair to to get my money back for a product I´ve paid for which obviously isn´t working, namely the Apple Care Protection Plan.

    Hi, so you suggest I should be grateful for getting what I have paid for? Sorry but that's only getting what I paid for. Add to that, that this has been against the phone support I've used a lot of time and money for! I don't feel anything but hopelessness for the total lack of customer support. An expensive Mac Book Pro shouldn't fail after 2 years in the first place! But failure may of course happen with the best products, and Apple as well. The real fault however is Apple's arrogance and failure to fix it! Instead of getting help and guidance to a solution, I used hours and lost days of work, and was made to pay a lot for total unusable "assistance". I was even adviced to hold back on taking the Mac Book Pro to a store, as I was told the support person a senior, would figure it out. Well Apple definiately squezzed the lemon! Since the Time Capsule/Time Machine system didn't fuction I was also in a stale mate as I needed assurance that My files wasn't lost when delivering the machine for repair. I was adviced that could happen. Quite a deadlock wasn't it! As an expert on Quality Assurance I was also suffering lost revenue in my work for clients. I finally had to buy a Samsung Ultrabook as working machine and backup, a neccesity as Apple obviously cannot be trusted when needed. Bill Gates and Windows has one advantage over Apple, they know things can go wrong and hence have much better support. Apple support is a maze were only the strongest and most persistent get through. I am one as I didn't accept being treated like that. That's the only reason I finally got a repair. However the machine is still not functioning as mentioned. I have a case number, a phone number and mail address to a senior support person, whom I've been trying to contact for more than a week, He has still not responded to my mails or phone calls. I cannot even figure out how to contact Apple to complain about such ignorance. Note by the way that here in Norway I must pay to call support and more often than not there is more than half an hour waiting time. I might spend hundred of dollars in that "game" without even knowing that I will get the support I've paid for and only keep paying even more for wasting my time! This is simply not good enough, it is no less than arrogant and wrong! I frankly think Apple is doing a big mistake with such por treatmen of their customers.

Maybe you are looking for