本文整理汇总了Java中com.intellij.ui.TableSpeedSearch类的典型用法代码示例。如果您正苦于以下问题:Java TableSpeedSearch类的具体用法?Java TableSpeedSearch怎么用?Java TableSpeedSearch使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TableSpeedSearch类属于com.intellij.ui包,在下文中一共展示了TableSpeedSearch类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: AbstractTypeSelectionTable
import com.intellij.ui.TableSpeedSearch; //导入依赖的package包/类
public AbstractTypeSelectionTable(Collection<M> memberInfos, @Nullable TypeInfoModel<T, M> memberInfoModel) {
myTableModel = new MyTableModel<T, M>(this);
myTypesInfos = new ArrayList<M>(memberInfos);
if (memberInfoModel != null) {
myTypeInfoModel = memberInfoModel;
} else {
myTypeInfoModel = new DefaultTypeInfoModel<T, M>();
}
setModel(myTableModel);
TableColumnModel model = getColumnModel();
model.getColumn(DISPLAY_NAME_COLUMN).setCellRenderer(new MyTableRenderer<T, M>(this));
TableColumn checkBoxColumn = model.getColumn(CHECKED_COLUMN);
TableUtil.setupCheckboxColumn(checkBoxColumn);
checkBoxColumn.setCellRenderer(new MyBooleanRenderer<T, M>(this));
setPreferredScrollableViewportSize(new Dimension(400, getRowHeight() * 12));
getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
setShowGrid(false);
setIntercellSpacing(new Dimension(0, 0));
new MyEnableDisableAction().register();
new TableSpeedSearch(this);
}
开发者ID:phajduk,项目名称:dagger2-intellij-plugin,代码行数:27,代码来源:AbstractTypeSelectionTable.java
示例2: createUIComponents
import com.intellij.ui.TableSpeedSearch; //导入依赖的package包/类
private void createUIComponents() {
myModulesTable = new ModuleTable();
new TableSpeedSearch(myModulesTable, new PairFunction<Object, Cell, String>() {
@Override
public String fun(Object o, Cell v) {
if (o instanceof ModuleRow) {
ModuleRow row = (ModuleRow)o;
return getNameOf(row.module);
}
return o == null || o instanceof Boolean ? "" : o.toString();
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ModulesToImportDialog.java
示例3: setSpeedSearch
import com.intellij.ui.TableSpeedSearch; //导入依赖的package包/类
public static void setSpeedSearch(TreeTable treeTable) {
new TableSpeedSearch(treeTable) {
@Override
protected boolean isMatchingElement(Object element, String pattern) {
String text = super.getElementText(element);
// match search as long as some portion of the text matches the pattern
return text != null && text.contains(pattern);
}
};
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:VmStatsTreeUtils.java
示例4: AttributesPanel
import com.intellij.ui.TableSpeedSearch; //导入依赖的package包/类
public AttributesPanel() {
myBackButton.setIcon(AllIcons.Actions.Back);
myBackButton.setBorder(BORDER);
myPaletteScrollPane.setVisible(false);
myAdvancedFilterCheckBox.setVisible(false);
myAttrGroupCombo.setVisible(false);
new ComboboxSpeedSearch(myThemeCombo);
myBackButton.setToolTipText("Back to the theme");
myAttributesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
myAttributesTable.setTableHeader(null);
// TODO: TableSpeedSearch does not really support filtered tables since it incorrectly uses the model to calculate the number
// of available cells. Fix this.
new TableSpeedSearch(myAttributesTable) {
@Override
protected int getElementCount() {
return myComponent.getRowCount() * myComponent.getColumnCount();
}
};
mySubStyleLabel.setVisible(false);
mySubStyleLabel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
myPalette.setShowCheckeredBackground(true);
// Stop the combo box long items from blocking the right panel from being able to be made small.
myThemeCombo.setMinimumSize(new Dimension(10, myThemeCombo.getMinimumSize().height));
myThemeCombo.setPreferredSize(new Dimension(10, myThemeCombo.getPreferredSize().height));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:AttributesPanel.java
示例5: HgMqUnAppliedPatchesPanel
import com.intellij.ui.TableSpeedSearch; //导入依赖的package包/类
public HgMqUnAppliedPatchesPanel(@NotNull HgRepository repository) {
super(new BorderLayout());
myRepository = repository;
myProject = myRepository.getProject();
myMqPatchDir = myRepository.getHgDir().findChild("patches");
mySeriesFile = myMqPatchDir != null ? new File(myMqPatchDir.getPath(), "series") : null;
myPatchTable = new MyPatchTable(new MyPatchModel(myRepository.getUnappliedPatchNames()));
myPatchTable.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
updatePatchSeriesInBackground(null);
super.focusLost(e);
}
});
myPatchTable.setShowColumns(true);
myPatchTable.setFillsViewportHeight(true);
myPatchTable.getEmptyText().setText("Nothing to show");
myPatchTable.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), START_EDITING);
myPatchTable.setDragEnabled(true);
new TableSpeedSearch(myPatchTable);
myPatchTable.setDropMode(DropMode.INSERT_ROWS);
myPatchTable.setTransferHandler(new TableRowsTransferHandler(myPatchTable));
add(createToolbar(), BorderLayout.WEST);
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myPatchTable);
add(scrollPane, BorderLayout.CENTER);
myProject.getMessageBus().connect(myProject).subscribe(HgVcs.STATUS_TOPIC, this);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:HgMqUnAppliedPatchesPanel.java
示例6: installTableSpeedSearch
import com.intellij.ui.TableSpeedSearch; //导入依赖的package包/类
@VisibleForTesting
void installTableSpeedSearch(JTable projectListTable) {
// IDEA implementation of instant type-search within a table.
new TableSpeedSearch(projectListTable) {
// reflect this text in the filter text field.
@Override
protected void selectElement(Object element, String selectedText) {
filterTextField.setText(selectedText);
super.selectElement(element, selectedText);
}
};
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:13,代码来源:ProjectSelectionDialog.java
示例7: TelemetryDisplay
import com.intellij.ui.TableSpeedSearch; //导入依赖的package包/类
public TelemetryDisplay(InspectionGadgetsTelemetry telemetry) {
tableModel = new ListTableModel<InspectionRunTime>(createColumns(),
telemetry.buildList(), 0);
final JTable table = new JBTable(tableModel);
new TableSpeedSearch(table);
scrollPane = ScrollPaneFactory.createScrollPane(table);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:TelemetryDisplay.java
示例8: createUIComponents
import com.intellij.ui.TableSpeedSearch; //导入依赖的package包/类
private void createUIComponents() {
myVariantsTable = new BuildVariantTable();
new TableSpeedSearch(myVariantsTable);
myNotificationPanel = new NotificationPanel();
myNotificationPanel.setVisible(false);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:BuildVariantView.java
注:本文中的com.intellij.ui.TableSpeedSearch类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论