use of com.android.tools.idea.uibuilder.model.SelectionModel in project android by JetBrains.
the class SelectAllAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent e) {
ScreenView screenView = mySurface.getCurrentScreenView();
if (screenView != null) {
SelectionModel selectionModel = screenView.getSelectionModel();
selectionModel.selectAll(screenView.getModel());
mySurface.repaint();
}
}
use of com.android.tools.idea.uibuilder.model.SelectionModel in project android by JetBrains.
the class SelectParentAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent e) {
ScreenView screenView = mySurface.getCurrentScreenView();
if (screenView != null) {
SelectionModel selectionModel = screenView.getSelectionModel();
List<NlComponent> selection = selectionModel.getSelection();
if (selection.size() == 1) {
NlComponent first = selection.get(0);
NlComponent parent = first.getParent();
if (parent != null) {
selectionModel.setSelection(Collections.singletonList(parent));
}
}
mySurface.repaint();
}
}
Aggregations