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