當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。