Java 类com.intellij.uiDesigner.CutCopyPasteSupport 实例源码

项目:intellij-ce-playground    文件:ResizeProcessor.java   
public ResizeProcessor(final GuiEditor editor, final RadComponent component, final int resizeMask){
  myEditor = editor;
  if (component.getParent() == null) {
    throw new IllegalArgumentException("parent is null for " + component);
  }

  myComponent = component;
  myOriginalParent = component.getParent();
  myOriginalConstraints = component.getConstraints();

  final List<RadComponent> copyList = CutCopyPasteSupport.copyComponents(editor, Collections.singletonList(component));
  if (component.getParent().getLayoutManager().isGrid() && copyList != null) {
    myComponent.setResizing(true);
    Rectangle rc = SwingUtilities.convertRectangle(component.getParent().getDelegee(),
                                                   component.getBounds(),
                                                   myEditor.getDragLayer());
    component.setDragging(true);
    component.setSelected(false);

    myResizedCopy = copyList.get(0);
    myResizedCopy.setBounds(rc);
    myResizedCopy.setSelected(true);
    editor.getDragLayer().add(myResizedCopy.getDelegee());
  }
  myResizeMask = resizeMask;

  setCursor(getResizeCursor());
}
项目:tools-idea    文件:ResizeProcessor.java   
public ResizeProcessor(final GuiEditor editor, final RadComponent component, final int resizeMask){
  myEditor = editor;
  if (component.getParent() == null) {
    throw new IllegalArgumentException("parent is null for " + component);
  }

  myComponent = component;
  myOriginalParent = component.getParent();
  myOriginalConstraints = component.getConstraints();

  final List<RadComponent> copyList = CutCopyPasteSupport.copyComponents(editor, Collections.singletonList(component));
  if (component.getParent().getLayoutManager().isGrid() && copyList != null) {
    myComponent.setResizing(true);
    Rectangle rc = SwingUtilities.convertRectangle(component.getParent().getDelegee(),
                                                   component.getBounds(),
                                                   myEditor.getDragLayer());
    component.setDragging(true);
    component.setSelected(false);

    myResizedCopy = copyList.get(0);
    myResizedCopy.setBounds(rc);
    myResizedCopy.setSelected(true);
    editor.getDragLayer().add(myResizedCopy.getDelegee());
  }
  myResizeMask = resizeMask;

  setCursor(getResizeCursor());
}
项目:consulo-ui-designer    文件:ResizeProcessor.java   
public ResizeProcessor(final GuiEditor editor, final RadComponent component, final int resizeMask){
  myEditor = editor;
  if (component.getParent() == null) {
    throw new IllegalArgumentException("parent is null for " + component);
  }

  myComponent = component;
  myOriginalParent = component.getParent();
  myOriginalConstraints = component.getConstraints();

  final List<RadComponent> copyList = CutCopyPasteSupport.copyComponents(editor, Collections.singletonList(component));
  if (component.getParent().getLayoutManager().isGrid() && copyList != null) {
    myComponent.setResizing(true);
    Rectangle rc = SwingUtilities.convertRectangle(component.getParent().getDelegee(),
                                                   component.getBounds(),
                                                   myEditor.getDragLayer());
    component.setDragging(true);
    component.setSelected(false);

    myResizedCopy = copyList.get(0);
    myResizedCopy.setBounds(rc);
    myResizedCopy.setSelected(true);
    editor.getDragLayer().add(myResizedCopy.getDelegee());
  }
  myResizeMask = resizeMask;

  setCursor(getResizeCursor());
}