Possible to set min/max size to a resizable Stage? If so, how?

Is it possible to set a minimum and maximum size to a resizable Stage? If so, how would this be done? Do I use some kind of onResize event handler or is there some other way?
Here is a sample code where I have a 500 x 500 px image in a 300 x 300 px scrollable scene that is in a resizable stage. Right now, I am able to resize the stage to any size, but I would like to limit the resizable minimum width and height to 100 x 100 px and limit the resizable maximum width and height to 600 x 600 px.
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.ScrollView;
import javafx.scene.control.ScrollBarPolicy;
import javafx.scene.image.ImageView;
import javafx.scene.image.Image;
var scene: Scene;
Stage {
    resizable: true
    scene: scene = Scene {
        width: 300
        height: 300
        content: ScrollView {
            hbarPolicy: ScrollBarPolicy.ALWAYS
            vbarPolicy: ScrollBarPolicy.ALWAYS
            width: bind scene.width
            height: bind scene.height
            node: ImageView {
                image: Image { url: "{__DIR__}roses.jpg"}
}

Hi, I don't understand how WidgetFX is going to allow me to set min/max size to a resizable Stage. After all, it is a desktop widget platform and I'm not trying to build a desktop widget. None of the demos I've tried use a decorated Stage with platform decorations that can be used to drag and resize the Stage.
I'm just trying to limit the min/max size of a resizable Stage. If you think WidgetFX will address my problem, I think a better solution is the JavaFX Stage Controller class I found available at http://code.google.com/p/memefx/. However, the JavaFX Stage Controller class still doesn't address the problem I have because it doesn't stop the user from dragging the Stage beyond the size restricted by the min/max height. It only reverts the Stage to the max size after the user already dragged and resized the Stage beyond the max resizable width/height.

Similar Messages

  • [svn:fx-trunk] 13276: Min/ Max size fixes for AIR Window and WindowedApplication.

    Revision: 13276
    Revision: 13276
    Author:   [email protected]
    Date:     2010-01-05 07:18:31 -0800 (Tue, 05 Jan 2010)
    Log Message:
    Min/Max size fixes for AIR Window and WindowedApplication.
    AIR won?\226?\128?\153t allow you to set the min width greater than the current max width (same is true for height). You also can?\226?\128?\153t set the max width less than the current min width (same is true for height). The code that sets nativeWindow.minSize and nativeWindow.maxSize has been modified to take this into account.
    QE notes: None.
    Doc notes: None.
    Bugs: SDK-24566
    Reviewer: Corey
    Tests run: checkintests, apollo/spark/components/Window.as, apollo/spark/components/WindowedApplication.as, apollo/Window, apollo/WindowedApplication
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24566
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as
        flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as
        flex/sdk/trunk/frameworks/projects/airspark/src/spark/components/Window.as
        flex/sdk/trunk/frameworks/projects/airspark/src/spark/components/WindowedApplication.as

    THank you , Nancy. Appreciate the input.
    So instead of this:
    <a class="brand" href="index.html"><img src="../img/logo-ca.png"alt="Consumers Advocate Review"> </a>
    Would it be something like this?:
    <a class="brand" href="index.html"><img src="http://ConsumersAdvocate/img/logo-ca.png"alt="Consumers Advocate Review"> </a>
    And if I do that, is there a way to cope with that locally so that DW can still display the images?
    jeff

  • Desperate here- Please help!! Setting a max size on the Photo in a Gallery

    I have a client who has 1,000s of picturea there are MANY of their pictures which are HUGE. So the thumbnail is fine I can alter those ratios, but is there a way to alter the size the picture can be when clicked on and it enters the slideshow/gallery mode? Is there a way to set a max size and make that alteration all at once- instead of resizing every picture? If so, how?
    Also, is there a way to take the PREVIOUS and NEXT buttons off the module under the thumbnail?
    Thanks!

    Hi there,
    Editing the CSS to scale the large images is a real bad idea, especially huge ones as being indicated by you both. These images are large and larger file size and will take a long time to download, especially on mobiles. Changing the CSS so they appear smaller does not change that at all.
    You need upload images that are web optimised and scaled correctly first, this is really a good must for proper management.
    In terms of the thumbnail images you need to just modify the module paramaters to get the size and scale you want so this is done server side and the images served already scaled.

  • Want to set Min Max for a material for PD MRP type

    Hi,
    I know Maximum stock level field in Material master MRP 2 view ? but where do i maintain minimum stock level? not procured?
    My client wants to set up his inventory with Min Max levels using MRP PD?
    Thanks and Apprecaites help.
    Regards,
    Siva

    Hi,
    If you want to maintain a Max and Min stock level, Maximum stock is shown straight away, you cannot find the Minimum field directly.
    if you want to use MRP type PD then go for safety stock that will be your minimum stock level
    or else use Re-order point planning, re-order point will be your minimum and Max-level as maximum.
    Thanks
    Satya

  • How to set min & max connections for  MSSQLconnection pool

    Hi,
    I want to set minconnection, maxconnection, idletimeout initial limit for the pool
    I have got a MSSQL database connection using following java code.
    // MSSQL DbConnection Code
    import java.sql.*;
    public class MsSqlDataSource
    public static void main(String arr[])
    Connection con = null;
    ResultSet rs = null;
    try{
    com.microsoft.sqlserver.jdbc.SQLServerDataSource ds = new com.microsoft.sqlserver.jdbc.SQLServerDataSource();
    ds.setServerName("10.50.50.51");
    ds.setPortNumber(1711);
    ds.setDatabaseName("test");
    ds.setUser("starhome");
    ds.setPassword("starhome");
    con = ds.getConnection();
    }catch(Exception e){}
    }In oracle i have passed min and max number of connection properties through setConnectionCacheProperties method.
    //Connection Pooling using Oracle Data Source:
    m_connSource = new OracleDataSource();
    m_connSource.setDriverType("thin");
    m_connSource.setServerName(m_host);
    m_connSource.setNetworkProtocol("tcp");
    m_connSource.setDatabaseName(m_db);
    m_connSource.setPortNumber(m_port);
    m_connSource.setUser(m_user);
    m_connSource.setPassword(m_password);
    // Enable caching. m_connSource.setConnectionCachingEnabled(true);
    java.util.Properties prop = new java.util.Properties();
    prop.setProperty("MinLimit", m_minConnections);
    prop.setProperty("MaxLimit", m_maxConnections);
    prop.setProperty("InitialLimit", m_initialConnections);
    prop.setProperty("InactivityTimeout", m_inactivityTimeout);
    prop.setProperty("AbandonedConnectionTimeout", m_abandonedTimeout);
    prop.setProperty("ConnectionWaitTimeout", m_connWaitTimeout);
    m_connSource.setConnectionCacheProperties(prop);I dont know how to pass min and max number of connection properties for SQLServerDataSource. Is there any method available to pass min and max number of connection properties for SQLServerDataSource.
    Iam using Tomcat. I found one way to set min and max connections for pool by doing changes in context.xml and web.xml using below url http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    I dont want to touch tomcat configuration files. I need to set connection pooling properties which is independent of application server.
    Please anybody give solution for this?
    Thanks,
    Prisha

    Hi,
    you need to define your database under the DB Admin tab. In the Schema objects node you'll find Sequence Implementations, and there you can definde min max values as well as caching and increments.
    Gerald

  • Is it possible to set the heap size limits in system-wide config?

    Hi,
    I am trying to set the JRE heap size limits (-Xms and -Xmx) by using the system-level deployment.properties file. The JRE version is 1.6 update 6.
    Normally, I would have something like this in the user-level deployment.properties file:
    deployment.javapi.jre.1.6.0_06.args=-Xms64M -Xmx192MHowever, when the same line is put in the system-level properties, it does not seem to have any effect. I have tried different options, also unsuccessfully:
    javaplugin.vm.options=-Xms64M -Xmx192M
    or
    javaplugin.minHeapSize=64m
    javaplugin.maxHeapSize=192mIs it not possible to address this setting via system-level properties at all? I am hoping that I will not have to resort to per-user config files.
    Best regards,
    Martin

    Hi Michael,
    thank you for your answer. I am sorry, I was unable to find the link to the message 10144001.
    My ultimate goal would be setting the system level settings as opposed to settings per applet. I was unable to find any mentioning of "deployment.javapi.jre.X.X.X_XX.args" in the official documentation here: http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/properties.html
    Best regards,
    Martin

  • Can you set a max size for a folder on a file server

    I've got a G5 Xserve that I'm using as a file server running 10.3.9. I need more space on my array so I bought bigger drives and will move the data to the new, larger array.
    For the health of my drives, I want my array to maintain at least 10% free space so I would like for the people using the shares to only see 90% of the larger space. (I don't want to have to be the 'drive space' policeman 6 months from now when the RAID fills up again)
    I know I could create 2 partitions in diskutil but I'd like something more dynamic.
    Ideally I'd like to put my shared folders inside of a main folder and tell Server to only display 90% of the size of the partition when a folder from the partition is mounted remotely. That way people won't know there is a quota which keeps them from trying to copy data into a share that shows 10% free space.
    The shares are used by both macs and PCs so I'd rather not go with a solution based upon network protocol.
    Many Thanks,
    Paul
    G5 Xserve   Mac OS X (10.3.9)  

    There's no way I'm aware of to artificially display a different capacity/available space than what's actually there. If it's a 1TB volume, it's a 1TB volume and the OS isn't going to report that as 900GB.
    The only other solutions I can think of is to either enable quotas which will let you restrict the amount of disk space any user can consume, or attach a folder action to the volume where the script automatically checks the volume size whenever new files are added and takes action at the appropriate time (you need to define what that action is, though).

  • Set window max size

    Hi all
    I have a swing applet which uses aprox 1/4 of my screen. I want to stop the user being able to stretch/ minimise the window making my applet look rubbish! Any idea how i do this? Im assuming it is the window and not the frame i need to stop moving.
    Help please!
    Thanks in advance.
    If i have cross posted i apologies, i put thread in wrong area and dont know how to remove

    I m not sure i got your question right, but you can probably set the
    frame.setResizable(false);or
    dialog.setResizable(false);depending on what you are using. On the other hand, your layout should be handling the resize behavior. in the long run, always better to design your layout correctly

  • Set frame max size

    hey, is there a way to prevent a JFrame from maximising beyond a certain size? I have a JFrame that is 800 by 400, and i dont want it to be smaller than 700 by 400 and larger than 900 by 400.
    thanks
    Pedge
    Prog2(){
    final Demo demo = new Demo();
    DemoControls demoC;
    demoC = new DemoControls(demo);
    JFrame f = new JFrame("prog 2");
    f.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {System.exit(0);}
    public void windowDeiconified(WindowEvent e) { demo.start(); }
    public void windowIconified(WindowEvent e) { demo.stop(); }});
    f.getContentPane().add("Center", demo);
    f.getContentPane().add("East", demoC);
    f.pack();
    f.setSize(new Dimension(800,400));
    f.show();
    demo.start();}

    Hi,
    In my programs I use the method update(Graphics g) from JFrame to keep the size of the window within boundaries.
    This method is called each time when the size of the window is changed (and maybe also in other situations), but the way it works can be compared with paint (Graphics g) in applets.
    Just try to compile the following code and see how it works.
    (I know that it is not the best way to wish for, but this is one way of wich I know that it works)
    Good luck,
    Willy
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    class testFrame extends JFrame implements WindowListener {
    // Constructor:
    public testFrame () {
    super ("Keeping the size within limits !!!");
    this.setSize (new Dimension (700,400));
    this.addWindowListener (this);
    this.show ();
    } // End of constructor
    public void update (Graphics g) {
    super.update (g);
    Dimension oDim = this.getSize ();
    double dWidth = oDim.getWidth();
    double dHeight = oDim.getHeight();
    if (dWidth > 900)
    dWidth = 900;
    if (dWidth < 700)
    dWidth = 700;
    if (dHeight != 400)
    dHeight = 400;
    oDim.setSize (dWidth,dHeight);
    this.setSize (oDim);
    } // End of method update
    public static void main (String [] args) {
    testFrame oFrame = new testFrame ();
    } // End of method main
    // Implementing methods :
    public void windowClosing (WindowEvent e) {System.exit(1);}
    public void windowDeiconified (WindowEvent e) {}
    public void windowActivated (WindowEvent e) {}
    public void windowOpened (WindowEvent e) {}
    public void windowIconified (WindowEvent e) {}
    public void windowClosed (WindowEvent e) {}
    public void windowDeactivated (WindowEvent e) {}
    } // End class testFrame

  • Is it possible to set MIN to 0?

    Quote from the docs (UBBCONFIG reference):
    MIN = number
    (...) The value range for MIN is 0 to 1000. If not specified, the
    default is 1.
    (note "_0_ to 1000")
    The result of tmloadcf:
    $ tmloadcf -y < test.ubbconfig
         MIN=0
    ^
    invalid value
    CMDTUX_CAT:1002: ERROR: The MIN parameter must be >=1 and <= 1000
    Who is wrong?
    And, what should I do if I want to define some server but do not start
    it by default (so the server is started only when someone manually
    requires its start via tmboot -s theserver)? Placing the policy that
    people should stop using tmboot -y and explicitely boot each of the
    remaining 80 servers separately seems to be far from being perfect
    option...

    Marcin Kasperski <[email protected]> wrote:
    Quote from the docs (UBBCONFIG reference):
    MIN = number
    (...) The value range for MIN is 0 to 1000. If not specified, the
    default is 1.
    (note "_0_ to 1000")
    The result of tmloadcf:
    $ tmloadcf -y < test.ubbconfig
         MIN=0
    ^
    invalid value
    CMDTUX_CAT:1002: ERROR: The MIN parameter must be >=1 and <= 1000
    Who is wrong?
    And, what should I do if I want to define some server but do not start
    it by default (so the server is started only when someone manually
    requires its start via tmboot -s theserver)? Placing the policy that
    people should stop using tmboot -y and explicitely boot each of the
    remaining 80 servers separately seems to be far from being perfect
    option...If you look at the TM_MIB(5) section in the docs, the
    TA_MIN parameter in the T_SERVER class shows a valid range
    of 1 <= num < 1,001. Look like to UBBCONFIG section is incorrect.
    Since the value ultimately get stored in the MIB, the MIB wins ;-)
    The easiest way I know of to leave a server down is to write
    a shell script wrapper around tmboot, either starting servers
    explicitly with the -A and -s options, or starting them all
    and then shutting down the servers in question.
    If you need to build a list of servers on the fly for such a script,
    tmboot -n will do a "fake" boot and list the server names so
    you can capture them in a script and start them individually.
    David

  • [iPhone] UISlider: Is it possible to set a max selected value?

    I know UISlider has a maximum value, but that just changes what "100% selected" actually equals. Is there a way to make the slider slide say 50% of the way? (I mean to limit it to 50% or any other value).
    Thanks!

    setValue will set it to anything between the minimum and the maximum. Override setValue if you want more control.

  • Possible to Restrict the Max Size of a JFrame?

    I guess that the JFrame is my top level container, within which JTabbedPane is used. I wish to be able to not make the window maximizable. I remember how that could be done in JInternalFrame. When I looked up JInternalFrame, it looks like the boolean value for maximizable is specific to JInternalFrame and not inherited. Is there another way I can do that? When I messed around with setMaximumSize(), it doesn't stop the user from maximizing.
    Also, if I want another container containing various components to obtain user input, which will pop up as a response to a button from the tab, is one container just as good as another, or is there a specific approach which is more friendly to this type of program?
    Anyways, this is the bare bones of my code with all the bells and whistles and extra components cut out, in the event that it matters. ;o
    public class TabTest extends JFrame
         public TabTest()
              JTabbedPane mainPane = new JTabbedPane();
              JPanel layer1PanelE = new JPanel(); 
              JPanel viewNclearPanel = new JPanel();     
              layer1PanelE.add( viewNclearPanel );
              JPanel entryPanel = new JPanel();
              layer1PanelE.add( entryPanel );
              mainPane.addTab( "Tickets", null, layer1PanelE, "Edit new or existing tickets" );
              getContentPane().add( mainPane );
              setSize(850, 600);
              setVisible( true );
         public static void main ( String args[] )
              TabTest tabtest = new TabTest();
              tabtest.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    }Ty very much
    -Aerin

    <3 <---- Love

  • How to set the page size and the margins programatically

    Hello,
      I am working with crystal report XI Release2 and asp.net.
    One of my report is having 4 graphs in a single report.In order to display all the graphs in one page i have set  the paper size as A3.(Via Crysta report ->File->Page set up)
    But the page size A3 is not provided by all printers.So problem comes when the application is diployed on a machine which does not support A3 Printer.All the graphs will not be shown on a single page.
    Also Each and Every time ,when the application is diployed on a machine,user has to open the crystal report and adjust the page size accordingly to get all the reports on a single page.
    This is a kind of usability issue also.
    Is it possible to set the page size and the margins programatically say for eg 11 X 17.so that with out doing anything all the 4 graphs will get displayed on a single page ?
    Please let me know if you require more information regarding this issue.
    Thanks in advance.
    smitha.

    Hi Ludek,
    i could solve the issue by using the follwing code.
    report = new ReportDocument();
    PageMargins customPageMargin = report.PrintOptions.PageMargins;
    report.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
    report.PrintOptions.PaperSize = PaperSize.Paper10x14;
    customPageMargin.rightMargin = 1;
    customPageMargin.topMargin = 0;
    customPageMargin.bottomMargin = 0;
    report.PrintOptions.ApplyPageMargins(customPageMargin);
    Thanks for you help.
    Regards,
    smitha.

  • How to set the display size of the PDF - in percent?

    Hi, I wonder if anyone knows if it is possible to set
    the display size of the PDF document, so that it always
    shows in, let´s say 100%, in the viewers browser window?
    Much grateful for any help!
    /Anni

    In Acrobat, under Document Properties (Ctrl+D), you can edit the Initial
    View settings, including the zoom level.

  • Max Size for a message thru SAP PI 7.0 SPS13

    Hi,
         I have a problem with a very large message. The scenario is a JDBC -> SAP PI -> ABAP Proxy. I'm getting this error:
    ErrorTransmitting the message to endpoint http://<server>:8000/sap/xi/engine?type=entry
    using connection JDBC_http://sap.com/xi/XI/System failed, due to:
    com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Error writing to server.
         We try to solves it changing the EO_MSG_SIZE_LIMIT parameter in SXMB_ADM but it doesn't help us at all.
         How can we set the max size for a message that going thru SAP PI.
         We have SAP PI 7.0 SPS 13.

    HI Luis
    Whats the message size and whats the value you have given in EO_MSG_SIZE_LIMIT. After saving this parameter did you verified at RWB ->RWB->Component Monitoring->Integration Engine->
    Settings->Tuning
    Add one more EO_INBOUND_TO_OUTBOUND this will allow data not to be placed on Outbound queue and bring to inbound queue. This is having advantage that to process high volume message you will get better performance but disadvantage is when there is no receiver inbound queue is blocked.
    It can be a issue related to connection. Please check with the RFC you have for proxy and IE RFC's
    Thanks
    Gaurav
    Edited by: Gaurav Bhargava on Nov 22, 2008 11:44 PM

