public static void selectSingleComponent(final GuiEditor editor, final RadComponent component) { final RadContainer root = (RadContainer)getRoot(component); if (root == null) return; ComponentTreeBuilder builder = DesignerToolWindowManager.getInstance(editor).getComponentTreeBuilder(); // this can return null if the click to select the control also requested to grab the focus - // the component tree will be instantiated after the event has been processed completely if (builder != null) { builder.beginUpdateSelection(); } try { clearSelection(root); selectComponent(editor, component); editor.setSelectionAnchor(component); editor.scrollComponentInView(component); } finally { if (builder != null) { builder.endUpdateSelection(); } } }
public static void selectComponents(final GuiEditor editor, List<RadComponent> components) { if (components.size() > 0) { RadComponent component = components.get(0); ComponentTreeBuilder builder = DesignerToolWindowManager.getInstance(editor).getComponentTreeBuilder(); if (builder == null) { // race condition when handling event? return; } builder.beginUpdateSelection(); try { clearSelection((RadContainer)getRoot(component)); for (RadComponent aComponent : components) { selectComponent(editor, aComponent); } } finally { builder.endUpdateSelection(); } } }
public static void selectSingleComponent(final GuiEditor editor, final RadComponent component) { final RadContainer root = (RadContainer)getRoot(component); if (root == null) return; ComponentTreeBuilder builder = UIDesignerToolWindowManager.getInstance(component.getProject()).getComponentTreeBuilder(); // this can return null if the click to select the control also requested to grab the focus - // the component tree will be instantiated after the event has been processed completely if (builder != null) { builder.beginUpdateSelection(); } try { clearSelection(root); selectComponent(editor, component); editor.setSelectionAnchor(component); editor.scrollComponentInView(component); } finally { if (builder != null) { builder.endUpdateSelection(); } } }
public static void selectComponents(final GuiEditor editor, List<RadComponent> components) { if (components.size() > 0) { RadComponent component = components.get(0); ComponentTreeBuilder builder = UIDesignerToolWindowManager.getInstance(component.getProject()).getComponentTreeBuilder(); if (builder == null) { // race condition when handling event? return; } builder.beginUpdateSelection(); try { clearSelection((RadContainer)getRoot(component)); for (RadComponent aComponent : components) { selectComponent(editor, aComponent); } } finally { builder.endUpdateSelection(); } } }
public static void selectComponents(final GuiEditor editor, List<RadComponent> components) { if(components.size() > 0) { RadComponent component = components.get(0); ComponentTreeBuilder builder = DesignerToolWindowManager.getInstance(editor).getComponentTreeBuilder(); if(builder == null) { // race condition when handling event? return; } builder.beginUpdateSelection(); try { clearSelection((RadContainer) getRoot(component)); for(RadComponent aComponent : components) { selectComponent(editor, aComponent); } } finally { builder.endUpdateSelection(); } } }
public void update(GuiEditor designer) { clearTreeBuilder(); myComponentTree.setModel(new DefaultTreeModel(new DefaultMutableTreeNode())); myComponentTree.setEditor(designer); myPropertyInspector.setEditor(designer); if(designer == null) { myComponentTree.setFormEditor(null); } else { myComponentTree.setFormEditor(designer.getEditor()); myComponentTreeBuilder = new ComponentTreeBuilder(myComponentTree, designer); } }
@Override protected void actionPerformed(final GuiEditor editor, final List<RadComponent> selection, final AnActionEvent e) { final ComponentTreeBuilder builder = DesignerToolWindowManager.getInstance(editor).getComponentTreeBuilder(); builder.beginUpdateSelection(); try { FormEditingUtil.iterate(editor.getRootContainer(), new FormEditingUtil.ComponentVisitor() { @Override public boolean visit(final IComponent component) { ((RadComponent) component).setSelected(true); return true; } }); } finally { builder.endUpdateSelection(); } }
public void update(GuiEditor designer) { clearTreeBuilder(); myComponentTree.setModel(new DefaultTreeModel(new DefaultMutableTreeNode())); myComponentTree.setEditor(designer); myPropertyInspector.setEditor(designer); if (designer == null) { myComponentTree.setFormEditor(null); } else { myComponentTree.setFormEditor(designer.getEditor()); myComponentTreeBuilder = new ComponentTreeBuilder(myComponentTree, designer); } }
protected void actionPerformed(final GuiEditor editor, final List<RadComponent> selection, final AnActionEvent e) { final ComponentTreeBuilder builder = DesignerToolWindowManager.getInstance(editor).getComponentTreeBuilder(); builder.beginUpdateSelection(); try { FormEditingUtil.iterate(editor.getRootContainer(), new FormEditingUtil.ComponentVisitor() { public boolean visit(final IComponent component) { ((RadComponent) component).setSelected(true); return true; } }); } finally { builder.endUpdateSelection(); } }
protected void actionPerformed(final GuiEditor editor, final List<RadComponent> selection, final AnActionEvent e) { final ComponentTreeBuilder builder = UIDesignerToolWindowManager.getInstance(editor.getProject()).getComponentTreeBuilder(); builder.beginUpdateSelection(); try { FormEditingUtil.iterate(editor.getRootContainer(), new FormEditingUtil.ComponentVisitor() { public boolean visit(final IComponent component) { ((RadComponent) component).setSelected(true); return true; } }); } finally { builder.endUpdateSelection(); } }
public static void selectSingleComponent(final GuiEditor editor, final RadComponent component) { final RadContainer root = (RadContainer) getRoot(component); if(root == null) { return; } ComponentTreeBuilder builder = DesignerToolWindowManager.getInstance(editor).getComponentTreeBuilder(); // this can return null if the click to select the control also requested to grab the focus - // the component tree will be instantiated after the event has been processed completely if(builder != null) { builder.beginUpdateSelection(); } try { clearSelection(root); selectComponent(editor, component); editor.setSelectionAnchor(component); editor.scrollComponentInView(component); } finally { if(builder != null) { builder.endUpdateSelection(); } } }
public ComponentTreeBuilder getComponentTreeBuilder() { return myComponentTreeBuilder; }
public void updateComponentTree() { final ComponentTreeBuilder builder = myComponentTreeBuilder; if (builder != null) { builder.queueUpdate(); } }