Thursday, 15 September 2011

java - Temporal operations with a layout manager? Best design? -


I am working on an image gallery in Swing (originally a JSC scroll-down scene), but I bit attack.

I have modified the MIGLayout so that I can give some additional functionality which I need.

I have some parts of the argument, so that I can take a decision in order to see my ideas under certain obstacles to see how it looks, such as the width of 100%, the number of columns, The largest component in a column under a specific zoom level, etc.

But, I do not want to see my components flickering, while I am "testing it". So what I am doing is making the other orphaned Zeppel with a copy of my components, so I can do these "tests" without affecting my final and effective view but this solution is a little peak for me and a bit sluggish is feeling. While doing these tests, I can do anything like disabling "setbones", but this is not good.

I know that these tests will not do the best, but it is easier to say than

The first layout is not required LayoutManager contains methods to calculate the first size

  Dimensions preferredLayoutSize (Container guardian); / ** * Calculates the dimension of the minimum size for the specified container, which includes these components. * @ PRM Basic component to be excluded Component * @seferredLayoutSize * / Dimension Minimum Layout Size (Container Parents); / ** * Keeps out the specified container * @ The ultimate parent should be kept outside the container * / zero layout (container parent);   

So I repeat to write that we say that calculatePreferrence () is the method where you want to remove the desired size from the container's children's minimum / maximum / Use the preferred size, then just use the calculation in the preferred layout system (and the minimum layout size).

No comments:

Post a Comment