Package org.dyno.visual.swing.plugin.spi

Examples of org.dyno.visual.swing.plugin.spi.CompositeAdapter


  private QuartetPair pair;

 
  public boolean drop(Point p) {
    CompositeAdapter parent = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    Insets insets = container.getInsets();
    WidgetAdapter dropAdapter = tracingAdapter;
    JComponent drop = (JComponent)dropAdapter.getParentContainer();
    Point hot = dropAdapter.getHotspotPoint();
    Alignment vertical = adapter.getLastConstraints().getVertical();
    Alignment horizontal = adapter.getLastConstraints().getHorizontal();
    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
View Full Code Here


    return true;
  }

 
  public boolean dragEnter(Point p) {
    CompositeAdapter parent = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    parent.setMascotLocation(p);
    last_point = p;
    adapter.setHovered(true);
    return true;
  }
View Full Code Here

    super(layout, tracingAdapter,op, container);
  }

 
  public boolean dragOver(Point p) {
    CompositeAdapter parent = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    JComponent todrop = (JComponent)tracingAdapter.getWidget();
    Point lp = p;
    if (last_point == null) {
      last_point = lp;
      adapter.setHovered(true);
      return false;
    }
    if (lp.equals(last_point))
      return false;
    pair = calculateMascotLocation(todrop, lp, azimuth);
    Point np = pair == null ? lp : new Point(pair.vQuart == null ? lp.x : pair.vQuart.masc, pair.hQuart == null ? lp.y : pair.hQuart.masc);
    Point sp = parent.getMascotLocation();
    int x = sp.x + todrop.getWidth();
    int cw = x - np.x;
    int ch = np.y - sp.y;
    todrop.setSize(cw, ch);
    np.y = sp.y;
    parent.setMascotLocation(np);
    azimuth = getAzimuth(p, last_point);
    last_point = lp;
    return true;
  }
View Full Code Here

  private QuartetPair pair;

 
  public boolean drop(Point p) {
    CompositeAdapter parent = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    Insets insets = container.getInsets();
    WidgetAdapter dropAdapter = tracingAdapter;
    JComponent drop = (JComponent)dropAdapter.getParentContainer();
    Point hot = dropAdapter.getHotspotPoint();
    Constraints cons = adapter.getLastConstraints();
    Alignment horizontal = cons.getHorizontal();
    Alignment vertical = cons.getVertical();
    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
View Full Code Here

    return true;
  }

 
  public boolean dragEnter(Point p) {
    CompositeAdapter parent = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    parent.setMascotLocation(p);
    last_point = p;
    adapter.setHovered(true);
    return true;
  }
View Full Code Here

  public AlignmentOperation(String name, JComponent container, GroupLayoutAdapter glAdapter) {
    super(name);
    this.glAdapter = glAdapter;
    this.container = container;
    this.widgets = new ArrayList<WidgetAdapter>();
    CompositeAdapter containerAdapter = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    List<WidgetAdapter> selected = containerAdapter.getSelectedWidgets();
    for(WidgetAdapter widget:selected){
      widgets.add(widget);
    }
  }
View Full Code Here

    GroupLayout layout = (GroupLayout) container.getLayout();
    for (CompCons cons : compcons) {
      layout.setConstraints(cons.component, cons.constraints);
    }
    container.invalidate();
    CompositeAdapter containerAdapter = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    containerAdapter.doLayout();
    containerAdapter.setDirty(true);
    containerAdapter.repaintDesigner();
    return Status.OK_STATUS;
  }
View Full Code Here

    super(layout, tracingAdapter,op, container);
  }

 
  public boolean dragOver(Point p) {
    CompositeAdapter parent = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    Component todrop = tracingAdapter.getWidget();
    Point lp = p;
    if (last_point == null) {
      last_point = lp;
      adapter.setHovered(true);
      return false;
    }
    if (lp.equals(last_point))
      return false;
    pair = calculateMascotLocation((JComponent)todrop, lp, azimuth);
    Point np = pair == null ? lp : new Point(lp.x, pair.hQuart.masc);
    Point sp = parent.getMascotLocation();
    int cw = todrop.getWidth();
    int ch = np.y - sp.y;
    todrop.setSize(cw, ch);
    azimuth = getAzimuth(p, last_point);
    last_point = lp;
View Full Code Here

  private QuartetPair pair;

 
  public boolean drop(Point p) {
    CompositeAdapter parent = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    Insets insets = container.getInsets();
    WidgetAdapter dropAdapter = tracingAdapter;
    JComponent drop = (JComponent)dropAdapter.getParentContainer();
    Point hot = dropAdapter.getHotspotPoint();
    Alignment vertical = adapter.getLastConstraints().getVertical();
    Alignment horizontal = adapter.getLastConstraints().getHorizontal();
    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
View Full Code Here

    return true;
  }

 
  public boolean dragEnter(Point p) {
    CompositeAdapter parent = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    parent.setMascotLocation(p);
    last_point = p;
    adapter.setHovered(true);
    return true;
  }
View Full Code Here

TOP

Related Classes of org.dyno.visual.swing.plugin.spi.CompositeAdapter

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.