@Override public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) { ArrayList<SwitchTarget> result = new ArrayList<SwitchTarget>(); for (TabInfo each : myVisibleInfos) { result.add(new TabTarget(each)); } if (originalProvider && mySwitchDelegate != null) { List<SwitchTarget> additional = mySwitchDelegate.getTargets(onlyVisible, false); if (additional != null) { result.addAll(additional); } } return result; }
@Override public List<SwitchTarget> getTargets(final boolean onlyVisible, boolean originalProvider) { final ArrayList<SwitchTarget> result = new ArrayList<SwitchTarget>(); TabInfo selected = myTabs.getSelectedInfo(); new AwtVisitor(selected.getComponent()) { @Override public boolean visit(Component component) { if (component instanceof JBTabs) { JBTabs tabs = (JBTabs)component; if (tabs != myTabs) { result.addAll(tabs.getTargets(onlyVisible, false)); return true; } } return false; } }; return result; }
@Override public SwitchTarget getCurrentTarget() { TabInfo selected = myTabs.getSelectedInfo(); final Ref<SwitchTarget> targetRef = new Ref<SwitchTarget>(); new AwtVisitor(selected.getComponent()) { @Override public boolean visit(Component component) { if (component instanceof JBTabs) { JBTabs tabs = (JBTabs)component; if (tabs != myTabs) { targetRef.set(tabs.getCurrentTarget()); return true; } } return false; } }; return targetRef.get(); }
@Override public SwitchTarget getCurrentTarget() { Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); if (owner == null) return myTabs.getCurrentTarget(); GridImpl grid = getSelectedGrid(); if (grid != null && grid.getContents().size() <= 1) return myTabs.getCurrentTarget(); if (grid != null) { SwitchTarget cell = grid.getCellFor(owner); return cell != null ? cell : myTabs.getCurrentTarget(); } else { return myTabs.getCurrentTarget(); } }
@Override public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) { List<SwitchTarget> result = new ArrayList<SwitchTarget>(); result.addAll(myTabs.getTargets(true, false)); GridImpl grid = getSelectedGrid(); if (grid != null) { result.addAll(grid.getTargets(onlyVisible)); } for (Wrapper wrapper : myMinimizedButtonsPlaceholder.values()) { if (!wrapper.isShowing()) continue; JComponent target = wrapper.getTargetComponent(); if (target instanceof ActionToolbar) { ActionToolbar tb = (ActionToolbar)target; result.addAll(tb.getTargets(onlyVisible, false)); } } return result; }
public List<SwitchTarget> getTargets(final boolean onlyVisible, boolean originalProvider) { final ArrayList<SwitchTarget> result = new ArrayList<SwitchTarget>(); TabInfo selected = myTabs.getSelectedInfo(); new AwtVisitor(selected.getComponent()) { @Override public boolean visit(Component component) { if (component instanceof JBTabs) { JBTabs tabs = (JBTabs)component; if (tabs != myTabs) { result.addAll(tabs.getTargets(onlyVisible, false)); return true; } } return false; } }; return result; }
public SwitchTarget getCurrentTarget() { TabInfo selected = myTabs.getSelectedInfo(); final Ref<SwitchTarget> targetRef = new Ref<SwitchTarget>(); new AwtVisitor(selected.getComponent()) { @Override public boolean visit(Component component) { if (component instanceof JBTabs) { JBTabs tabs = (JBTabs)component; if (tabs != myTabs) { targetRef.set(tabs.getCurrentTarget()); return true; } } return false; } }; return targetRef.get(); }
@Override public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) { ArrayList<SwitchTarget> result = new ArrayList<>(); for (TabInfo each : myVisibleInfos) { result.add(new TabTarget(each)); } if (originalProvider && mySwitchDelegate != null) { List<SwitchTarget> additional = mySwitchDelegate.getTargets(onlyVisible, false); if (additional != null) { result.addAll(additional); } } return result; }
@Override public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) { List<SwitchTarget> result = new ArrayList<>(); result.addAll(myTabs.getTargets(true, false)); GridImpl grid = getSelectedGrid(); if (grid != null) { result.addAll(grid.getTargets(onlyVisible)); } for (Wrapper wrapper : myMinimizedButtonsPlaceholder.values()) { if (!wrapper.isShowing()) continue; JComponent target = wrapper.getTargetComponent(); if (target instanceof ActionToolbar) { ActionToolbar tb = (ActionToolbar)target; result.addAll(tb.getTargets(onlyVisible, false)); } } return result; }
@Override public SwitchTarget getCurrentTarget() { if (mySwitchDelegate != null) { SwitchTarget selection = mySwitchDelegate.getCurrentTarget(); if (selection != null) return selection; } return new TabTarget(getSelectedInfo()); }
public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) { List<SwitchTarget> result = new ArrayList<SwitchTarget>(); if (myType == ToolWindowContentUiType.TABBED) { for (int i = 0; i < myManager.getContentCount(); i++) { result.add(new ContentSwitchTarget(myManager.getContent(i))); } } return result; }
@Override public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) { ArrayList<SwitchTarget> result = new ArrayList<SwitchTarget>(); if (getBounds().width * getBounds().height <= 0) return result; for (int i = 0; i < getComponentCount(); i++) { Component each = getComponent(i); if (each instanceof ActionButton) { result.add(new ActionTarget((ActionButton)each)); } } return result; }
@Override public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) { if (myUI instanceof SwitchProvider) { return ((SwitchProvider)myUI).getTargets(onlyVisible, false); } return new SmartList<SwitchTarget>(); }
@Nullable public SwitchTarget getCellFor(Component c) { Component eachParent = c; while (eachParent != null) { for (GridCellImpl eachCell : myContent2Cell.values()) { if (eachCell.contains(eachParent)) { return eachCell.getTargetForSelection(); } } eachParent = eachParent.getParent(); } return null; }
public List<SwitchTarget> getTargets(boolean onlyVisible) { Collection<GridCellImpl> cells = myPlaceInGrid2Cell.values(); ArrayList<SwitchTarget> result = new ArrayList<SwitchTarget>(); for (GridCellImpl each : cells) { result.addAll(each.getTargets(onlyVisible)); } return result; }
@Override public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) { if (myUI instanceof SwitchProvider) { return ((SwitchProvider)myUI).getTargets(onlyVisible, false); } return new ArrayList<SwitchTarget>(); }
@Override public SwitchTarget getCurrentTarget() { if (myUI instanceof SwitchProvider) { return ((SwitchProvider)myUI).getCurrentTarget(); } return null; }
@Override public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) { List<SwitchTarget> result = new ArrayList<SwitchTarget>(); if (myType == ToolWindowContentUiType.TABBED) { for (int i = 0; i < myManager.getContentCount(); i++) { result.add(new ContentSwitchTarget(myManager.getContent(i))); } } return result; }
@Override public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) { ArrayList<SwitchTarget> result = new ArrayList<>(); if (getBounds().width * getBounds().height <= 0) return result; for (int i = 0; i < getComponentCount(); i++) { Component each = getComponent(i); if (each instanceof ActionButton) { result.add(new ActionTarget((ActionButton)each)); } } return result; }
public List<SwitchTarget> getTargets(boolean onlyVisible) { Collection<GridCellImpl> cells = myPlaceInGrid2Cell.values(); ArrayList<SwitchTarget> result = new ArrayList<>(); for (GridCellImpl each : cells) { result.addAll(each.getTargets(onlyVisible)); } return result; }
public SwitchTarget getCurrentTarget() { return new ContentSwitchTarget(myManager.getSelectedContent()); }
@Override public SwitchTarget getCurrentTarget() { return null; }
@Override public SwitchTarget getCurrentTarget() { return myUI instanceof SwitchProvider ? ((SwitchProvider)myUI).getCurrentTarget() : null; }
public List<SwitchTarget> getTargets(boolean onlyVisible) { if (myTabs.getPresentation().isHideTabs()) return new ArrayList<SwitchTarget>(); return myTabs.getTargets(onlyVisible, false); }
public SwitchTarget getTargetForSelection() { return myTabs.getCurrentTarget(); }