Package org.dyno.visual.swing.layouts

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


    }
    return false;
  }

  private void adjustVerticalLeadingBy(Component widget, int delta_height) {
    GroupLayout layout = (GroupLayout) container.getLayout();
    CompositeAdapter containerAdapter = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    int count = containerAdapter.getChildCount();
    for (int i = 0; i < count; i++) {
      Component target = containerAdapter.getChild(i);
      if (target != widget) {
        if (isBottomRelatedTo((JComponent) target, (JComponent) widget)) {
          Constraints constraints = layout.getConstraints(target);
          Alignment vertical = constraints.getVertical();
          if (vertical instanceof Leading) {
            Leading leading = (Leading) vertical;
            leading.setLeading(leading.getLeading() + delta_height);
            adjustVerticalLeadingBy(target, delta_height);
View Full Code Here


    }
    return false;
  }

  private void adjustHorizontalTrailingBy(Component widget, int delta_width) {
    GroupLayout layout = (GroupLayout) container.getLayout();
    CompositeAdapter containerAdapter = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    int count = containerAdapter.getChildCount();
    for (int i = 0; i < count; i++) {
      Component target = containerAdapter.getChild(i);
      if (target != widget) {
        if (isLeftRelatedTo((JComponent) target, (JComponent) widget)) {
          Constraints constraints = layout.getConstraints(target);
          Alignment horizontal = constraints.getHorizontal();
          if (horizontal instanceof Trailing) {
            Trailing leading = (Trailing) horizontal;
            leading.setTrailing(leading.getTrailing() + delta_width);
            adjustHorizontalTrailingBy(target, delta_width);
View Full Code Here

    }
    return false;
  }

  private void adjustHorizontalLeadingBy(Component widget, int delta_width) {
    GroupLayout layout = (GroupLayout) container.getLayout();
    CompositeAdapter containerAdapter = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    int count = containerAdapter.getChildCount();
    for (int i = 0; i < count; i++) {
      Component target = containerAdapter.getChild(i);
      if (target != widget) {
        if (isRightRelatedTo((JComponent) target, (JComponent) widget)) {
          Constraints constraints = layout.getConstraints(target);
          Alignment horizontal = constraints.getHorizontal();
          if (horizontal instanceof Leading) {
            Leading leading = (Leading) horizontal;
            leading.setLeading(leading.getLeading() + delta_width);
            adjustHorizontalLeadingBy(target, delta_width);
View Full Code Here

    container.add(child, (Constraints) constraints);
  }

  @Override
  public Object getChildConstraints(Component child) {
    GroupLayout layout = (GroupLayout) container.getLayout();
    Constraints constraints = layout.getConstraints(child);
    return constraints;
  }
View Full Code Here

  }

  @Override
  public Alignment createHoveredAxis(Component me, Rectangle bounds) {
    Container parent = target.getParent();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    Constraints constraints = layout.getConstraints(target);
    Alignment vertical = constraints.getVertical();
    if (vertical instanceof Leading) {
      return createVerticalLeading(me, bounds, parent);
    } else if (vertical instanceof Trailing) {
      return createVerticalTrailing(me, bounds, parent);
View Full Code Here

  }

  @Override
  public Alignment createBottomAxis(Component me, Rectangle bounds, Alignment lastAxis) {
    Container parent = target.getParent();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    Constraints constraints = layout.getConstraints(target);
    Alignment vertical = constraints.getVertical();
    if (vertical instanceof Leading) {
      return createVerticalLeading(me, bounds, parent);
    } else if (vertical instanceof Trailing) {
      if (lastAxis instanceof Leading) {
View Full Code Here

  }

  @Override
  public Alignment createTopAxis(Component me, Rectangle bounds, Alignment lastAxis) {
    Container parent = target.getParent();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    Constraints constraints = layout.getConstraints(target);
    Alignment vertical = constraints.getVertical();
    if (vertical instanceof Leading) {
      return createVerticalLeading(me, bounds, parent);
    } else if (vertical instanceof Trailing) {
      return createVerticalTrailing(me, bounds, parent);
View Full Code Here

  }

  @Override
  public Alignment createHoveredAxis(Component me, Rectangle bounds) {
    Container parent = target.getParent();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    Constraints constraints = layout.getConstraints(target);
    Alignment horizontal = constraints.getHorizontal();
    if (horizontal instanceof Leading) {
      return createHorizontalLeading(me, bounds, parent);
    } else if (horizontal instanceof Trailing) {
      return createHorizontalTrailing(me, bounds, parent);
View Full Code Here

  }

  @Override
  public Alignment createRightAxis(Component me, Rectangle bounds, Alignment lastAxis) {
    Container parent = target.getParent();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    Constraints constraints = layout.getConstraints(target);
    Alignment horizontal = constraints.getHorizontal();
    if (horizontal instanceof Leading) {
      return createHorizontalLeading(me, bounds, parent);
    } else if (horizontal instanceof Trailing) {
      if (lastAxis instanceof Leading) {
View Full Code Here

  }

  @Override
  public Alignment createLeftAxis(Component me, Rectangle bounds, Alignment lastAxis) {
    Container parent = target.getParent();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    Constraints constraints = layout.getConstraints(target);
    Alignment horizontal = constraints.getHorizontal();
    if (horizontal instanceof Leading) {
      return createHorizontalLeading(me, bounds, parent);
    } else if (horizontal instanceof Trailing) {
      return createHorizontalTrailing(me, bounds, parent);
View Full Code Here

TOP

Related Classes of org.dyno.visual.swing.layouts.GroupLayout

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.