Exemplo n.º 1
0
        public static void selectAndEditCellAt(JTable paramJTable, int paramInt1, int paramInt2)
        {
            paramJTable.SelectionModel.setSelectionInterval(paramInt1, paramInt1);
            paramJTable.ColumnModel.SelectionModel.setSelectionInterval(paramInt2, paramInt2);
            bool @bool = paramJTable.editCellAt(paramInt1, paramInt2);

            if (@bool && paramJTable.EditorComponent != null)
            {
                Component component = paramJTable.EditorComponent;
                component.requestFocus();
                if (component is JTextComponent)
                {
                    ((JTextComponent)component).selectAll();
                }
                else if (component is JComboBox)
                {
                    ((JComboBox)component).showPopup();
                }
            }
            else
            {
                paramJTable.changeSelection(paramInt1, paramInt2, false, false);
            }
        }