mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 13:11:39 +07:00
tab works fine now
This commit is contained in:
+8
-3
@@ -30,7 +30,6 @@ import com.intellij.openapi.ui.VerticalFlowLayout;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.psi.PsiCodeFragment;
|
||||
@@ -47,7 +46,7 @@ import com.intellij.ui.treeStructure.Tree;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.PlatformIcons;
|
||||
import com.intellij.util.ui.MacUIUtil;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.table.JBListTable;
|
||||
import com.intellij.util.ui.table.JBTableRow;
|
||||
import com.intellij.util.ui.table.JBTableRowEditor;
|
||||
@@ -282,7 +281,13 @@ public abstract class ChangeSignatureDialogBase<P extends ParameterInfo, M exten
|
||||
tabbedPane.addTab(extraPanel.first, extraPanel.second);
|
||||
}
|
||||
main = new JPanel(new BorderLayout());
|
||||
main.add(tabbedPane.getComponent(), BorderLayout.CENTER);
|
||||
final JComponent tabs = tabbedPane.getComponent();
|
||||
main.add(tabs, BorderLayout.CENTER);
|
||||
//remove traversal policies
|
||||
for (JComponent c : UIUtil.findComponentsOfType(tabs, JComponent.class)) {
|
||||
c.setFocusCycleRoot(false);
|
||||
c.setFocusTraversalPolicy(null);
|
||||
}
|
||||
}
|
||||
final JPanel bottom = new JPanel(new BorderLayout());
|
||||
bottom.add(optionsPanel, BorderLayout.NORTH);
|
||||
|
||||
@@ -56,11 +56,13 @@ public abstract class JBListTable extends JPanel {
|
||||
mainTable = new JBTable(model) {
|
||||
@Override
|
||||
protected void processKeyEvent(KeyEvent e) {
|
||||
if (e.isAltDown()) return;
|
||||
if (e.getKeyCode() == KeyEvent.VK_ENTER && e.getModifiers() == 0) {
|
||||
if (!isEditing() && e.getID() == KeyEvent.KEY_PRESSED) {
|
||||
editCellAt(getSelectedRow(), getSelectedColumn());
|
||||
}
|
||||
e.consume();
|
||||
return;
|
||||
}
|
||||
//todo[kb] JBTabsImpl breaks focus traversal policy. Need a workaround here
|
||||
else if (e.getKeyCode() == KeyEvent.VK_TAB) {
|
||||
@@ -73,10 +75,9 @@ public abstract class JBListTable extends JPanel {
|
||||
}
|
||||
}
|
||||
e.consume();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
super.processKeyEvent(e);
|
||||
}
|
||||
super.processKeyEvent(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user