org.pbjar.jxlayer.plaf.ext.transform
Class TransformLayout

java.lang.Object
  extended by DefaultLayerLayout
      extended by org.pbjar.jxlayer.plaf.ext.transform.TransformLayout

public class TransformLayout
extends DefaultLayerLayout

A specialized layout manager for JXLayer in combination with the TransformUI.

It extends DefaultLayerLayout and, as long as no enabled TransformUI is set to JXLayer, will act exactly the same as its super class.

However, when the above conditions are all true, its behavior becomes different:

  1. Instead of setting the view's size to the layer's calculated inner area, it will set the view's size to its preferred size.
  2. Instead of setting the view's bounds to the calculated inner area, it will center the view in that inner area. This may result in some parts of the view formally obscured, or, some parts of the inner area not covered by the view.
  3. The preferred size will first be computed by the super implementation. Then, before returning, the calculated size will be transformed with the AffineTransform returned by TransformUI.getPreferredTransform(Dimension, JXLayer);
  4. The minimum size will first be computed by the super implementation. Then, before returning, the calculated size will be transformed with the AffineTransform returned by TransformUI.getPreferredTransform(Dimension, JXLayer);

See Also:
JXLayer.getView(), JXLayer.getGlassPane(), TransformUI

Constructor Summary
TransformLayout()
           
 
Method Summary
 void layoutContainer(Container parent)
          Overridden to apply a different layout when the LayerUI is an instance of TransformUI.
 Dimension minimumLayoutSize(Container parent)
          Overridden to apply a preferred transform on the Dimension object returned from the super implementation.
 Dimension preferredLayoutSize(Container parent)
          Overridden to apply a preferred transform on the Dimension object returned from the super implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformLayout

public TransformLayout()
Method Detail

layoutContainer

public void layoutContainer(Container parent)
Overridden to apply a different layout when the LayerUI is an instance of TransformUI. If this is not the case, the super implementation will be invoked.


minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Overridden to apply a preferred transform on the Dimension object returned from the super implementation.


preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Overridden to apply a preferred transform on the Dimension object returned from the super implementation.