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


Java FormEditingUtil.getAllSelectedComponents方法代码示例

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


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

示例1: actionPerformed

import com.intellij.uiDesigner.FormEditingUtil; //导入方法依赖的package包/类
public void actionPerformed(final AnActionEvent e) {
  final ArrayList<RadComponent> selection = FormEditingUtil.getAllSelectedComponents(myEditor);
  final RadComponent component = selection.get(0);
  final Property defaultInplaceProperty = component.getDefaultInplaceProperty();
  myEditor.getInplaceEditingLayer().startInplaceEditing(component, defaultInplaceProperty,
                                                        component.getDefaultInplaceEditorBounds(), new InplaceContext(true));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:StartInplaceEditingAction.java

示例2: update

import com.intellij.uiDesigner.FormEditingUtil; //导入方法依赖的package包/类
public void update(final AnActionEvent e) {
  final Presentation presentation = e.getPresentation();
  final ArrayList<RadComponent> selection = FormEditingUtil.getAllSelectedComponents(myEditor);

  // Inplace editing can be started only if single component is selected
  if(selection.size() != 1){
    presentation.setEnabled(false);
    return;
  }

  // Selected component should have "inplace" property
  final RadComponent component = selection.get(0);
  presentation.setEnabled(component.getDefaultInplaceProperty() != null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:StartInplaceEditingAction.java

示例3: processKeyEvent

import com.intellij.uiDesigner.FormEditingUtil; //导入方法依赖的package包/类
protected void processKeyEvent(final KeyEvent e){
  if (e.getKeyCode() == KeyEvent.VK_SHIFT) {
    if (e.getID() == KeyEvent.KEY_PRESSED) {
      if ((myCurrentProcessor != null && myCurrentProcessor.isDragActive()) ||
          (PaletteToolWindowManager.getInstance(myEditor).getActiveItem(ComponentItem.class) != null &&
           myCurrentProcessor != myInsertComponentProcessor)) {
        myEditor.setDesignTimeInsets(12);
      }
    }
    else {
      myEditor.setDesignTimeInsets(2);
    }
  }
  if (myCurrentProcessor != null) {
    myCurrentProcessor.processKeyEvent(e);
  }
  else if (e.getID() == KeyEvent.KEY_TYPED && Character.isLetterOrDigit(e.getKeyChar()) &&
    (e.getModifiers() & (InputEvent.ALT_MASK | InputEvent.CTRL_MASK | InputEvent.META_MASK)) == 0) {
    final ArrayList<RadComponent> selection = FormEditingUtil.getAllSelectedComponents(myEditor);
    if (selection.size() > 0) {
      final RadComponent component = selection.get(0);
      final InplaceEditingLayer inplaceLayer = myEditor.getInplaceEditingLayer();
      inplaceLayer.startInplaceEditing(component, component.getDefaultInplaceProperty(),
                                       component.getDefaultInplaceEditorBounds(), new InplaceContext(false, e.getKeyChar()));
      e.consume();
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:MainProcessor.java


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