Java 类com.intellij.uiDesigner.designSurface.ComponentDragObject 实例源码

项目:intellij-ce-playground    文件:RadCardLayoutManager.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  int cardIndex = 1;
  while(myContainer.findComponentWithConstraints(CARD_NAME_PREFIX + cardIndex) != null) {
    cardIndex++;
  }
  components [0].setCustomLayoutConstraints(CARD_NAME_PREFIX + cardIndex);
  myContainer.addComponent(components [0]);
}
项目:intellij-ce-playground    文件:RadBorderLayoutManager.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  components [0].setCustomLayoutConstraints(myQuadrant);
  myContainer.addComponent(components [0]);
}
项目:intellij-ce-playground    文件:RadXYLayoutManager.java   
public boolean canDrop(ComponentDragObject dragObject) {
  if (myLocation == null || dragObject.getComponentCount() != 1) {
    return false;
  }
  for(RadComponent component: myContainer.getComponents()) {
    if (!component.isDragging()) {
      return false;
    }
  }

  return true;
}
项目:intellij-ce-playground    文件:RadXYLayoutManager.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  int patchX = 0;
  int patchY = 0;

  for (int i = 0; i < components.length; i++) {
    final RadComponent c = components[i];

    final Point p = new Point(myLocation);
    Point delta = dragObject.getDelta(i);
    if (delta != null) {
      p.translate(delta.x, delta.y);
    }
    c.setLocation(p);

    patchX = Math.min(patchX, p.x);
    patchY = Math.min(patchY, p.y);

    myContainer.addComponent(c);
  }

  // shift components if necessary to make sure that no component has negative x or y
  if (patchX < 0 || patchY < 0) {
    for(RadComponent component : components) {
      component.shift(-patchX, -patchY);
    }
  }
}
项目:tools-idea    文件:RadCardLayoutManager.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  int cardIndex = 1;
  while(myContainer.findComponentWithConstraints(CARD_NAME_PREFIX + cardIndex) != null) {
    cardIndex++;
  }
  components [0].setCustomLayoutConstraints(CARD_NAME_PREFIX + cardIndex);
  myContainer.addComponent(components [0]);
}
项目:tools-idea    文件:RadBorderLayoutManager.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  components [0].setCustomLayoutConstraints(myQuadrant);
  myContainer.addComponent(components [0]);
}
项目:tools-idea    文件:RadXYLayoutManager.java   
public boolean canDrop(ComponentDragObject dragObject) {
  if (myLocation == null || dragObject.getComponentCount() != 1) {
    return false;
  }
  for(RadComponent component: myContainer.getComponents()) {
    if (!component.isDragging()) {
      return false;
    }
  }

  return true;
}
项目:tools-idea    文件:RadXYLayoutManager.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  int patchX = 0;
  int patchY = 0;

  for (int i = 0; i < components.length; i++) {
    final RadComponent c = components[i];

    final Point p = new Point(myLocation);
    Point delta = dragObject.getDelta(i);
    if (delta != null) {
      p.translate(delta.x, delta.y);
    }
    c.setLocation(p);

    patchX = Math.min(patchX, p.x);
    patchY = Math.min(patchY, p.y);

    myContainer.addComponent(c);
  }

  // shift components if necessary to make sure that no component has negative x or y
  if (patchX < 0 || patchY < 0) {
    for(RadComponent component : components) {
      component.shift(-patchX, -patchY);
    }
  }
}
项目:consulo-ui-designer    文件:RadCardLayoutManager.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  int cardIndex = 1;
  while(myContainer.findComponentWithConstraints(CARD_NAME_PREFIX + cardIndex) != null) {
    cardIndex++;
  }
  components [0].setCustomLayoutConstraints(CARD_NAME_PREFIX + cardIndex);
  myContainer.addComponent(components [0]);
}
项目:consulo-ui-designer    文件:RadBorderLayoutManager.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  components [0].setCustomLayoutConstraints(myQuadrant);
  myContainer.addComponent(components [0]);
}
项目:consulo-ui-designer    文件:RadXYLayoutManager.java   
public boolean canDrop(ComponentDragObject dragObject) {
  if (myLocation == null || dragObject.getComponentCount() != 1) {
    return false;
  }
  for(RadComponent component: myContainer.getComponents()) {
    if (!component.isDragging()) {
      return false;
    }
  }

  return true;
}
项目:consulo-ui-designer    文件:RadXYLayoutManager.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  int patchX = 0;
  int patchY = 0;

  for (int i = 0; i < components.length; i++) {
    final RadComponent c = components[i];

    final Point p = new Point(myLocation);
    Point delta = dragObject.getDelta(i);
    if (delta != null) {
      p.translate(delta.x, delta.y);
    }
    c.setLocation(p);

    patchX = Math.min(patchX, p.x);
    patchY = Math.min(patchY, p.y);

    myContainer.addComponent(c);
  }

  // shift components if necessary to make sure that no component has negative x or y
  if (patchX < 0 || patchY < 0) {
    for(RadComponent component : components) {
      component.shift(-patchX, -patchY);
    }
  }
}
项目:intellij-ce-playground    文件:RadCardLayoutManager.java   
public boolean canDrop(ComponentDragObject dragObject) {
  return dragObject.getComponentCount() == 1;
}
项目:intellij-ce-playground    文件:RadCardLayoutManager.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
  Rectangle rc = myContainer.getBounds();
  feedbackLayer.putFeedback(myContainer.getParent().getDelegee(), rc, null);
}
项目:intellij-ce-playground    文件:RadBorderLayoutManager.java   
public boolean canDrop(ComponentDragObject dragObject) {
  return dragObject.getComponentCount() == 1 &&
         ((BorderLayout) myContainer.getLayout()).getLayoutComponent(myQuadrant) == null;
}
项目:intellij-ce-playground    文件:RadBorderLayoutManager.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
  Dimension initialSize = dragObject.getInitialSize(myContainer);
  feedbackLayer.putFeedback(myContainer.getDelegee(), getFeedbackRect(myQuadrant, initialSize),
                            myContainer.getDisplayName() + " (" + myQuadrant.toLowerCase() + ")");
}
项目:intellij-ce-playground    文件:RadXYLayoutManager.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
}
项目:intellij-ce-playground    文件:RadScrollPane.java   
public boolean canDrop(ComponentDragObject dragObject) {
  return dragObject.getComponentCount() == 1 && getComponentCount() == 0;
}
项目:intellij-ce-playground    文件:RadScrollPane.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
  feedbackLayer.putFeedback(getDelegee(), new Rectangle(0, 0, getWidth(), getHeight()), getDisplayName());
}
项目:intellij-ce-playground    文件:RadScrollPane.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  addComponent(components[0]);
}
项目:tools-idea    文件:RadCardLayoutManager.java   
public boolean canDrop(ComponentDragObject dragObject) {
  return dragObject.getComponentCount() == 1;
}
项目:tools-idea    文件:RadCardLayoutManager.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
  Rectangle rc = myContainer.getBounds();
  feedbackLayer.putFeedback(myContainer.getParent().getDelegee(), rc, null);
}
项目:tools-idea    文件:RadBorderLayoutManager.java   
public boolean canDrop(ComponentDragObject dragObject) {
  return dragObject.getComponentCount() == 1 &&
         ((BorderLayout) myContainer.getLayout()).getLayoutComponent(myQuadrant) == null;
}
项目:tools-idea    文件:RadBorderLayoutManager.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
  Dimension initialSize = dragObject.getInitialSize(myContainer);
  feedbackLayer.putFeedback(myContainer.getDelegee(), getFeedbackRect(myQuadrant, initialSize),
                            myContainer.getDisplayName() + " (" + myQuadrant.toLowerCase() + ")");
}
项目:tools-idea    文件:RadXYLayoutManager.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
}
项目:tools-idea    文件:RadScrollPane.java   
public boolean canDrop(ComponentDragObject dragObject) {
  return dragObject.getComponentCount() == 1 && getComponentCount() == 0;
}
项目:tools-idea    文件:RadScrollPane.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
  feedbackLayer.putFeedback(getDelegee(), new Rectangle(0, 0, getWidth(), getHeight()), getDisplayName());
}
项目:tools-idea    文件:RadScrollPane.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  addComponent(components[0]);
}
项目:consulo-ui-designer    文件:RadCardLayoutManager.java   
public boolean canDrop(ComponentDragObject dragObject) {
  return dragObject.getComponentCount() == 1;
}
项目:consulo-ui-designer    文件:RadCardLayoutManager.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
  Rectangle rc = myContainer.getBounds();
  feedbackLayer.putFeedback(myContainer.getParent().getDelegee(), rc, null);
}
项目:consulo-ui-designer    文件:RadBorderLayoutManager.java   
public boolean canDrop(ComponentDragObject dragObject) {
  return dragObject.getComponentCount() == 1 &&
         ((BorderLayout) myContainer.getLayout()).getLayoutComponent(myQuadrant) == null;
}
项目:consulo-ui-designer    文件:RadBorderLayoutManager.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
  Dimension initialSize = dragObject.getInitialSize(myContainer);
  feedbackLayer.putFeedback(myContainer.getDelegee(), getFeedbackRect(myQuadrant, initialSize),
                            myContainer.getDisplayName() + " (" + myQuadrant.toLowerCase() + ")");
}
项目:consulo-ui-designer    文件:RadXYLayoutManager.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
}
项目:consulo-ui-designer    文件:RadScrollPane.java   
public boolean canDrop(ComponentDragObject dragObject) {
  return dragObject.getComponentCount() == 1 && getComponentCount() == 0;
}
项目:consulo-ui-designer    文件:RadScrollPane.java   
public void placeFeedback(FeedbackLayer feedbackLayer, ComponentDragObject dragObject) {
  feedbackLayer.putFeedback(getDelegee(), new Rectangle(0, 0, getWidth(), getHeight()), getDisplayName());
}
项目:consulo-ui-designer    文件:RadScrollPane.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  addComponent(components[0]);
}