Search in sources :

Example 41 with JBTable

use of com.intellij.ui.table.JBTable in project android by JetBrains.

the class StringsCellEditorTest method testIsCellEditable.

public void testIsCellEditable() {
    Collection<VirtualFile> directories = Collections.singletonList(myFixture.copyDirectoryToProject("stringsEditor/base/res", "res"));
    LocalResourceRepository repository = ModuleResourceRepository.createForTest(myFacet, directories);
    JTable table = new JBTable(new StringResourceTableModel(StringResourceParser.parse(myFacet, repository)));
    TableUtils.selectCellAt(table, 0, StringResourceTableModel.DEFAULT_VALUE_COLUMN);
    assertTrue(new StringsCellEditor().isCellEditable(new ActionEvent(table, 0, null)));
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) ActionEvent(java.awt.event.ActionEvent) LocalResourceRepository(com.android.tools.idea.res.LocalResourceRepository) JBTable(com.intellij.ui.table.JBTable)

Aggregations

JBTable (com.intellij.ui.table.JBTable)41 VirtualFile (com.intellij.openapi.vfs.VirtualFile)9 AnActionEvent (com.intellij.openapi.actionSystem.AnActionEvent)8 DefaultTableModel (javax.swing.table.DefaultTableModel)8 NotNull (org.jetbrains.annotations.NotNull)7 FileChooserDescriptor (com.intellij.openapi.fileChooser.FileChooserDescriptor)6 Nullable (org.jetbrains.annotations.Nullable)6 JBLabel (com.intellij.ui.components.JBLabel)5 ActionEvent (java.awt.event.ActionEvent)5 AbstractTableModel (javax.swing.table.AbstractTableModel)5 TableColumn (javax.swing.table.TableColumn)5 TableColumnModel (javax.swing.table.TableColumnModel)5 DumbAwareAction (com.intellij.openapi.project.DumbAwareAction)4 Project (com.intellij.openapi.project.Project)4 JBScrollPane (com.intellij.ui.components.JBScrollPane)4 MouseEvent (java.awt.event.MouseEvent)4 List (java.util.List)4 StringUtil (com.intellij.openapi.util.text.StringUtil)3 JavaCodeFragmentTableCellEditor (com.intellij.refactoring.ui.JavaCodeFragmentTableCellEditor)3 UsageInfo (com.intellij.usageView.UsageInfo)3