Prohibit resizing below a certain window size

I was wondering if anyone has some useful insights into the following problem:
I have a scene with a certain initial size. Resizing is allowed, however below certain dimensions the application becomes unusable as not everything can be displayed (Think of an image that should be displayed in a window that is smaller than the image).
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class ForceMinSize extends Application {
    private double minWidth = 100;
    private double minHeigth = 100;
    @Override
    public void start(Stage primaryStage) {
        try {
            Image img = new Image( getClass().getResource("kajak4_small.png").openStream());
            ImageView imgView = new ImageView(img);
            StackPane root = new StackPane();
            root.getChildren().add(imgView);
            Scene scene = new Scene(root, 190, 163);
            primaryStage.setTitle("Force minimal size");
            primaryStage.setScene(scene);
            primaryStage.show();
        } catch (IOException ex) {
            Logger.getLogger(ForceMinSize.class.getName()).log(Level.SEVERE, null, ex);
    public static void main(String[] args) {
        launch(args);
Resizing the components to match the size is not an option. As the dimension properties of the stage are readonly I can only get notified when the size goes below the threshold, but can do nothing about it. The only other solution I can see is disabling resize and only allow the initial dimension (configurable) and fullscreen.

primaryStage.setMinWidth(minWidth);
primaryStage.setMinHeight(minHeigth);

Similar Messages

  • Will only remember certain window sizes

    Firefox 31 will only remember certain window sizes, only the page when the browser is first opened. Every page after that has to be enlarged. This always seems to be a problem with Firefox, why can't I have it remember my default window size?
    Running Windows 8.1 Pro 64

    I use Freemake Video Converter and this gives an option to deliver straight to I-Tunes. Vids appears under Films . So far for some reason I have managed to download lots of stuff from YouTube witout issue with the exception on 1 video from the band Within Temptation, however, a further 10 have downloaded perfectly from the same band. Can only assume there may be a corruption somewhere, although it was an Official Video by Vevo.

  • On a certain website the window size has become so huge I cannot use certain features and am unable to reduce the window size myself. It went huge as I was moving the cursor and I have been unable to ajust this. How do I alter screen size manually?

    Sometimes when moving the cursor the window size on certain sites reduces or increases. This happens randomly and I am not able to make it happen to change the size of the screen to my choice. The window on a particular site is now so huge I am unable to use features on there as they do not come into view on my window at all. Please help me on how to control this feature or in other words how do I increase or decrease the window size manually.

    See "Resizing oversize window" - MozillaZine Knowledge Base
    *http://kb.mozillazine.org/Resizing_oversize_window
    There are a couple of extensions tat could also be involved
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • Window Size, Resizing, "Zoom"

    I have a question about Safari's windows. I have found, in comparison to Firefox, it difficult to use the resize or "zoom" function of the window options (the red, orange and green bubbles at the top left of every Macintosh window). Specifically, when I select the auto-resize (green button), I get a variety of window sizes which are meaningless to me, and I would like, as in Firefox, for the window to either maximize the screen, or return to some smaller (manually-set) size of previous.
    My question for the group would be: has anyone found this to be problematic for them, or has anyone found a work-around or solution to this?

    Hello,
    I just noticed that this isn't working for me in Safari or Camino. The 'zoom' button works as it should in Opera and Firefox.
    I tried your suggestion Hawaiian_Starman and it always reverts back. Just makes the window smaller than I want and clicking again just moves the same small window lower on the desktop. It will work as you say, but only for that one time. With Camino it reopens new window at whatever size another one is at. Hard to try completely without losing this page.
    I just upgraded to 10.5.8 yesterday and have had other oddities afterward but this is the most annoying. Not sure if it was like that before, but apparently it was according to the original poster.
    Haven't found this issue elsewhere, so I will call Apple tomorrow and report back if it gets resolved.
    Thanks

  • How can I remove all photos below a certain size?

    Due to an importing error by a customer, I need to remove all photos below a certain size (e.g. all photos smaller than 300pixels wide). Any suggestions?
    I have so far successfully used Spotlight to do it, but it left me with thousands of orphaned thumbnails which iPhoto doesn't appear to be able to remove. I have now restored the backup library from prior to the spotlight operation.
    Any suggestions appreciated! TIA.

    Nevermind, I've cracked it. Used spotlight to remove all the images smaller than 300px wide, then used the app "Tidy Up!" to 'Report missing photos' and deleted them all (2000+). Tidy Up is very clever and executes the deletes through iPhoto so the library database remains accurate. The deletion took about 30 minutes, while it's happening iPhoto looks like it's being controlled by a deranged invisible user.

  • How do I resize my screen? I cant see the control f menu or the bottom of web pages unless I "restore down" to a smaller window size.

    I cant see the control f menu or the bottom of web pages unless I "restore down" to a smaller window size.

    The problem is when you maximize the window -- it is even bigger than the area available? Or the problem is that normal windows are always too large and have to be resized manually?

  • Tmux: show window size in session list; don't resize when attaching

    Hi there!
    I have two questions related to the same problem in tmux. The problem is that when you attach (by accident) to a session which has been opened on a larger screen, it is resized. This changes the sizes of the panels on the original, large screen, as well as the relative sizes of vim panels, which is really annying. This could be prevented, for instance, if I knew the size of the session in advance, so I could avoid attaching to it. I see multiple potential solutions/workaround for this, though, hence the multiple questions (but google hasn't been kind enough to help me).
    In the first scenario, I want to change to another session using the session list (<Ctrl-b><s>), but haven't assigned any meaningful names to the sessions, so I have no idea which session is the one opened on the larger screen.
    [1] Is there a way to display the current screen size of each session in the session list?
    In the second scenario, I attach to a tmux server without attaching to a specific session (because I haven't assigned any names, or don't recall them). If the session I'm attached to by default is opened on a larger screen, I run into the resizing problem.
    [2] Is there a way to attach to a session which has the current screen's dimension (if there is one)? Maybe the session can automatically be sorted by screen size, so that by default I'm attached to the smaller screen.
    [3] Another possible solution: Is there a way for tmux to warn me whenever I'm about to resize a session, be it by changing the session (scenario 1) or by attaching (scenario 2) (which, I assume, is in the end equivalent to tmux anyway), and allow me to abort my attempt?
    Any suggestions are appreciated!
    Last edited by cryptkeeper (2014-12-10 08:18:22)

    Hi David, Thanks for helping me. the video was shot on the new sony hdr-hc1e (pal).the clip and seqeunce are both set to 1440 x 1080 but based on where i assume you were going i created a new sequence at 1440 x 1080 and loaded one clip to it, it works correctly. i think the issue was that when i created the first sequence it was at a different frame size, i changed it but the athough the changes show in the browser they don't seem to work the same was as a sequence which is correctly specified at the start, do you have any idea how i can make sequence changes and have them take effect on an already created sequence?
    thanks a million

  • Cover flow window size keeps changing

    As you can see to the images below, iTunes suddenly started to changing my cover flow size every time I restart it.
    !http://img11.imageshack.us/img11/2162/30848223.jpg!
    !http://img13.imageshack.us/img13/695/39067239.jpg!
    Before 2-3 days I never had this issue. How can I make my cover flow sixe remain the same every time I open iTunes?

    Here's something I've noticed:
    1. When I uninstalled Dockstar, all problems went away. There's definitely something going on here.
    2. When I reinstalled Dockstar, I am now only having problems with Mail remembering that one of my mailboxes is set to "organize by thread." (I had this problem before in addition to the window resizing). However, the window resizing problem seems to be gone (for today, at least).
    Here's what's different:
    1. I installed GrowlMail after they updated to a 64bit preference pane. (Not sure how this would impact it, but who knows...)
    2. Last time, I just installed the newest copy of Dockstar over the old one. This time, I uninstalled the old one and reinstalled Dockstar cleanly.
    Do you feel like verifying if this is true for you too?

  • Window Size in Safari

    Is it possible to set a default window size when launching Safari and/or opening new windows in Safari?

    That is how I thought it worked.
    Please allow me to further expand on the issue I'm having and perhaps you can shed some light on that. 
    I resize the Safari window to the size I would like to be however when I open a radio streaming site I frequently use, which is a smaller window size by its default, it resets my window size and the next time I launch Safari and open a new window the window is the smaller default size not the size I set for it. The obvious solution would be to use a different web browser for the streaming site. I take it there is no way to set Safari to open a window at a certain size to prevent this from happening? 

  • ITunes 11.0.1 window size issue

    The window size on my copy of iTunes 11.0.1 has stretched beyond the bottom of the screen.  I am no longer able to resize the window except in width.  This came about when I lowered the window until only the top of the menu bar was exposed at the bottom of my screen.  I did not bring iTunes back up for a few days during which time I had watched a few movies on my Apple TV.
    When I brought it back up, the lower edge of the iTunes window stretched below the bottom of my display (Samsung 24 inch 1900x1280).  I have shut down my system and brought it all back up.  When I restart iTunes, the window size problem remains.  Even when I maximize the window, the bottom is still below the edge of the display.
    Any suggestions?
    Charlie

    Can you resize from the top down then drag the whole window up?

  • App Window size freezes & can't be changed

    This has happened in both Pages and in Finder: The window locks into its current size and cannot be resized. When the pointer is placed at the edge of the window the double arrow appears, but the window cannot be changed. The app must be quit and restarted before the window size can be adjusted again.

    Hi jameskrieg,
    Welcome to the Support Communities!
    What OS are you working with?  (Your profile shows 10.4.11 but you are in the Mavericks community.)  I would suggest restarting your MacBook Pro to refresh it.  If that doesn't work, try resetting the SMC and PRAM.  The articles below will show you how:
    Intel-based Macs: Resetting the System Management Controller (SMC)
    http://support.apple.com/kb/HT3964
    OS X Mavericks: Reset your computer’s PRAM
    http://support.apple.com/kb/ph14222
    Cheers,
    - Judy

  • AP Divs (layers) move when I open my website on different window size.

    First of all, this is my first time trying to make a website.
    I'm doing an assignment for my class and i found it difficult for me to fix. I have spend 4-5 hours researching online but nothing work for me.
    Well,the problem is the AP Divs (layers) move when I open my website on different window size(iphone,ipad).
    The website only look right on 1366 x 786 resolution. Please take a look at my 2 pics below:
    And I don't know how to make the website to fit on the iphone and ipad so that I don't have to scroll down or sroll to the right to view the whole thing.
    Please someone help me!
    The code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width" />
    <title>Boston Green Community College</title>
    <style type="text/css">
    <!--
    body {
        background-color: #3f7244;
        padding: 0;
        color: #8d0101;
        margin-top: 0;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: 0;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 100%;
        line-height: 1.4;
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
        padding: 0;
        margin: 0;
    h1, h2, h3, h4, h5, h6, p {
        margin-top: 0;     /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
        padding-right: 15px;
        padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
        border: none;
    /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
    a:link {
        color: #003702;
        text-decoration: NONE; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    a:visited {
        color: #028b66;
        text-decoration: underline;
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
        text-decoration: none;
    /* ~~ this fixed width container surrounds the other divs ~~ */
    .container {
        width: 960px;
        background-color: #FFF;
        margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
    /* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
    .header {
        background-color: #ADB96E;
    /* ~~ This is the layout information. ~~
    1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
    .content {
        padding: 0px 0;
    /* ~~ The footer ~~ */
    .footer {
        padding: 10px 0;
        background-color: #CCC49F;
    /* ~~ miscellaneous float/clear classes ~~ */
    .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
        float: right;
        margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
        float: left;
        margin-right: 8px;
    .clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
        clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    #apDiv1 {
        position: absolute;
        width: 251px;
        height: 101px;
        z-index: 1;
        left: 871px;
        top: 10px;
    #apDiv2 {
        position: absolute;
        width: 228px;
        height: 60px;
        z-index: 2;
        left: 9px;
        top: 1397px;
    #apDiv3 {
        position: absolute;
        width: 273px;
        height: 198px;
        z-index: 2;
        left: 851px;
        top: 383px;
    #apDiv4 {
        position: absolute;
        width: 200px;
        height: 115px;
        z-index: 3;
        left: 242px;
        top: 120px;
    #apDiv5 {
        position: absolute;
        width: 200px;
        height: 115px;
        z-index: 4;
        left: 902px;
        top: 178px;
    #apDiv6 {
        position: absolute;
        width: 200px;
        height: 115px;
        z-index: 4;
        left: 857px;
        top: 171px;
    #apDiv7 {
        position: absolute;
        width: 200px;
        height: 115px;
        z-index: 4;
        left: 455px;
        top: 547px;
    #apDiv8 {
        position: absolute;
        width: 200px;
        height: 115px;
        z-index: 4;
        left: 853px;
        top: 113px;
    #apDiv9 {
        position: absolute;
        width: 200px;
        height: 115px;
        z-index: 5;
        left: 853px;
        top: 246px;
    #apDiv10 {
        position: absolute;
        width: 200px;
        height: 115px;
        z-index: 6;
        left: 513px;
        top: 121px;
    #apDiv11 {
        position: absolute;
        width: 200px;
        height: 115px;
        z-index: 6;
        left: 511px;
        top: 123px;
    -->
    </style></head>
    <body>
    <div class="container">
      <div class="header"><a href="#"><img src="Pictures/34d-1.png" alt="Insert Logo Here" name="Insert_logo" width="619" height="90" id="Insert_logo" style="background-color: #C6D580; display:block;" />
        <div id="apDiv11"><font color="#f4f1f1">
    <script type="text/javascript">
    var d=new Date()
    var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
    var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
    document.write(weekday[d.getDay()] + " ")
    document.write(d.getDate() + ". ")
    document.write(monthname[d.getMonth()] + " ")
    document.write(d.getFullYear())
    </script></font>
    </div>
        <div id="apDiv1">
      <!-- Use of this code assumes agreement with the Google Custom Search Terms of Service. -->
      <!-- The terms of service are available at http://www.google.com/cse/docs/tos.html -->
      <form name="cse" id="searchbox_demo" action="http://www.google.com/cse">
      <input type="hidden" name="cref" value="" />
      <input type="hidden" name="ie" value="utf-8" />
      <input type="hidden" name="hl" value="" />
      <input name="q" type="text" size="40" />
      <input type="submit" name="sa" value="Search" />
    </form>
    <script type="text/javascript" src="http://www.google.com/cse/tools/onthefly?form=searchbox_demo&lang="></script>
                                  </div>
                                    </div>
      <div class="content">
        <center><img src="Pictures/DFDF11.png" width="959" height="556" longdesc="Pictures/junior-2-960x.jpg" /></h1></center>
      <!-- end .content --></div>
      <div class="footer">
         <img src="Pictures/RRR1.png" width="202" height="70" />
         <div id="apDiv3">
           <p> </p>
           <p><a href="Job.html">Jobs</a>         </p>
           <p><a href="Art Gallery.html">Art Gallery</a>         </p>
           <p><a href="Contact us.html">Contact Us </a></p>
        </div>
        <div id="apDiv4"><center>
    <P>About</P>
    <a href="visiting.html">visiting</a> | <a href="Map.html">maps </a>| <P><a href="About.html">about BGCC</a></P>
    <P>Academic</P>
    <P><a href="Courses.html">schools+courses</a></P>
    <P>Admissions  </P>
    <P><a href="cost & aid basics.html">cost & aid basics </a>| <a href="Apply now.html">join BGCC</a>
    <P>Studen Life</P>
    <P><a href="Athletics.html">Athletics</a></P>
    <P>Greenforce Education</P>
    <P><a href="Career.html">career center</a></P>
    </center> </div>
         <p><font size="2" color="black">BGCC | 99 GreenField | Boston, MA 02199 |617-0101-1000| TTY 617-0202-9944|</font></p>
        <div id="apDiv9"><a href="Donate.html" target="_blank"><a href="Donate.html"><img src="Pictures/three-green-logo.jpg" width="218" height="99" longdesc="Pictures/three-green-logo.jpg" /></div>
        <div id="apDiv8"><a href="Apply now.html" target="_blank"><a href="Apply now.html">
    <img border="0" src="Pictures/cxgvxdvxgd.jpg" alt="Apply Now" width="218" height="99"></a></div>
      <!-- end .footer --></div>
      <!-- end .container --></div>
    </body>
    </html>

    That's what APDivs do.  This is the single most common problem new people have with web page layouts.  DO NOT use positioning.  You don't need it.  Start over.  Learn to use CSS floats, margins and padding to align elements. 
    Below is a basic HTML5 Layout.  View source in browser to see the code.
    http://www.alt-web.com/sandbox/HTML5-BasicLayout.html
    Nancy O.

  • How  to change default window size?

    I'm using MX 6.0 on Mac... For some reason I can't figure out
    how to change the default window size in the work windows. Every
    time I open a new file to work on it opens to a smaller size than
    the actual page is. When opening pages dozens of times a day, it
    gets annoying to have to resize each time. I'm sure it wasn't
    always like this, but I can't figure out how to change it so the
    default size that it opens to each time is larger.
    Thanks for any help,
    DD

    Window | Workspace | Save Current
    This gives you the opportunity to save a current layout look
    that you like
    You might also look under
    Edit |Preferences | Status bar - but I don't see that this
    does anything
    in DWCS3

  • How do I set the Launch window size (from launch from an LMS) in Captivate 5.5?

    When my project launches from the LMS, the lauch window is smaller that the actual project size and requires the user to resize the window to see the whole project. My LMS administrator tells me that the launch window size is not controlled by the LMS so I am trying to figure out how I can set this to match the project dimensions.

    The size of the browser window CAN be controlled by the LMS, but some LMSs are hopeless in this area and don't provide the settings to do so.
    Moodle for example allows you to specify that the course content will open in a new window each time an item in the LMS TOC is clicked and what the height and width of that window will be. However, all versions of SumTotal before the latest one did not give you this option (and that despite the exhorbitant price difference between these two products.)
    So your LMS admin might be correct in that HIS particular LMS cannot control the size of the launch window, but that's not because no LMS can do this.

  • Window size for day, week, month

    In Tiger you could have a unique window size for the day view, week view, and month view. Is this option gone with Leopard? I liked viewing my day, week, and month in different size windows just by clicking on the buttons and having it go to that view.

    Hi..
    try below code.
      CALL FUNCTION 'FLTP_CHAR_CONVERSION_FROM_SI'
    EXPORTING
    char_unit       = <W_MMPT-ZYKL1>
    decimals        = 0
    exponent        = 0
    fltp_value_si   = <W_MMPT-ZEIEH >
    indicator_value = ‘X’
    masc_symbol     = ' '
    IMPORTING
    char_value      = <res__number_days>.
    regards.
    laxman

Maybe you are looking for

  • Collecting data from multiple rows into one column

    I'd like to run a query and put a collection of items into one output column instead of multiple rows. See the example below: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod PL/SQL Release 10.2.0.5.0 - Production "CORE     10.2.0.5.0

  • Cannot connect to photostream on my apple TV

    My Apple TV all of a sudden cannot connect to Photostream.  Any suggestions?

  • Funcion to display query output

    Hi, I want to create a funcion like below. I will pass select query to function from my java application and function should return query output. Then I will use output into my application display part, results may be thousands of rows. Will it work

  • Remove iMessage link from iPhone

    Hi, I want to give my iPhone 3Gs to my mother. I do not want her to receive iMessages that were supposed to be send to me. Will it work to brake the link between iMessage me and the 3GS when I remove this telephone from my Support profile under: http

  • I cant found where to buy Edge Animate

    If i select one aplication to buy Edge Animate is not showed. I have been looking in different places but i cant find where to do it. Maybe this soft is included in another one as a pack? Please help me, and sorry about my english.