Search in sources :

Example 1 with ComponentDropLocation

use of com.intellij.uiDesigner.designSurface.ComponentDropLocation in project intellij-community by JetBrains.

the class AddTabAction method actionPerformed.

protected void actionPerformed(final GuiEditor editor, final List<RadComponent> selection, final AnActionEvent e) {
    RadTabbedPane tabbedPane = (RadTabbedPane) selection.get(0);
    Palette palette = Palette.getInstance(editor.getProject());
    final RadComponent radComponent = InsertComponentProcessor.createPanelComponent(editor);
    final ComponentDropLocation dropLocation = tabbedPane.getDropLocation(null);
    dropLocation.processDrop(editor, new RadComponent[] { radComponent }, null, new ComponentItemDragObject(palette.getPanelItem()));
}
Also used : Palette(com.intellij.uiDesigner.palette.Palette) RadTabbedPane(com.intellij.uiDesigner.radComponents.RadTabbedPane) RadComponent(com.intellij.uiDesigner.radComponents.RadComponent) ComponentItemDragObject(com.intellij.uiDesigner.designSurface.ComponentItemDragObject) ComponentDropLocation(com.intellij.uiDesigner.designSurface.ComponentDropLocation)

Aggregations

ComponentDropLocation (com.intellij.uiDesigner.designSurface.ComponentDropLocation)1 ComponentItemDragObject (com.intellij.uiDesigner.designSurface.ComponentItemDragObject)1 Palette (com.intellij.uiDesigner.palette.Palette)1 RadComponent (com.intellij.uiDesigner.radComponents.RadComponent)1 RadTabbedPane (com.intellij.uiDesigner.radComponents.RadTabbedPane)1