I am a grumpy old C++ programmer pretending to do Java ;-) So do you guys still want me to try and implement this stuff?
On Fri, 18 Sep 2009 12:49:12 am Greg Brown wrote: > Scott, > > Apparently you had already suggested this, but it went right over my head: > >>> > The only case that I can think of where minimum width and explicit > >>> > width work > >>> > together is when the column says "This is the size I want to be but > >>> > if you do > >>> > need to resize me you shouldn't squash me down to any more than the > >>> > minimum". > > So, good idea. :-) > > On Thursday, September 17, 2009, at 10:37AM, "Greg Brown" <[email protected]> wrote: > >Todd had a great suggestion that I think justifies the simpler > > terminology, and allows these properties to work in conjunction with > > fixed-width columns: min. and max. width can be used by the table view > > header skin to bound the size of a column when the user resizes them. > > That implies that setWidth() should actually throw when width falls > > outside the allowed range (the default for min. and max. width would be 0 > > and Integer.MAX_VALUE, respectively, allowing any width value). > > > >What do you think? > > > >On Wednesday, September 16, 2009, at 08:47PM, "Scott Lanham" <[email protected]> wrote: > >>I think minimumWidth is the simplest and best property name. It may not > >> be perfectly accurate but it's meaning is accurate in all the most > >> common use cases I can think of. Names like > >> minimumWidthButOnlyIfAutomaticallyCalculated do appeal to a certain side > >> of me though ;-) > >> > >>I wasn't sure what the standard policy for width was within Pivot. But if > >> it is an absolute I think the code I submitted is not correct. > >> > >>With maximumWidth, that could lead to some pretty cool ways of resizing > >>tables. > >> > >>On Thu, 17 Sep 2009 10:21:22 am Greg Brown wrote: > >>> Simply setting min. width to width when an explicit width value is set > >>> is an interesting idea. However, any time an absolute width is > >>> specified, the min. width is going to be ignored: a width value that > >>> is not -1 and not relative is always respected. In other words, the > >>> min. width wouldn't even be consulted in this case - min. width really > >>> does only apply to a calculated size. > >>> > >>> I can't think of a concise way to represent that in a property name, > >>> though - "minimumCalculatedWidth" isn't very clear. > >>> "minimumPreferredWidth" isn't accurate. I almost think that > >>> "minimumWidth" is the best option, though we'd have to document that > >>> it would be ignored if an absolute width was given. In either case, we > >>> should probably also provide a "maximumWidth" property for parity. > >>> > >>> What do you think these properties should be called? > >>> > >>> G > >>> > >>> On Sep 16, 2009, at 7:57 PM, Scott Lanham wrote: > >>> > The only case that I can think of where minimum width and explicit > >>> > width work > >>> > together is when the column says "This is the size I want to be but > >>> > if you do > >>> > need to resize me you shouldn't squash me down to any more than the > >>> > minimum". > >>> > The bound check on that is just to make sure the minimum width is > >>> > not greater > >>> > then width. Should an exception be thrown in this case or just set > >>> > minimum > >>> > width to width? > >>> > > >>> > On Thu, 17 Sep 2009 09:41:33 am Greg Brown wrote: > >>> >> I just mean checking an explicitly set width value (i.e. not -1 and > >>> >> not relative) against min. width, and vice versa. Of course, if we > >>> >> defined it as the "minumum automatically determined width" vs. a > >>> >> literal minimum width, then we wouldn't have to do that. > >>> >> > >>> >> I'm not sure what the best solution is - just throwing some ideas > >>> >> out. > >>> >> > >>> >> On Sep 16, 2009, at 7:37 PM, Scott Lanham wrote: > >>> >>> I am happy to do more but I don't know what you mean by bounds > >>> >>> checking. I can > >>> >>> probably guess as to what the property change events should be. > >>> >>> > >>> >>> On Thu, 17 Sep 2009 09:30:41 am Greg Brown wrote: > >>> >>>> I like it. We'll need to do some bounds checking and fire property > >>> >>>> change events, but it does seem like a useful feature. Want to > >>> >>>> take a > >>> >>>> stab at rounding it out? > >>> >>>> > >>> >>>> On Sep 16, 2009, at 7:13 PM, Scott Lanham wrote: > >>> >>>>> Hi, > >>> >>>>> > >>> >>>>> Just another QADH ( Quick and Dirty Hack ). I don't expect this > >>> >>>>> is up to the > >>> >>>>> standard you guys like. > >>> >>>>> > >>> >>>>> I was playing around with resizing a TableView that is within a > >>> >>>>> ScrollPane > >>> >>>>> that is within a SplitPane and realised that I didn't want > >>> >>>>> relative > >>> >>>>> sized > >>> >>>>> column widths to shrink to nothing before the horizontal scroll > >>> >>>>> bar > >>> >>>>> kicked in. > >>> >>>>> I also wanted to set a minimum width for auto sized column widths > >>> >>>>> (-1) so that > >>> >>>>> the header wasn't obscured. > >>> >>>>> > >>> >>>>> What I did to implement this is attached. > >>> >>>>> > >>> >>>>> Cheers, > >>> >>>>> > >>> >>>>> Scott. > >>> >>>>> <pivot_svn_patch_20090917_01.diff>
