Hi, the biggest problem in making it resizable was finding where in the code, as its not in the panels. After I found out its buried in Canvas, it was as simple as changing an enum or boolean value in the right method there. Thats because creating the JInternalFrame is centralized in Canvas and the panels are created and added in there, too. Even stranger is that the JDialogs, that are basically a non-internal empty AWT Window with modality methods, are not created in Canvas and a FreeColDialog is a JDialog, when the equivalent of the JPanel used in panels is the JOptionPane the dialogs only contain.
As said earlier, I was in favor of closing this old tracker item. Everything possible should be resizable (tiny tooltips should auto-size), but there is one exception. We have a special dialog with a premade skin, which is only available in a single size. This is btw the one where the SVN contains different versions with the upper half of different people leaning over the top of the diaog skin. Would you want to keep the single one, add more of them or remove it? There is one other complication with JInternalFrames, that got made non- resizable. This created the bug where in the panel contructor a call to Canvas.RestoreWindowSize was made, which could load bad sizes the users were then stuck with (missing buttons and more). You had this patch to add this call to more of the panels, and this is what delayed it. There is some classes where getSize, getPreferredSize or getMaximumSize is overridden to get a fixed size. I consider this a bad hack and removed most of these, but some still remain (eg Colopedia Tree). Normally one just calls setPreferredSize in contructor and thats it; sometimes the layout creation can be adapted a bit. The rebel tooltip in colony panel somehow did resist such change though, when I tried to make it auto-size to fit its content. There still remains the need to check many rarely used gui elements for there sizing behaviour, but that might take a long time. Regards, wintertime > Gesendet: Sonntag, 17. Mai 2015 um 08:22 Uhr > Von: "Michael T. Pope" <mp...@computer.org> > An: freecol-developers@lists.sourceforge.net > Betreff: Re: [Freecol-developers] The size of dialogs > > On Mon, 9 Mar 2015 16:48:35 +1030 > "Michael T. Pope" <mp...@computer.org> wrote: > > Now that 0.11.3 is out I am looking through the list of issues I had put > > aside. One of them is the question of whether dialogs/panels/whatever > > should be resizable or not. What do people think? What we have ATM is > > not consistent, and does not seem to be guided by any underlying > > principles. Any suggestions for what these should be? > > This discussion got buried without resolution. However after re-reading > the thread it is clear that there is more support for making dialogs > resizeable than for fixed sizes, if only to allow the user to work around > strange window sizes, scales and bugs. > > Therefore unless a strong counter-argument appears, I think we should > start transitioning to resizeable dialog/panels. To that end, now that > EuropePanel is resizeable, can we have some comment from wintertime about > how that was done, and/or some general remarks about good practice for > enabling resizeability? > > And yes, with the principle decided, I think we can now close BR#459 > as "wont fix". > > Cheers, > Mike Pope > ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers