当前位置: 首页>>代码示例>>Java>>正文


Java FormEditingUtil.selectSingleComponent方法代码示例

本文整理汇总了Java中com.intellij.uiDesigner.FormEditingUtil.selectSingleComponent方法的典型用法代码示例。如果您正苦于以下问题:Java FormEditingUtil.selectSingleComponent方法的具体用法?Java FormEditingUtil.selectSingleComponent怎么用?Java FormEditingUtil.selectSingleComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.uiDesigner.FormEditingUtil的用法示例。


在下文中一共展示了FormEditingUtil.selectSingleComponent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: selectOrExtend

import com.intellij.uiDesigner.FormEditingUtil; //导入方法依赖的package包/类
private void selectOrExtend(final RadComponent component) {
  if (myExtend) {
    FormEditingUtil.selectComponent(myEditor, component);
  }
  else {
    FormEditingUtil.selectSingleComponent(myEditor, component);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AbstractMoveSelectionAction.java

示例2: processMousePressed

import com.intellij.uiDesigner.FormEditingUtil; //导入方法依赖的package包/类
private void processMousePressed(final MouseEvent e){
  if(myCurrentProcessor != null){
    if (myCurrentProcessor.needMousePressed()) {
      myCurrentProcessor.processMouseEvent(e);
      return;
    }
    // Sun sometimes skips mouse released events...
    myCurrentProcessor.cancelOperation();
    myCurrentProcessor = null;
  }

  RadComponent component = null;
  final RadComponent draggerHost = FormEditingUtil.getDraggerHost(myEditor);
  // Try to understand whether we pressed inside dragger area
  if(draggerHost != null){
    final JComponent delegee = draggerHost.getDelegee();
    final Point p = SwingUtilities.convertPoint(delegee, 0, 0, e.getComponent());
    if(
      p.x - MainProcessor.DRAGGER_SIZE <= e.getX() && e.getX() <= p.x &&
      p.y - MainProcessor.DRAGGER_SIZE <= e.getY() && e.getY() <= p.y
    ){
      component = draggerHost;
    }
  }

  // If user clicked not inside dragger then we have find RadComponent at the click point
  if(component == null){
    component = FormEditingUtil.getRadComponentAt(myEditor.getRootContainer(), e.getX(), e.getY());
  }

  if (component == null) {
    return;
  }

  final ComponentItem selectedItem = PaletteToolWindowManager.getInstance(myEditor).getActiveItem(ComponentItem.class);
  if (selectedItem != null) {
    myInsertComponentProcessor.setSticky(UIUtil.isControlKeyDown(e));
    myCurrentProcessor = myInsertComponentProcessor;
    return;
  }

  if (!UIUtil.isControlKeyDown(e) && !e.isShiftDown()) {
    if (!component.isSelected() || FormEditingUtil.getSelectedComponents(myEditor).size() != 1) {
      FormEditingUtil.selectSingleComponent(myEditor, component);
    }
  }

  final Point point = SwingUtilities.convertPoint(e.getComponent(), e.getPoint(), component.getDelegee());
  final int resizeMask = Painter.getResizeMask(component, point.x, point.y);
  LOG.debug("MainProcessor.processMousePressed: resizeMask at (" + point.x + "," + point.y + ") is " + resizeMask);

  if (resizeMask != 0) {
    if (component.getParent() != null) {
      component = component.getParent().getActionTargetComponent(component);
    }
    myCurrentProcessor = new ResizeProcessor(myEditor, component, resizeMask);
  }
  else if (component instanceof RadRootContainer || e.isShiftDown()) {
    myCurrentProcessor = new GroupSelectionProcessor(myEditor, component);
  }
  else if (!e.isShiftDown()) {
    myCurrentProcessor = new DragSelectionProcessor(myEditor);
  }

  updateDragger(e);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:67,代码来源:MainProcessor.java

示例3: selectComponent

import com.intellij.uiDesigner.FormEditingUtil; //导入方法依赖的package包/类
public void selectComponent(@NotNull final String binding) {
  final RadComponent component = (RadComponent) FormEditingUtil.findComponentWithBinding(myEditor.getRootContainer(), binding);
  if (component != null) {
    FormEditingUtil.selectSingleComponent(getEditor(), component);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:UIFormEditor.java

示例4: selectComponentById

import com.intellij.uiDesigner.FormEditingUtil; //导入方法依赖的package包/类
public void selectComponentById(@NotNull final String id) {
  final RadComponent component = (RadComponent)FormEditingUtil.findComponent(myEditor.getRootContainer(), id);
  if (component != null) {
    FormEditingUtil.selectSingleComponent(getEditor(), component);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:UIFormEditor.java


注:本文中的com.intellij.uiDesigner.FormEditingUtil.selectSingleComponent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。