List of usage examples for com.intellij.openapi.actionSystem IdeActions ACTION_CLOSE_ACTIVE_TAB
String ACTION_CLOSE_ACTIVE_TAB
To view the source code for com.intellij.openapi.actionSystem IdeActions ACTION_CLOSE_ACTIVE_TAB.
Click Source Link
From source file:com.intellij.ide.actions.CloseTabToolbarAction.java
License:Apache License
public CloseTabToolbarAction() { copyFrom(ActionManager.getInstance().getAction(IdeActions.ACTION_CLOSE_ACTIVE_TAB)); Presentation presentation = getTemplatePresentation(); presentation.setIcon(AllIcons.Actions.Cancel); presentation.setText(CommonBundle.getCloseButtonText()); presentation.setDescription(null);// w ww .j a va2s .c o m }
From source file:org.jetbrains.idea.svn.dialogs.PropertiesComponent.java
License:Apache License
public void init() { setLayout(new BorderLayout()); myTable = new JBTable(); myTextArea = new JTextArea(0, 0); myTextArea.setEditable(false);/*from ww w . jav a 2s . co m*/ JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable); mySplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, scrollPane, ScrollPaneFactory.createScrollPane(myTextArea)); add(mySplitPane, BorderLayout.CENTER); add(createToolbar(), BorderLayout.WEST); final DefaultTableModel model = new DefaultTableModel(createTableModel(new HashMap<String, String>()), new Object[] { "Name", "Value" }) { public boolean isCellEditable(final int row, final int column) { return false; } }; myTable.setModel(model); myTable.setShowVerticalLines(true); myTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); myTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { int index = myTable.getSelectedRow(); if (index >= 0) { Object value = myTable.getValueAt(index, 1); if (value instanceof String) { myTextArea.setText(((String) value)); } else { myTextArea.setText(""); } } else { myTextArea.setText(""); } } }); myPopupActionGroup = createPopup(); PopupHandler.installPopupHandler(myTable, myPopupActionGroup, ActionPlaces.UNKNOWN, ActionManager.getInstance()); PopupHandler.installPopupHandler(scrollPane, myPopupActionGroup, ActionPlaces.UNKNOWN, ActionManager.getInstance()); final Shortcut[] shortcuts = KeymapManager.getInstance().getActiveKeymap() .getShortcuts(IdeActions.ACTION_CLOSE_ACTIVE_TAB); myCloseAction.registerCustomShortcutSet(new CustomShortcutSet(shortcuts), this); myRefreshAction.registerCustomShortcutSet(CommonShortcuts.getRerun(), this); }