本文整理匯總了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();
}
}
}