Package net.miginfocom.layout

Examples of net.miginfocom.layout.UnitValue


          Point p = mousePos != null ? SwingUtilities.convertPoint(panel, mousePos, c) : new Point(-1000, -1000);

          float fact = (float) Math.sqrt(Math.pow(Math.abs(p.x - c.getWidth() / 2f), 2) + Math.pow(Math.abs(p.y - c.getHeight() / 2f), 2));
          fact = Math.max(2 - (fact / 200), 1);

          return new BoundSize[] {new BoundSize(new UnitValue(70 * fact), ""), new BoundSize(new UnitValue(70 * fact), "")};
        }
        return null;
      }

      // This is the jumping part
View Full Code Here


          Point p = mousePos != null ? SwingUtilities.convertPoint(panel, mousePos, c) : new Point(-1000, -1000);

          float fact = (float) Math.sqrt(Math.pow(Math.abs(p.x - c.getWidth() / 2f), 2) + Math.pow(Math.abs(p.y - c.getHeight() / 2f), 2));
          fact = Math.max(2 - (fact / 200), 1);

          return new BoundSize[] {new BoundSize(new UnitValue(70 * fact), ""), new BoundSize(new UnitValue(70 * fact), "")};
        }
        return null;
      }

      // This is the jumping part
View Full Code Here

  {
    if (constrain == null)
      return winSize;

    int retSize = winSize;
    UnitValue wUV = constrain.getPreferred();
    if (wUV != null)
      retSize = wUV.getPixels(prefSize, parent, parent);

    retSize = constrain.constrain(retSize, prefSize, parent);

    return constrain.getGapPush() ? Math.max(winSize, retSize) : retSize;
  }
View Full Code Here

TOP

Related Classes of net.miginfocom.layout.UnitValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.