Maybe you are looking for

  • How to set polling interval for database adapter in interconnect?help plz!!

    Hi i have 4 database adapters with same name subscribing to same event in 4 different interconnect instances(i.e., same business event and application event in different hubs) and pointing to same source application database , same destination applic

  • Error coming while deploying portal EAR file into the weblogic Portal 8.1..

    HI Guys, When I deploy the latest PORTAL EAR file into the BEA portal environment we receive a number of these errors: ####<Feb 27, 2008 4:36:14 PM PST> <Warning> <netuix> <dev147> <portalName> <ExecuteThread: '0' for queue: 'weblogic.kernel.System'>

  • File type association, e.g. Quicktime - VLC; make it stick

    Hi, I want to use VLC instead of QuickTime Player. Therefore .mov files are set up to be played using VLC. After booting into Windows and rebooting Mac OS X, this set up is defaulted, meaning QU Player will be used. Is there any way to make my person

  • Stored Procedure with CSV string as parameters

    Hi, I have been tasked with this issue, but I have no real SQL/Oracle experience. My boss advises that the best way to do this would be to pass a CSV string into the stored proc for each parameter, What I need to do is parse the CSV string and use ea

  • Trouble passing var using CFC

    I'm having trouble passing a variable value called from a CFC into Flex via RemoteObject. Basically I'm trying to pass the current logged-in user to a Combobox as a string. The Web directory in IIS is set to dissallow anonymous access and is set to I