Class LayoutManipulator


  • public class LayoutManipulator
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int COLUMN  
      static int HORIZONTAL  
      static int ROW  
      static int VERTICAL  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Component add​(VisionContainer panel, javax.swing.JComponent comp)
      Adds the component to the panel.
      static boolean componentsAreSiblings​(java.util.List<javax.swing.JComponent> components)
      Checks to see if all of the components are siblings (have the same .getParent()) and that there is at least 1 component in the list
      static void repositionComponent​(javax.swing.JComponent component, java.awt.geom.Rectangle2D newPosition)  
      static void repositionComponent​(javax.swing.JComponent component, java.awt.geom.Rectangle2D newPosition, boolean delayValidation)
      Moves the given component to the specified rectangle, which should be relative to the component's parent.
      static void setPositionDelta​(javax.swing.JComponent comp, double dx, double dy)
      Moves a component by dx, dy
      static void validateRoot​(java.awt.Component c)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • repositionComponent

        public static void repositionComponent​(javax.swing.JComponent component,
                                               java.awt.geom.Rectangle2D newPosition)
      • repositionComponent

        public static void repositionComponent​(javax.swing.JComponent component,
                                               java.awt.geom.Rectangle2D newPosition,
                                               boolean delayValidation)
        Moves the given component to the specified rectangle, which should be relative to the component's parent.
      • setPositionDelta

        public static void setPositionDelta​(javax.swing.JComponent comp,
                                            double dx,
                                            double dy)
        Moves a component by dx, dy
      • add

        public java.awt.Component add​(VisionContainer panel,
                                      javax.swing.JComponent comp)
        Adds the component to the panel. Component should already have its location set on it, but it may be then adjusted to fit within its parent. Will startup the component if it is a ComponentLifecycle
      • validateRoot

        public static void validateRoot​(java.awt.Component c)
      • componentsAreSiblings

        public static boolean componentsAreSiblings​(java.util.List<javax.swing.JComponent> components)
        Checks to see if all of the components are siblings (have the same .getParent()) and that there is at least 1 component in the list