Examples of Spring


Examples of org.dyno.visual.swing.layouts.Spring

    Point ltp = parent.getMascotLocation();
    int x = ltp.x - hot.x;
    int y = ltp.y - hot.y;
    int width = drop.getWidth();
    int height = drop.getHeight();
    Spring spring = new Spring(10, 10);// TODO should be replaced by a
                      // container gap.
    if (pair == null || pair.hQuart == null) {
      if (vertical instanceof Leading)
        vertical = new Leading(y - insets.top, height, spring);
      else if (vertical instanceof Trailing)
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Spring

    Point ltp = parent.getMascotLocation();
    int x = ltp.x - hot.x;
    int y = ltp.y - hot.y;
    int width = drop.getWidth();
    int height = drop.getHeight();
    Spring spring = new Spring(10, 10);// TODO should be replaced by a
                      // container gap.
    if (pair == null || pair.vQuart == null) {
      if (horizontal instanceof Leading)
        horizontal = new Leading(x - insets.left, width, spring);
      else if (horizontal instanceof Trailing)
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Spring

    Insets insets = container.getInsets();
    WidgetAdapter dropAdapter = tracingAdapter;
    JComponent drop = (JComponent) dropAdapter.getParentContainer();
    QuartetPair pair = calMascotLocation(drop, p, azimuth);
    Point hot = dropAdapter.getHotspotPoint();
    Spring spring = new Spring(10, 10);// TODO should be replaced by a
    // container gap.
    if (pair == null) {
      Point np = new Point(p.x - hot.x, p.y - hot.y);
      Constraints constraints = new Constraints(new Leading(np.x
          - insets.left, drop.getWidth(), spring), new Leading(np.y
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Spring

    Point ltp = parent.getMascotLocation();
    int x = ltp.x - hot.x;
    int y = ltp.y - hot.y;
    int width = drop.getWidth();
    int height = drop.getHeight();
    Spring spring = new Spring(10, 10);// TODO should be replaced by a
    // container gap.
    if (pair == null) {
      if (horizontal instanceof Leading)
        horizontal = new Leading(x - insets.left, width, spring);
      else if (horizontal instanceof Trailing)
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Spring

    int gap = layoutStyle.getContainerGap((JComponent) me, SwingConstants.SOUTH, parent);
    if (gap > min)
      min = gap;
    if (gap > pref)
      pref = gap;
    Spring spring = new Spring(min, pref);
    Insets insets = parent.getInsets();
    return new Leading(bounds.y - insets.top, bounds.height, spring);
  }
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Spring

    int gap = layoutStyle.getContainerGap((JComponent) me, SwingConstants.NORTH, parent);
    if (gap > min)
      min = gap;
    if (gap > pref)
      pref = gap;
    Spring spring = new Spring(min, pref);
    Insets insets = parent.getInsets();
    int h = parent.getHeight();
    return new Trailing(h - bounds.y - bounds.height - insets.bottom, bounds.height, spring);
  }
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Spring

  protected Alignment createVerticalSpring(Component me, Rectangle bounds, Container parent) {
    int h = parent.getHeight();
    Insets insets = parent.getInsets();
    int min = me.getMinimumSize().height;
    int pref = me.getPreferredSize().height;
    Spring spring = new Spring(min, pref);
    return new Bilateral(bounds.y - insets.top, h - bounds.y - bounds.height - insets.bottom, spring);
  }
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Spring

    int gap = layoutStyle.getContainerGap((JComponent) me, SwingConstants.EAST, parent);
    if (gap > min)
      min = gap;
    if (gap > pref)
      pref = gap;
    Spring spring = new Spring(min, pref);
    Insets insets = parent.getInsets();
    return new Leading(bounds.x - insets.left, bounds.width, spring);
  }
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Spring

    int gap = layoutStyle.getContainerGap((JComponent) me, SwingConstants.WEST, parent);
    if (gap > min)
      min = gap;
    if (gap > pref)
      pref = gap;
    Spring spring = new Spring(min, pref);
    Insets insets = parent.getInsets();
    int w = parent.getWidth();
    return new Trailing(w - bounds.x - bounds.width - insets.right, bounds.width, spring);
  }
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Spring

  protected Alignment createHorizontalSpring(Component me, Rectangle bounds, Container parent) {
    int w = parent.getWidth();
    Insets insets = parent.getInsets();
    int min = me.getMinimumSize().width;
    int pref = me.getPreferredSize().width;
    Spring spring = new Spring(min, pref);
    return new Bilateral(bounds.x - insets.left, w - bounds.x - bounds.width - insets.right, spring);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.