本文整理汇总了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));
}
示例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);
}
示例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();
}
}
}