Examples of GroupLayout


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

  }

  @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

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

  }

  @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) {
      return createHorizontalTrailing(me, bounds, parent);
View Full Code Here

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

  }

  @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) {
      if (lastAxis instanceof Leading)
        return createHorizontalLeading(me, bounds, parent);
      else if (lastAxis instanceof Trailing)
View Full Code Here

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

  protected Alignment createVerticalLeading(Component me, Rectangle bounds, Container parent) {
    int min = Integer.MIN_VALUE;
    int pref = Integer.MIN_VALUE;
    int count = parent.getComponentCount();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    LayoutStyle layoutStyle = LayoutStyle.getInstance();
    for (int i = 0; i < count; i++) {
      Component target = parent.getComponent(i);
      Constraints constraints = layout.getConstraints(target);
      Rectangle targetBounds = target.getBounds();
      if (constraints != null && isOverlap(bounds.x, bounds.width, targetBounds.x, targetBounds.width)) {
        Alignment vertical = constraints.getVertical();
        Dimension prefs = target.getPreferredSize();
        Dimension mins = target.getMinimumSize();
View Full Code Here

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

  protected Alignment createVerticalTrailing(Component me, Rectangle bounds, Container parent) {
    int min = Integer.MIN_VALUE;
    int pref = Integer.MIN_VALUE;
    int count = parent.getComponentCount();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    LayoutStyle layoutStyle = LayoutStyle.getInstance();
    for (int i = 0; i < count; i++) {
      Component target = parent.getComponent(i);
      Constraints constraints = layout.getConstraints(target);
      Rectangle targetBounds = target.getBounds();
      if (constraints != null && isOverlap(bounds.x, bounds.width, targetBounds.x, targetBounds.width)) {
        Alignment vertical = constraints.getVertical();
        Dimension prefs = target.getPreferredSize();
        Dimension mins = target.getMinimumSize();
View Full Code Here

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

  protected Alignment createHorizontalLeading(Component me, Rectangle bounds, Container parent) {
    int min = Integer.MIN_VALUE;
    int pref = Integer.MIN_VALUE;
    int count = parent.getComponentCount();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    LayoutStyle layoutStyle = LayoutStyle.getInstance();
    for (int i = 0; i < count; i++) {
      Component target = parent.getComponent(i);
      Constraints constraints = layout.getConstraints(target);
      Rectangle targetBounds = target.getBounds();
      if (constraints != null && isOverlap(bounds.y, bounds.height, targetBounds.y, targetBounds.height)) {
        Alignment horizontal = constraints.getHorizontal();
        Dimension prefs = target.getPreferredSize();
        Dimension mins = target.getMinimumSize();
View Full Code Here

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

  protected Alignment createHorizontalTrailing(Component me, Rectangle bounds, Container parent) {
    int min = Integer.MIN_VALUE;
    int pref = Integer.MIN_VALUE;
    int count = parent.getComponentCount();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    LayoutStyle layoutStyle = LayoutStyle.getInstance();
    for (int i = 0; i < count; i++) {
      Component target = parent.getComponent(i);
      Constraints constraints = layout.getConstraints(target);
      Rectangle targetBounds = target.getBounds();
      if (constraints != null && isOverlap(bounds.y, bounds.height, targetBounds.y, targetBounds.height)) {
        Alignment horizontal = constraints.getHorizontal();
        Dimension prefs = target.getPreferredSize();
        Dimension mins = target.getMinimumSize();
View Full Code Here

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

  }

  @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) {
      if (lastAxis instanceof Leading)
        return createVerticalLeading(me, bounds, parent);
      else if (lastAxis instanceof Trailing)
View Full Code Here

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

    verticalAnchorMenu.add(new SetAnchorAction(container, false, "trailing", child)); //$NON-NLS-1$
    menu.add(verticalAnchorMenu);
  }

  private void initDragOperation(JComponent container) {
    GroupLayout layout = (GroupLayout) container.getLayout();
    beanHover = new ArrayList<IDragOperation>();
    resizeRightBottom = new ArrayList<IDragOperation>();
    resizeLeftTop = new ArrayList<IDragOperation>();
    resizeLeftBottom = new ArrayList<IDragOperation>();
    resizeRightTop = new ArrayList<IDragOperation>();
View Full Code Here

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

    if (!hovered) {
      Graphics2D g2d = (Graphics2D) g;
      Stroke old = g2d.getStroke();
      g2d.setColor(BASELINE_COLOR);
      g2d.setStroke(STROKE2);
      GroupLayout layout = (GroupLayout) container.getLayout();
      int width = container.getWidth();
      int height = container.getHeight();
      Insets insets = container.getInsets();
      CompositeAdapter adapter = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
      int count = adapter.getChildCount();
      for (int i = 0; i < count; i++) {
        Component child = adapter.getChild(i);
        WidgetAdapter childAdapter = WidgetAdapter.getWidgetAdapter(child);
        if (childAdapter.isSelected()) {
          Constraints constraints = layout.getConstraints(child);
          Alignment horizontal = constraints.getHorizontal();
          int y = child.getY() + child.getHeight() / 2;
          int x = 0;
          if (horizontal instanceof Leading) {
            x = ((Leading) horizontal).getLeading();
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.